neo4j 2.0.1-java → 2.2.0-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. data/CHANGELOG +12 -0
  2. data/Gemfile +0 -3
  3. data/README.rdoc +12 -22
  4. data/lib/db/index/lucene-store.db +0 -0
  5. data/lib/db/index/lucene.log.active +0 -0
  6. data/lib/db/index/{lucene.log.1 → lucene.log.v0} +0 -0
  7. data/lib/db/messages.log +170 -162
  8. data/lib/db/neostore +0 -0
  9. data/lib/db/neostore.id +0 -0
  10. data/lib/db/neostore.nodestore.db +0 -0
  11. data/lib/db/neostore.nodestore.db.id +0 -0
  12. data/lib/db/neostore.propertystore.db +0 -0
  13. data/lib/db/neostore.propertystore.db.arrays +0 -0
  14. data/lib/db/neostore.propertystore.db.arrays.id +0 -0
  15. data/lib/db/neostore.propertystore.db.id +0 -0
  16. data/lib/db/neostore.propertystore.db.index +0 -0
  17. data/lib/db/neostore.propertystore.db.index.id +0 -0
  18. data/lib/db/neostore.propertystore.db.index.keys +0 -0
  19. data/lib/db/neostore.propertystore.db.index.keys.id +0 -0
  20. data/lib/db/neostore.propertystore.db.strings +0 -0
  21. data/lib/db/neostore.propertystore.db.strings.id +0 -0
  22. data/lib/db/neostore.relationshipstore.db +0 -0
  23. data/lib/db/neostore.relationshipstore.db.id +0 -0
  24. data/lib/db/neostore.relationshiptypestore.db +0 -0
  25. data/lib/db/neostore.relationshiptypestore.db.id +0 -0
  26. data/lib/db/neostore.relationshiptypestore.db.names +0 -0
  27. data/lib/db/neostore.relationshiptypestore.db.names.id +0 -0
  28. data/lib/db/nioneo_logical.log.active +0 -0
  29. data/lib/db/nioneo_logical.log.v0 +0 -0
  30. data/lib/db/tm_tx_log.1 +0 -0
  31. data/lib/neo4j/rails/attributes.rb +6 -3
  32. data/lib/neo4j/rails/column.rb +26 -0
  33. data/lib/neo4j/rails/finders.rb +48 -4
  34. data/lib/{db/lock → neo4j/rails/ha_console.rb} +0 -0
  35. data/lib/neo4j/rails/ha_console/ha_console.rb +68 -0
  36. data/lib/neo4j/rails/ha_console/railtie.rb +21 -0
  37. data/lib/neo4j/rails/ha_console/zookeeper/clean.sh +4 -0
  38. data/lib/neo4j/rails/ha_console/zookeeper/conf/server1.cfg +11 -0
  39. data/lib/neo4j/rails/ha_console/zookeeper/data/zookeeper1/myid +1 -0
  40. data/lib/neo4j/rails/ha_console/zookeeper/start_zookeeper.sh +17 -0
  41. data/lib/neo4j/rails/ha_console/zookeeper/zookeeper.rb +62 -0
  42. data/lib/neo4j/rails/has_n.rb +3 -0
  43. data/lib/neo4j/rails/persistence.rb +3 -1
  44. data/lib/neo4j/rails/rails.rb +2 -1
  45. data/lib/neo4j/version.rb +1 -1
  46. data/lib/neo4j/version.rb~ +3 -0
  47. data/lib/orm_adapter/adapters/neo4j.rb +52 -5
  48. data/neo4j.gemspec +1 -1
  49. metadata +311 -186
  50. data/bin/neo4j-shell~ +0 -108
  51. data/lib/Gemfile~ +0 -3
  52. data/lib/config2.yml~ +0 -86
  53. data/lib/db/nioneo_logical.log.1 +0 -0
  54. data/lib/perf.rb~ +0 -36
  55. data/lib/test.rb~ +0 -2
data/bin/neo4j-shell~ DELETED
@@ -1,108 +0,0 @@
1
- #!/bin/sh
2
- # ----------------------------------------------------------------------------
3
- # Copyright 2001-2006 The Apache Software Foundation.
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
- # ----------------------------------------------------------------------------
17
-
18
- # Copyright (c) 2001-2002 The Apache Software Foundation. All rights
19
- # reserved.
20
-
21
- BASEDIR=`dirname $0`/..
22
- BASEDIR=`(cd "$BASEDIR"; pwd)`
23
-
24
-
25
-
26
- # OS specific support. $var _must_ be set to either true or false.
27
- cygwin=false;
28
- darwin=false;
29
- case "`uname`" in
30
- CYGWIN*) cygwin=true ;;
31
- Darwin*) darwin=true
32
- if [ -z "$JAVA_VERSION" ] ; then
33
- JAVA_VERSION="CurrentJDK"
34
- else
35
- echo "Using Java version: $JAVA_VERSION"
36
- fi
37
- if [ -z "$JAVA_HOME" ] ; then
38
- JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
39
- fi
40
- ;;
41
- esac
42
-
43
- if [ -z "$JAVA_HOME" ] ; then
44
- if [ -r /etc/gentoo-release ] ; then
45
- JAVA_HOME=`java-config --jre-home`
46
- fi
47
- fi
48
-
49
- # For Cygwin, ensure paths are in UNIX format before anything is touched
50
- if $cygwin ; then
51
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
52
- [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
53
- fi
54
-
55
- # If a specific java binary isn't specified search for the standard 'java' binary
56
- if [ -z "$JAVACMD" ] ; then
57
- if [ -n "$JAVA_HOME" ] ; then
58
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
59
- # IBM's JDK on AIX uses strange locations for the executables
60
- JAVACMD="$JAVA_HOME/jre/sh/java"
61
- else
62
- JAVACMD="$JAVA_HOME/bin/java"
63
- fi
64
- else
65
- JAVACMD=`which java`
66
- fi
67
- fi
68
-
69
- if [ ! -x "$JAVACMD" ] ; then
70
- echo "Error: JAVA_HOME is not defined correctly."
71
- echo " We cannot execute $JAVACMD"
72
- exit 1
73
- fi
74
-
75
- if [ -z "$REPO" ]
76
- then
77
- REPO="$BASEDIR"/lib
78
- fi
79
-
80
- LIBRARY_JARS=""
81
- for jar in ${REPO}/*.jar
82
- do
83
- LIBRARY_JARS=${LIBRARY_JARS}:$jar
84
- done
85
- echo $LIBRARY_JARS
86
-
87
- CLASSPATH=$CLASSPATH_PREFIX${LIBRARY_JARS}
88
-
89
- EXTRA_JVM_ARGUMENTS=""
90
-
91
- # For Cygwin, switch paths to Windows format before running java
92
- if $cygwin; then
93
- [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
94
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
95
- [ -n "$HOME" ] && HOME=`cygpath --path --windows "$HOME"`
96
- [ -n "$BASEDIR" ] && BASEDIR=`cygpath --path --windows "$BASEDIR"`
97
- [ -n "$REPO" ] && REPO=`cygpath --path --windows "$REPO"`
98
- fi
99
-
100
- exec "$JAVACMD" $JAVA_OPTS \
101
- $EXTRA_JVM_ARGUMENTS \
102
- -classpath "$CLASSPATH" \
103
- -Dapp.name="neo4j-shell" \
104
- -Dapp.pid="$$" \
105
- -Dapp.repo="$REPO" \
106
- -Dbasedir="$BASEDIR" \
107
- org.neo4j.shell.StartClient \
108
- "$@"
data/lib/Gemfile~ DELETED
@@ -1,3 +0,0 @@
1
- source 'http://rubygems.org'
2
-
3
- gem 'neo4j', :path => "../.."
data/lib/config2.yml~ DELETED
@@ -1,86 +0,0 @@
1
- #=== Neo4j.rb configuration settings
2
-
3
- # The location of the neo4j and lucene database
4
- storage_path: db/ha2
5
-
6
-
7
- # When using the Neo4j::Model you can let neo4j automatically set timestamps when updating/creating nodes.
8
- # If set to true neo4j.rb automatically timestamps create and update operations if the model has properties named created_at/created_on or updated_at/updated_on
9
- # (similar to ActiveRecord).
10
- timestamps: true
11
-
12
- # Configuration for lucene
13
- lucene: { fulltext: { provider: lucene,
14
- type: fulltext },
15
- exact: { provider: lucene,
16
- type: exact}
17
- }
18
-
19
-
20
- #use the clustered Neo4j GraphDatabase (org.neo4j.kernel.HighlyAvailableGraphDatabase)
21
- ha.db: true
22
- ha.create_empty_db: false
23
-
24
- #ha-server2.conf
25
- ha.machine_id: 2
26
- ha.server: "localhost:6002"
27
- ha.zoo_keeper_servers: "localhost:2181,localhost:2182,localhost:2183"
28
-
29
- enable_remote_shell: "port=1332"
30
-
31
- #===Memory mapped I/O settings===
32
-
33
- #Each file in the Neo store can use memory mapped I/O for reading/writing.
34
- #Best performance is achived if the full file can be memory mapped but if
35
- #there isn't enough memory for that Neo will try and make the best use of
36
- #the memory it gets (regions of the file that get accessed often will more
37
- #likley be memory mapped).
38
-
39
- #For high traversal speed it is important to have the nodestore.db and
40
- #relationshipstore.db files.
41
-
42
- neostore.nodestore.db.mapped_memory: 25M
43
- neostore.relationshipstore.db.mapped_memory: 50M
44
- neostore.propertystore.db.mapped_memory: 90M
45
- neostore.propertystore.db.index.mapped_memory: 1M
46
- neostore.propertystore.db.index.keys.mapped_memory: 1M
47
- neostore.propertystore.db.strings.mapped_memory: 130M
48
- neostore.propertystore.db.arrays.mapped_memory: 130M
49
-
50
-
51
- #: ": ": "Cache settings: ": ": "
52
-
53
- #use adaptive caches YES|NO. Let Neo try make best use of available heap.
54
- use_adaptive_cache: YES
55
-
56
- #heap usage/max heap size ratio. Neo will increase caches while ratio
57
- #is less and decrease if greater. Default 0.77 seems to be a good over
58
- #all ratio of heap usage to avoid GC trashing. Larger heaps may allow for
59
- #a higher ratio while tiny heaps may need even less.
60
- adaptive_cache_heap_ratio: 0.77
61
-
62
- #how aggressive Neo will decrease caches once heap ratio reached
63
- adaptive_cache_manager_decrease_ratio: 1.15
64
-
65
- #how aggresive Neo will increase caches if ratio isn't yet reached
66
- adaptive_cache_manager_increase_ratio: 1.1
67
-
68
- #if no requests are made to Neo this is the amount of time in ms Neo will wait
69
- #before it checks the heap usage and adapts the caches if needed
70
- adaptive_cache_worker_sleep_time: 3000
71
-
72
- #minimum size (number of nodes) of node cache. If adaptive cache is in use
73
- #node cache will not be decreased under this value
74
- min_node_cache_size: 0
75
-
76
- #minimum size (number of relationships) of relationship cache. If adaptive
77
- #cache is in use relationship cache will not be decreased under this value
78
- min_relationship_cache_size: 0
79
-
80
- #maximum size (number of nodes) of node cache. If adaptive cache is not in
81
- #use the node cache will not be increased above this value
82
- max_node_cache_size: 1500
83
-
84
- #maximum size (number of relationship) of node cache. If adaptive cache is
85
- #not in use the relationship cache will not be increased above this value
86
- max_relationship_cache_size: 3500
Binary file
data/lib/perf.rb~ DELETED
@@ -1,36 +0,0 @@
1
- require "rubygems"
2
- require "bundler/setup"
3
- require 'fileutils'
4
- require 'neo4j'
5
-
6
- #FileUtils.rm_rf Neo4j::Config[:storage_path]
7
-
8
-
9
- class FooNode < Neo4j::Model
10
- property :user_id
11
- index :user_id
12
- has_n(:contacts)
13
- def to_s
14
- "FooNode #{user_id}"
15
- end
16
- end
17
-
18
- node1 = FooNode.create(:user_id => 1)
19
-
20
- for x in 1..5 do
21
- for node_id in 2..2700
22
- # node = FooNode.create(:user_id => node_id)
23
- # node.contacts << node1
24
- # node.save!
25
-
26
- found = FooNode.find_by_user_id(node_id)
27
- puts "Found #{found}"
28
- # Neo4j::Transaction.run do
29
- # found.del
30
- # end
31
- Neo4j::Rails::Model.close_lucene_connections
32
- # puts "node_id=#{node_id} #{node.contacts.include?(node1)}" #if (node_id % 50) == 2
33
- end
34
- end
35
- puts "FINISHED"
36
- Neo4j.shutdown
data/lib/test.rb~ DELETED
@@ -1,2 +0,0 @@
1
- require 'neo4j'
2
-