neo4j 2.0.0.alpha.4-java → 2.0.0.alpha.5-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/CHANGELOG +25 -0
  2. data/Gemfile +13 -16
  3. data/README.rdoc +13 -3
  4. data/lib/neo4j.rb +3 -17
  5. data/lib/neo4j/batch/inserter.rb +6 -3
  6. data/lib/neo4j/core_ext/class/inheritable_attributes.rb +10 -35
  7. data/lib/neo4j/core_ext/class/rewrite_inheritable_attributes.rb +170 -0
  8. data/lib/neo4j/database.rb +0 -2
  9. data/lib/neo4j/migrations/class_methods.rb +8 -0
  10. data/lib/neo4j/migrations/lazy_node_mixin.rb +3 -12
  11. data/lib/neo4j/rails/attributes.rb +18 -17
  12. data/lib/neo4j/rails/model.rb +9 -0
  13. data/lib/neo4j/rails/persistence.rb +2 -2
  14. data/lib/neo4j/rails/relationship.rb +9 -0
  15. data/lib/neo4j/rails/versioning/versioning.rb +1 -1
  16. data/lib/neo4j/relationship.rb +1 -1
  17. data/lib/neo4j/rels/traverser.rb +2 -2
  18. data/lib/neo4j/version.rb +1 -1
  19. data/lib/tasks/upgrade_v2/lib/upgrade_v2.rb +110 -0
  20. data/lib/tasks/upgrade_v2/upgrade_v2.rake +9 -0
  21. data/neo4j.gemspec +3 -3
  22. metadata +14 -30
  23. data/lib/db/active_tx_log +0 -1
  24. data/lib/db/index/lucene-store.db +0 -0
  25. data/lib/db/index/lucene.log.active +0 -0
  26. data/lib/db/messages.log +0 -222
  27. data/lib/db/neostore +0 -0
  28. data/lib/db/neostore.id +0 -0
  29. data/lib/db/neostore.nodestore.db +0 -0
  30. data/lib/db/neostore.nodestore.db.id +0 -0
  31. data/lib/db/neostore.propertystore.db +0 -0
  32. data/lib/db/neostore.propertystore.db.arrays +0 -0
  33. data/lib/db/neostore.propertystore.db.arrays.id +0 -0
  34. data/lib/db/neostore.propertystore.db.id +0 -0
  35. data/lib/db/neostore.propertystore.db.index +0 -0
  36. data/lib/db/neostore.propertystore.db.index.id +0 -0
  37. data/lib/db/neostore.propertystore.db.index.keys +0 -0
  38. data/lib/db/neostore.propertystore.db.index.keys.id +0 -0
  39. data/lib/db/neostore.propertystore.db.strings +0 -0
  40. data/lib/db/neostore.propertystore.db.strings.id +0 -0
  41. data/lib/db/neostore.relationshipstore.db +0 -1
  42. data/lib/db/neostore.relationshipstore.db.id +0 -0
  43. data/lib/db/neostore.relationshiptypestore.db +0 -1
  44. data/lib/db/neostore.relationshiptypestore.db.id +0 -0
  45. data/lib/db/neostore.relationshiptypestore.db.names +0 -0
  46. data/lib/db/neostore.relationshiptypestore.db.names.id +0 -0
  47. data/lib/db/nioneo_logical.log.active +0 -0
  48. data/lib/db/tm_tx_log.1 +0 -0
data/CHANGELOG CHANGED
@@ -1,3 +1,28 @@
1
+ == 2.0.0.alpha.5 / 2012-03-27
2
+ * Fix for HA/cluster bug [#173]
3
+ * Upgrade to neo4j-community jars 1.7.0.alpha.1
4
+ * Fix for rails 3.2 [#131]
5
+ * Fix for BatchInserter bug, [#139]
6
+ * Added rake task for upgrading [#116]
7
+ * Added scripts for upgrading database [#116]
8
+
9
+ == 2.0.0.alpha.4 / 2012-01-17
10
+ * Fix node and rel enumerable for JRuby 1.9, Dmytrii Nagirniak
11
+ * Remove the will_paginate and move it to a separate gem Dmytrii Nagirniak, [#129][#132]
12
+ * Use type converter to determine how to handle multi-param attributes, Dmyitrii Nagirniak [#97]
13
+ * Set default storage_path in Rails to db [#96]
14
+ * Fix numeric Converter with nils and Float converter, Dmytrii Nagirniak
15
+ * Fix Neo4j::Rails::Model.find incorrect behavior with negative numbers, Dmytrii Nagirniak [#101]
16
+ * Allow to use symbols in batch inserter [#104]
17
+ * Split neo4j-jars gem into three jars, community,advanced&enterprise
18
+
19
+ == 2.0.0.alpha.1 / 2012-01-11
20
+ * Split JARS into a separate gem (neo4j-jars) [#115]
21
+ * Changed prefix of relationships so that it allows having incoming relationships from different classes with different relationship names. Migration is needed to update an already existing database - see issue #116. [#117]
22
+ * Fix for undefined method 'add_unpersited_outgoing_rel' [#111]
23
+ * Fix for Rails models named Property [#108] (Vivek Prahlad)
24
+
25
+
1
26
  == 1.3.1 / 2011-12-14
2
27
  * Make all relationships visible in Rails callback (rspecs #87, Dmytrii Nagirniak) [#211]
3
28
  * Enable travis to build JRuby 1.9 (pull #87, Dmytrii Nagirniak) [#214]
data/Gemfile CHANGED
@@ -2,31 +2,28 @@ source :gemcutter
2
2
 
3
3
  gemspec
4
4
 
5
- group 'test' do
6
- gem "rake", ">= 0.8.7"
7
- gem "rdoc", ">= 2.5.10"
8
- gem "horo", ">= 1.0.2" # TODO: Why horo, YARD seems to be much better option?
9
- gem "rspec", "~> 2.8"
10
- gem "its" # its(:with, :arguments) { should be_possible }
5
+ gem 'neo4j-advanced', "1.7.0.alpha.1", :require => false
6
+ gem 'neo4j-enterprise', "1.7.0.alpha.1", :require => false
11
7
 
8
+ group 'development' do
12
9
  gem 'guard'
13
10
  gem 'ruby_gntp', :require => false # GrowlNotify for Mac
14
11
  gem 'rb-inotify', :require => false
15
12
  gem 'rb-fsevent', :require => false
16
13
  gem 'rb-fchange', :require => false
17
14
  gem "guard-rspec"
15
+ gem "horo", ">= 1.0.2" # TODO: Why horo, YARD seems to be much better option?
16
+ #gem 'ruby-debug-base19' if RUBY_VERSION.include? "1.9"
17
+ #gem 'ruby-debug-base' if RUBY_VERSION.include? "1.8"
18
+ #gem "ruby-debug-ide"
19
+ end
18
20
 
21
+ group 'test' do
22
+ gem "rake", ">= 0.8.7"
23
+ gem "rdoc", ">= 2.5.10"
24
+ gem "rspec", "~> 2.8"
25
+ gem "its" # its(:with, :arguments) { should be_possible }
19
26
  gem 'shoulda-matchers', '~> 1.0'
20
-
21
27
  gem "test-unit"
22
- gem 'rcov'
23
-
24
- gem 'pry'
25
-
26
- gem 'neo4j-advanced', "1.6.0.alpha.5", :require => false
27
- gem 'neo4j-enterprise', "1.6.0.alpha.5", :require => false
28
28
  end
29
29
 
30
- #gem 'ruby-debug-base19' if RUBY_VERSION.include? "1.9"
31
- #gem 'ruby-debug-base' if RUBY_VERSION.include? "1.8"
32
- #gem "ruby-debug-ide"
@@ -1,4 +1,4 @@
1
- == Welcome to Neo4j.rb
1
+ == Welcome to Neo4j.rb {<img src="https://secure.travis-ci.org/andreasronge/neo4j.png" />}[http://travis-ci.org/andreasronge/neo4j] {<img src="https://gemnasium.com/andreasronge/neo4j.png" />}[https://gemnasium.com/andreasronge/neo4j]
2
2
 
3
3
  Neo4j.rb is a graph database for JRuby.
4
4
 
@@ -16,6 +16,17 @@ It uses two powerful and mature Java libraries:
16
16
  * {Blog: Neo4j and Rails 3}[http://blog.jayway.com/2011/03/02/neo4j-rb-1-0-0-and-rails-3/]
17
17
  * {Kvitter Example Application}[https://github.com/andreasronge/kvitter/]
18
18
 
19
+ === Status of Upcomming 2.0 Release
20
+
21
+ See the {neo4j-core gem}[https://github.com/andreasronge/neo4j-core] and GitHub issues.
22
+
23
+ Improvements:
24
+ * More modular (create your own wrapper or use Neo4j::NodeMixin/Neo4j::Rails::Model)
25
+ * Better performance
26
+ * More consistent API
27
+ * Better quality of RSpecs, code and docs (YARD)
28
+
29
+
19
30
  === Why Neo4j.rb or a Graph Database ?
20
31
 
21
32
  Here are some of the major benefits of Neo4j.rb
@@ -143,12 +154,11 @@ Notice that you can always access the lower layers if you want to do some more a
143
154
 
144
155
  === Contributing
145
156
 
146
- {<img src="https://secure.travis-ci.org/andreasronge/neo4j.png" />}[http://travis-ci.org/andreasronge/neo4j]
147
-
148
157
  Have you found a bug, need help or have a patch ?
149
158
  Just clone neo4j.rb and send me a pull request or email me.
150
159
  Do you need help - send me an email (andreas.ronge at gmail dot com).
151
160
 
161
+
152
162
  === License
153
163
  * Neo4j.rb - MIT, see the LICENSE file http://github.com/andreasronge/neo4j/tree/master/LICENSE.
154
164
  * Lucene - Apache, see http://lucene.apache.org/java/docs/features.html
@@ -6,7 +6,6 @@ require 'tmpdir'
6
6
 
7
7
  # Rails
8
8
  require 'rails/railtie'
9
- require 'active_support/core_ext/class/inheritable_attributes'
10
9
  require 'active_support/core_ext/hash/indifferent_access'
11
10
  require 'active_model'
12
11
 
@@ -28,35 +27,22 @@ require 'neo4j/paginated'
28
27
  require 'neo4j/node'
29
28
  require 'neo4j/relationship'
30
29
  require 'neo4j/relationship_set'
31
-
32
30
  require 'neo4j/type_converters/type_converters'
33
-
34
31
  require 'neo4j/index/index'
35
-
36
32
  require 'neo4j/traversal/traversal'
37
-
38
33
  require 'neo4j/property/property'
39
-
40
34
  require 'neo4j/has_n/has_n'
41
-
42
35
  require 'neo4j/node_mixin/node_mixin'
43
-
44
36
  require 'neo4j/relationship_mixin/relationship_mixin'
45
-
46
37
  require 'neo4j/rule/rule'
47
-
48
38
  require 'neo4j/rels/rels'
49
-
50
39
  require 'neo4j/rails/rails'
51
-
52
40
  require 'neo4j/model'
53
-
54
41
  require 'neo4j/migrations/migrations'
55
-
56
42
  require 'neo4j/algo/algo'
57
-
58
43
  require 'neo4j/batch/batch'
59
-
60
44
  require 'orm_adapter/adapters/neo4j'
61
-
62
45
  require 'neo4j/identity_map'
46
+
47
+
48
+ Dir["#{File.dirname(__FILE__)}/tasks/**/*.rake"].each { |ext| load ext } if defined?(Rake) && respond_to?(:namespace)
@@ -14,6 +14,7 @@ module Neo4j
14
14
  class Inserter
15
15
  attr_reader :batch_inserter, :batch_indexer
16
16
  include ToJava
17
+ include Neo4j::Load
17
18
 
18
19
  # Creates a new batch inserter.
19
20
  # Will raise an exception if Neo4j is already running at the same storage_path
@@ -80,16 +81,18 @@ module Neo4j
80
81
  from_props = node_props(from_node)
81
82
 
82
83
  if from_props['_classname']
83
- indexer = Indexer.instance_for(from_props['_classname'])
84
+ from_class = to_class(from_props['_classname'])
85
+ indexer = Indexer.instance_for(from_class)
84
86
  indexer.index_node_via_rel(rel_type, to_node, from_props)
85
87
  end
86
88
 
87
89
  to_props = node_props(to_node)
88
90
  if to_props['_classname']
89
- indexer = Indexer.instance_for(to_props['_classname'])
91
+ to_class = to_class(to_props['_classname'])
92
+ indexer = Indexer.instance_for(to_class)
90
93
  indexer.index_node_via_rel(rel_type, from_node, to_props)
91
94
  end
92
-
95
+ rel
93
96
  end
94
97
 
95
98
  # Return a hash of all properties of given node
@@ -1,37 +1,12 @@
1
1
  # This is copied from Rails Active Support since it has been depricated and I still need it
2
- class Class # :nodoc:
3
- def class_inheritable_reader(*syms)
4
- options = syms.extract_options!
5
- syms.each do |sym|
6
- next if sym.is_a?(Hash)
7
- class_eval(<<-EOS, __FILE__, __LINE__ + 1)
8
- def self.#{sym} # def self.after_add
9
- read_inheritable_attribute(:#{sym}) # read_inheritable_attribute(:after_add)
10
- end # end
11
- #
12
- #{" #
13
- def #{sym} # def after_add
14
- self.class.#{sym} # self.class.after_add
15
- end # end
16
- " unless options[:instance_reader] == false } # # the reader above is generated unless options[:instance_reader] == false
17
- EOS
18
- end
19
- end
20
2
 
21
- def class_inheritable_writer(*syms)
22
- options = syms.extract_options!
23
- syms.each do |sym|
24
- class_eval(<<-EOS, __FILE__, __LINE__ + 1)
25
- def self.#{sym}=(obj) # def self.color=(obj)
26
- write_inheritable_attribute(:#{sym}, obj) # write_inheritable_attribute(:color, obj)
27
- end # end
28
- #
29
- #{" #
30
- def #{sym}=(obj) # def color=(obj)
31
- self.class.#{sym} = obj # self.class.color = obj
32
- end # end
33
- " unless options[:instance_writer] == false } # # the writer above is generated unless options[:instance_writer] == false
34
- EOS
35
- end
36
- end
37
- end
3
+ # Taken from: https://raw.github.com/lifo/docrails/dd6c3676af3fa6019c53a59f62c4fd14966be728/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
4
+
5
+ # Changes made:
6
+ # - Remove deprecation warnings
7
+ # - Ignore if already available from ActiveSupport
8
+ #
9
+ # Can't use class_attribute because we want to use the same value for all subclasses
10
+
11
+
12
+ require 'neo4j/core_ext/class/rewrite_inheritable_attributes.rb'
@@ -0,0 +1,170 @@
1
+ require 'active_support/core_ext/object/duplicable'
2
+ require 'active_support/core_ext/array/extract_options'
3
+
4
+ # Retained for backward compatibility. Methods are now included in Class.
5
+ module ClassInheritableAttributes # :nodoc:
6
+ end
7
+
8
+ # It is recommended to use <tt>class_attribute</tt> over methods defined in this file. Please
9
+ # refer to documentation for <tt>class_attribute</tt> for more information. Officially it is not
10
+ #
11
+ # Allows attributes to be shared within an inheritance hierarchy. Each descendant gets a copy of
12
+ # their parents' attributes, instead of just a pointer to the same. This means that the child can add elements
13
+ # to, for example, an array without those additions being shared with either their parent, siblings, or
14
+ # children. This is unlike the regular class-level attributes that are shared across the entire hierarchy.
15
+ #
16
+ # The copies of inheritable parent attributes are added to subclasses when they are created, via the
17
+ # +inherited+ hook.
18
+ #
19
+ # class Person
20
+ # class_inheritable_accessor :hair_colors
21
+ # end
22
+ #
23
+ # Person.hair_colors = [:brown, :black, :blonde, :red]
24
+ # Person.hair_colors # => [:brown, :black, :blonde, :red]
25
+ # Person.new.hair_colors # => [:brown, :black, :blonde, :red]
26
+ #
27
+ # To opt out of the instance writer method, pass :instance_writer => false.
28
+ # To opt out of the instance reader method, pass :instance_reader => false.
29
+ #
30
+ # class Person
31
+ # class_inheritable_accessor :hair_colors :instance_writer => false, :instance_reader => false
32
+ # end
33
+ #
34
+ # Person.new.hair_colors = [:brown] # => NoMethodError
35
+ # Person.new.hair_colors # => NoMethodError
36
+ class Class # :nodoc:
37
+ def class_inheritable_reader(*syms)
38
+ options = syms.extract_options!
39
+ syms.each do |sym|
40
+ next if sym.is_a?(Hash)
41
+ class_eval(<<-EOS, __FILE__, __LINE__ + 1)
42
+ def self.#{sym} # def self.after_add
43
+ read_inheritable_attribute(:#{sym}) # read_inheritable_attribute(:after_add)
44
+ end # end
45
+ #
46
+ #{" #
47
+ def #{sym} # def after_add
48
+ self.class.#{sym} # self.class.after_add
49
+ end # end
50
+ " unless options[:instance_reader] == false } # # the reader above is generated unless options[:instance_reader] == false
51
+ EOS
52
+ end
53
+ end
54
+
55
+ def class_inheritable_writer(*syms)
56
+ options = syms.extract_options!
57
+ syms.each do |sym|
58
+ class_eval(<<-EOS, __FILE__, __LINE__ + 1)
59
+ def self.#{sym}=(obj) # def self.color=(obj)
60
+ write_inheritable_attribute(:#{sym}, obj) # write_inheritable_attribute(:color, obj)
61
+ end # end
62
+ #
63
+ #{" #
64
+ def #{sym}=(obj) # def color=(obj)
65
+ self.class.#{sym} = obj # self.class.color = obj
66
+ end # end
67
+ " unless options[:instance_writer] == false } # # the writer above is generated unless options[:instance_writer] == false
68
+ EOS
69
+ end
70
+ end
71
+
72
+ def class_inheritable_array_writer(*syms)
73
+ options = syms.extract_options!
74
+ syms.each do |sym|
75
+ class_eval(<<-EOS, __FILE__, __LINE__ + 1)
76
+ def self.#{sym}=(obj) # def self.levels=(obj)
77
+ write_inheritable_array(:#{sym}, obj) # write_inheritable_array(:levels, obj)
78
+ end # end
79
+ #
80
+ #{" #
81
+ def #{sym}=(obj) # def levels=(obj)
82
+ self.class.#{sym} = obj # self.class.levels = obj
83
+ end # end
84
+ " unless options[:instance_writer] == false } # # the writer above is generated unless options[:instance_writer] == false
85
+ EOS
86
+ end
87
+ end
88
+
89
+ def class_inheritable_hash_writer(*syms)
90
+ options = syms.extract_options!
91
+ syms.each do |sym|
92
+ class_eval(<<-EOS, __FILE__, __LINE__ + 1)
93
+ def self.#{sym}=(obj) # def self.nicknames=(obj)
94
+ write_inheritable_hash(:#{sym}, obj) # write_inheritable_hash(:nicknames, obj)
95
+ end # end
96
+ #
97
+ #{" #
98
+ def #{sym}=(obj) # def nicknames=(obj)
99
+ self.class.#{sym} = obj # self.class.nicknames = obj
100
+ end # end
101
+ " unless options[:instance_writer] == false } # # the writer above is generated unless options[:instance_writer] == false
102
+ EOS
103
+ end
104
+ end
105
+
106
+ def class_inheritable_accessor(*syms)
107
+ class_inheritable_reader(*syms)
108
+ class_inheritable_writer(*syms)
109
+ end
110
+
111
+ def class_inheritable_array(*syms)
112
+ class_inheritable_reader(*syms)
113
+ class_inheritable_array_writer(*syms)
114
+ end
115
+
116
+ def class_inheritable_hash(*syms)
117
+ class_inheritable_reader(*syms)
118
+ class_inheritable_hash_writer(*syms)
119
+ end
120
+
121
+ def inheritable_attributes
122
+ @inheritable_attributes ||= EMPTY_INHERITABLE_ATTRIBUTES
123
+ end
124
+
125
+ def write_inheritable_attribute(key, value)
126
+ if inheritable_attributes.equal?(EMPTY_INHERITABLE_ATTRIBUTES)
127
+ @inheritable_attributes = {}
128
+ end
129
+ inheritable_attributes[key] = value
130
+ end
131
+
132
+ def write_inheritable_array(key, elements)
133
+ write_inheritable_attribute(key, []) if read_inheritable_attribute(key).nil?
134
+ write_inheritable_attribute(key, read_inheritable_attribute(key) + elements)
135
+ end
136
+
137
+ def write_inheritable_hash(key, hash)
138
+ write_inheritable_attribute(key, {}) if read_inheritable_attribute(key).nil?
139
+ write_inheritable_attribute(key, read_inheritable_attribute(key).merge(hash))
140
+ end
141
+
142
+ def read_inheritable_attribute(key)
143
+ inheritable_attributes[key]
144
+ end
145
+
146
+ def reset_inheritable_attributes
147
+ @inheritable_attributes = EMPTY_INHERITABLE_ATTRIBUTES
148
+ end
149
+
150
+ private
151
+ # Prevent this constant from being created multiple times
152
+ EMPTY_INHERITABLE_ATTRIBUTES = {}.freeze
153
+
154
+ def inherited_with_inheritable_attributes(child)
155
+ inherited_without_inheritable_attributes(child) if respond_to?(:inherited_without_inheritable_attributes)
156
+
157
+ if inheritable_attributes.equal?(EMPTY_INHERITABLE_ATTRIBUTES)
158
+ new_inheritable_attributes = EMPTY_INHERITABLE_ATTRIBUTES
159
+ else
160
+ new_inheritable_attributes = Hash[inheritable_attributes.map do |(key, value)|
161
+ [key, value.duplicable? ? value.dup : value]
162
+ end]
163
+ end
164
+
165
+ child.instance_variable_set('@inheritable_attributes', new_inheritable_attributes)
166
+ end
167
+
168
+ alias inherited_without_inheritable_attributes inherited
169
+ alias inherited inherited_with_inheritable_attributes
170
+ end
@@ -70,8 +70,6 @@ module Neo4j
70
70
  Neo4j.logger.info "starting Neo4j in HA mode, machine id: #{Neo4j.config['ha.server_id']} at #{Neo4j.config['ha.server']} db #{@storage_path}"
71
71
  # Modify the public base classes for the HA Node and Relationships
72
72
  # (instead of private org.neo4j.kernel.HighlyAvailableGraphDatabase::LookupNode)
73
- Neo4j::Node.extend_java_class(org.neo4j.tooling.wrap.WrappedNode)
74
- Neo4j::Relationship.extend_java_class(org.neo4j.tooling.wrap.WrappedRelationship)
75
73
  @graph = org.neo4j.kernel.HighlyAvailableGraphDatabase.new(@storage_path, Neo4j.config.to_java_map)
76
74
  @graph.register_transaction_event_handler(@event_handler)
77
75
  @lucene = @graph.index
@@ -21,6 +21,14 @@ module Neo4j
21
21
  @migrations ||= {}
22
22
  end
23
23
 
24
+ # Remote all migration and set migrate_to = nil
25
+ # Does not change the version of nodes.
26
+ def reset_migrations!
27
+ @migrations = nil
28
+ @migrate_to = nil
29
+ end
30
+
31
+
24
32
  # Specifies a migration to be performed.
25
33
  # Updates the migrate_to variable so that it will migrate to the latest migration.
26
34
  #
@@ -9,20 +9,11 @@ module Neo4j
9
9
  # Migration will take place if needed when the node is loaded.
10
10
  #
11
11
  module LazyNodeMixin
12
- extend ActiveSupport::Concern
13
-
14
- included do
15
- extend Neo4j::Migrations::ClassMethods
12
+ def self.included(base)
13
+ base.extend Neo4j::Migrations::ClassMethods
14
+ base.property :_db_version if base.respond_to?(:property)
16
15
  end
17
16
 
18
- module ClassMethods
19
- # Remote all migration and set migrate_to = nil
20
- # Does not change the version of nodes.
21
- def reset_migrations!
22
- @migrations = nil
23
- @migrate_to = nil
24
- end
25
- end
26
17
 
27
18
  def migrate!
28
19
  self.class._migrate!(self._java_node, self)
@@ -179,7 +179,7 @@ module Neo4j
179
179
  def attributes
180
180
  ret = {}
181
181
  attribute_names.each do |attribute_name|
182
- ret[attribute_name] = respond_to?(attribute_name) ? send(attribute_name) : send(:[], attribute_name)
182
+ ret[attribute_name] = self._decl_props[attribute_name.to_sym] ? send(attribute_name) : send(:[], attribute_name)
183
183
  end
184
184
  ret
185
185
  end
@@ -187,6 +187,9 @@ module Neo4j
187
187
  # Known properties are either in the @properties, the declared
188
188
  # attributes or the property keys for the persisted node.
189
189
  def property_names
190
+ # initialize @properties if needed since
191
+ # we can ask property names before the object is initialized (active_support initialize callbacks, respond_to?)
192
+ @properties ||= {}
190
193
  keys = @properties.keys + self.class._decl_props.keys.map { |k| k.to_s }
191
194
  keys += _java_entity.property_keys.to_a if persisted?
192
195
  keys.flatten.uniq
@@ -196,20 +199,25 @@ module Neo4j
196
199
  # attributes or the property keys for the persisted node. Any attributes
197
200
  # that start with <tt>_</tt> are rejected
198
201
  def attribute_names
199
- property_names.reject { |property_name| property_name[0] == ?_ }
202
+ property_names.reject { |property_name| _invalid_attribute_name?(property_name) }
203
+ end
204
+
205
+ def _invalid_attribute_name?(attr_name)
206
+ attr_name.to_s[0] == ?_ && !self.class._decl_props.include?(attr_name.to_sym)
200
207
  end
201
208
 
202
209
  # Known properties are either in the @properties, the declared
203
210
  # properties or the property keys for the persisted node
204
211
  def property?(name)
212
+ return false unless @properties
205
213
  @properties.has_key?(name) ||
206
214
  self.class._decl_props.has_key?(name) ||
207
- begin
208
- persisted? && super
209
- rescue org.neo4j.graphdb.NotFoundException
210
- set_deleted_properties
211
- nil
212
- end
215
+ persisted? && super
216
+ end
217
+
218
+ def property_changed?
219
+ return !@properties.empty? unless persisted?
220
+ !!@properties.keys.find{|k| self._java_node.getProperty(k.to_s) != @properties[k] }
213
221
  end
214
222
 
215
223
  # Return true if method_name is the name of an appropriate attribute
@@ -226,6 +234,8 @@ module Neo4j
226
234
  write_local_property_without_type_conversion("_classname",value)
227
235
  end
228
236
 
237
+
238
+ # TODO THIS IS ONLY NEEDED IN ACTIVEMODEL < 3.2, ?
229
239
  # To get ActiveModel::Dirty to work, we need to be able to call undeclared
230
240
  # properties as though they have get methods
231
241
  def method_missing(method_id, *args, &block)
@@ -237,15 +247,6 @@ module Neo4j
237
247
  end
238
248
  end
239
249
 
240
- def respond_to?(method_id, include_private = false)
241
- method_name = method_id.to_s
242
- if property?(method_name)
243
- true
244
- else
245
- super
246
- end
247
- end
248
-
249
250
  # Wrap the getter in a conversion from Java to Ruby
250
251
  def read_local_property_with_type_conversion(property)
251
252
  Neo4j::TypeConverters.to_ruby(self.class, property, read_local_property_without_type_conversion(property))
@@ -96,6 +96,15 @@ module Neo4j
96
96
  Neo4j::Algo.all_path(self.class.ref_node_for_class, self).outgoing(self.class).outgoing(:_all).count > 0
97
97
  end
98
98
 
99
+ def attribute_missing(method_id, *args, &block)
100
+ method_name = method_id.method_name
101
+ if property?(method_name)
102
+ self[method_name]
103
+ else
104
+ super
105
+ end
106
+ end
107
+
99
108
  ##
100
109
  # :method: outgoing
101
110
  #
@@ -237,9 +237,9 @@ module Neo4j
237
237
  allow_destroy, reject_if = [options[:allow_destroy], options[:reject_if]] if options
238
238
  begin
239
239
  # Check if we want to destroy not found nodes (e.g. {..., :_destroy => '1' } ?
240
- destroy = allow_destroy && attr[:_destroy] && attr[:_destroy] != '0'
240
+ destroy = attr.delete(:_destroy)
241
241
  found = _find_node(rel_type, attr[:id]) || Model.find(attr[:id])
242
- if destroy
242
+ if allow_destroy && destroy && destroy != '0'
243
243
  found.destroy if found
244
244
  else
245
245
  if not found
@@ -41,6 +41,15 @@ module Neo4j
41
41
 
42
42
  alias_method :get_other_node, :other_node # so it looks like the java version
43
43
 
44
+ def attribute_missing(method_id, *args, &block)
45
+ method_name = method_id.method_name
46
+ if property?(method_name)
47
+ self[method_name]
48
+ else
49
+ super
50
+ end
51
+ end
52
+
44
53
  def rel_type
45
54
  persisted? ? _java_entity.rel_type : @type
46
55
  end
@@ -102,7 +102,7 @@ module Neo4j
102
102
  def revert_to(version_number)
103
103
  snapshot = version(version_number)
104
104
  self.props.each_pair{|k,v| self[k] = nil if !snapshot.props.has_key?(k)}
105
- snapshot.props.each_pair{|k,v| self[k] = v if self.props[k].nil?}
105
+ snapshot.props.each_pair{|k,v| self[k] = v if self.props[k].nil? && k != '_neo_id'}
106
106
  Neo4j::Transaction.run do
107
107
  restore_relationships(snapshot)
108
108
  save
@@ -67,7 +67,7 @@ module Neo4j
67
67
  ##
68
68
  # :method: end_node
69
69
  #
70
- # Returns the start node of this relationship
70
+ # Returns the end node of this relationship
71
71
 
72
72
  ##
73
73
  # :method: other_node
@@ -48,9 +48,9 @@ module Neo4j
48
48
  if @types
49
49
  @node.get_relationships(@types).iterator
50
50
  elsif @type
51
- @node.get_relationships(@type, dir_to_java(@dir))
51
+ @node.get_relationships(@type, dir_to_java(@dir)).iterator
52
52
  else
53
- @node.get_relationships(dir_to_java(@dir))
53
+ @node.get_relationships(dir_to_java(@dir)).iterator
54
54
  end
55
55
  end
56
56
 
@@ -1,3 +1,3 @@
1
1
  module Neo4j
2
- VERSION = "2.0.0.alpha.4"
2
+ VERSION = "2.0.0.alpha.5"
3
3
  end
@@ -0,0 +1,110 @@
1
+ # A script for renaming relationship
2
+ # In Ne4j.rb version 2.0.0 the relationship declared with has_n(something).to(otherclass)
3
+ # has changed. In order to change the relationship of an already existing database you can run this script.
4
+ # Use the migrate_all! to automatically update all Neo4j::Rails::Model classes
5
+ # For Neo4j::NodeMixin nodes you need to migrate each node using the migrate method (since there are no automatic way of finding all instances of an Neo4j::NodeMixin)
6
+
7
+ $NEO4J_CLASSES = []
8
+ $DOMAIN_CLASSES = []
9
+
10
+ module Neo4j
11
+ module Rails
12
+ class Model
13
+ class << self
14
+ alias_method :_old_inherited, :inherited
15
+
16
+ def inherited(c)
17
+ _old_inherited(c)
18
+ unless c == Neo4j::Rails::Model
19
+ $NEO4J_CLASSES << c
20
+ $DOMAIN_CLASSES << c if c.respond_to?(:ref_node_for_class)
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+
28
+ module Neo4j
29
+ module UpgradeV2 #:nodoc:
30
+
31
+ class << self
32
+
33
+ # The domain classes declared as global ref_nodes
34
+ def default_domains_nodes
35
+ domain_nodes = [Neo4j.default_ref_node]
36
+ $DOMAIN_CLASSES.each{|clazz| domain_nodes += clazz._all.to_a}
37
+ domain_nodes
38
+ end
39
+
40
+ def migrate_all!(domains = default_domains_nodes)
41
+ domains.each do |domain|
42
+ puts "domain #{domain.props.inspect} (multitenancy) " if domain != Neo4j.default_ref_node
43
+ ::Neo4j.threadlocal_ref_node = domain
44
+ $NEO4J_CLASSES.each { |clazz| migrate(clazz) }
45
+ end
46
+ end
47
+
48
+ def migrate(clazz, nodes = clazz._all)
49
+ puts "migrate #{clazz} ..."
50
+ source_class = clazz
51
+
52
+ clazz._decl_rels.keys.each do |rel_accessor|
53
+ target_class = clazz._decl_rels[rel_accessor].target_class
54
+ next unless target_class
55
+
56
+ old_rel = "#{target_class}##{rel_accessor}"
57
+ new_rel = "#{source_class}##{rel_accessor}"
58
+
59
+ TransactionalExec.new(100) do |node|
60
+ node._java_node._rels(:outgoing, old_rel).each do |rel|
61
+ start_node = rel._start_node
62
+ end_node = rel._end_node
63
+ props = rel.props
64
+ rel.del
65
+ Neo4j::Relationship.new(new_rel, start_node, end_node, props)
66
+ end
67
+ end.execute(nodes)
68
+ end
69
+ end
70
+
71
+ end
72
+
73
+ class TransactionalExec
74
+ attr_accessor :commit_every, :block
75
+
76
+ def initialize(commit_every, &block)
77
+ @commit_every = commit_every
78
+ @block = block
79
+ end
80
+
81
+ def execute(enumerable)
82
+ time_of_all = Time.now
83
+ tx = Neo4j::Transaction.new
84
+ time_in_ruby = Time.now
85
+ index = 0
86
+ enumerable.each do |item|
87
+
88
+ @block.call(item)
89
+ index += 1
90
+ if (index % @commit_every == 0)
91
+ time_spent_in_ruby_code = Time.now - time_in_ruby
92
+ time_spent_in_write_to_file = Time.now
93
+ tx.success
94
+ tx.finish
95
+ tx = Neo4j::Transaction.new
96
+ puts " Written #{index} items. time_spend_in_ruby_code: #{time_spent_in_ruby_code}, time_spent_in_write_to_file #{Time.now - time_spent_in_write_to_file}"
97
+ time_in_ruby = Time.now
98
+ end
99
+ end
100
+
101
+ tx.success
102
+ tx.finish
103
+ puts "Total, written #{index} items in #{Time.now - time_of_all} sec." if index != 0
104
+ end
105
+ end
106
+
107
+ end
108
+
109
+ end
110
+
@@ -0,0 +1,9 @@
1
+ require File.join(File.dirname(__FILE__), "lib", "upgrade_v2")
2
+
3
+ namespace(:neo4j) do
4
+
5
+ desc "upgrade to 2.0.0, rename relationships"
6
+ task :upgrade_v2 => :environment do
7
+ Neo4j::UpgradeV2.migrate_all!
8
+ end
9
+ end
@@ -30,7 +30,7 @@ It comes included with the Apache Lucene document database.
30
30
  s.rdoc_options = ["--quiet", "--title", "Neo4j.rb", "--line-numbers", "--main", "README.rdoc", "--inline-source"]
31
31
 
32
32
  s.add_dependency('orm_adapter', ">= 0.0.3")
33
- s.add_dependency("activemodel", ">= 3.0.0")
34
- s.add_dependency("railties", ">= 3.0.0")
35
- s.add_dependency("neo4j-community", "1.6.0.alpha.6")
33
+ s.add_dependency("activemodel", ">= 3.0.0", "< 3.3")
34
+ s.add_dependency("railties", ">= 3.0.0", "< 3.3")
35
+ s.add_dependency("neo4j-community", "1.7.0.alpha.1")
36
36
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: neo4j
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 6
5
- version: 2.0.0.alpha.4
5
+ version: 2.0.0.alpha.5
6
6
  platform: java
7
7
  authors:
8
8
  - Andreas Ronge
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-01-17 00:00:00 Z
13
+ date: 2012-03-27 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: orm_adapter
@@ -32,6 +32,9 @@ dependencies:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: 3.0.0
35
+ - - <
36
+ - !ruby/object:Gem::Version
37
+ version: "3.3"
35
38
  type: :runtime
36
39
  version_requirements: *id002
37
40
  - !ruby/object:Gem::Dependency
@@ -43,6 +46,9 @@ dependencies:
43
46
  - - ">="
44
47
  - !ruby/object:Gem::Version
45
48
  version: 3.0.0
49
+ - - <
50
+ - !ruby/object:Gem::Version
51
+ version: "3.3"
46
52
  type: :runtime
47
53
  version_requirements: *id003
48
54
  - !ruby/object:Gem::Dependency
@@ -53,7 +59,7 @@ dependencies:
53
59
  requirements:
54
60
  - - "="
55
61
  - !ruby/object:Gem::Version
56
- version: 1.6.0.alpha.6
62
+ version: 1.7.0.alpha.1
57
63
  type: :runtime
58
64
  version_requirements: *id004
59
65
  description: |
@@ -84,6 +90,8 @@ files:
84
90
  - lib/generators/neo4j.rb
85
91
  - lib/generators/neo4j/model/model_generator.rb
86
92
  - lib/generators/neo4j/model/templates/model.erb
93
+ - lib/tasks/upgrade_v2/upgrade_v2.rake
94
+ - lib/tasks/upgrade_v2/lib/upgrade_v2.rb
87
95
  - lib/orm_adapter/adapters/neo4j.rb
88
96
  - lib/neo4j/identity_map.rb
89
97
  - lib/neo4j/event_handler.rb
@@ -115,6 +123,7 @@ files:
115
123
  - lib/neo4j/relationship_mixin/class_methods.rb
116
124
  - lib/neo4j/type_converters/type_converters.rb
117
125
  - lib/neo4j/core_ext/class/inheritable_attributes.rb
126
+ - lib/neo4j/core_ext/class/rewrite_inheritable_attributes.rb
118
127
  - lib/neo4j/migrations/migrations.rb
119
128
  - lib/neo4j/migrations/lazy_node_mixin.rb
120
129
  - lib/neo4j/migrations/extensions.rb
@@ -175,32 +184,6 @@ files:
175
184
  - lib/neo4j/rule/functions/count.rb
176
185
  - lib/neo4j/rule/functions/sum.rb
177
186
  - lib/neo4j/rule/functions/functions.rb
178
- - lib/db/neostore.relationshiptypestore.db.names
179
- - lib/db/neostore.id
180
- - lib/db/neostore.relationshiptypestore.db.names.id
181
- - lib/db/neostore.nodestore.db.id
182
- - lib/db/neostore.propertystore.db.index
183
- - lib/db/neostore.propertystore.db.strings.id
184
- - lib/db/nioneo_logical.log.active
185
- - lib/db/neostore.propertystore.db.strings
186
- - lib/db/neostore.relationshiptypestore.db.id
187
- - lib/db/neostore
188
- - lib/db/neostore.nodestore.db
189
- - lib/db/neostore.propertystore.db.index.keys.id
190
- - lib/db/neostore.propertystore.db.arrays.id
191
- - lib/db/messages.log
192
- - lib/db/neostore.relationshipstore.db.id
193
- - lib/db/neostore.propertystore.db.arrays
194
- - lib/db/neostore.relationshipstore.db
195
- - lib/db/neostore.propertystore.db.index.id
196
- - lib/db/neostore.propertystore.db.id
197
- - lib/db/neostore.propertystore.db
198
- - lib/db/tm_tx_log.1
199
- - lib/db/neostore.relationshiptypestore.db
200
- - lib/db/active_tx_log
201
- - lib/db/neostore.propertystore.db.index.keys
202
- - lib/db/index/lucene-store.db
203
- - lib/db/index/lucene.log.active
204
187
  - config/locales/en.yml
205
188
  - config/neo4j/config.yml
206
189
  - README.rdoc
@@ -237,9 +220,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
220
  requirements: []
238
221
 
239
222
  rubyforge_project: neo4j
240
- rubygems_version: 1.8.9
223
+ rubygems_version: 1.8.15
241
224
  signing_key:
242
225
  specification_version: 3
243
226
  summary: A graph database for JRuby
244
227
  test_files: []
245
228
 
229
+ has_rdoc: true
@@ -1 +0,0 @@
1
- tm_tx_log.1
Binary file
@@ -1,222 +0,0 @@
1
- 2012-01-13 09:00:49.856+0100: Creating new db @ /home/andreas/projects/neo4j/lib/db/neostore
2
- 2012-01-13 09:00:50.200+0100: Opened [/home/andreas/projects/neo4j/lib/db/nioneo_logical.log.1] clean empty log, version=0, lastTxId=1
3
- 2012-01-13 09:00:50.260+0100: Opened [/home/andreas/projects/neo4j/lib/db/index/lucene.log.1] clean empty log, version=0, lastTxId=1
4
- 2012-01-13 09:00:50.471+0100: TM new log: tm_tx_log.1
5
- 2012-01-13 09:00:50.493+0100: --- CONFIGURATION START ---
6
- 2012-01-13 09:00:50.493+0100: Graph Database: org.neo4j.kernel.EmbeddedGraphDatabase StoreId[time:1326441649871, id:-3425418143998465987, store version: 13561656364791302]
7
- 2012-01-13 09:00:50.493+0100: Physical mem: 3959MB, Heap size: 444MB
8
- 2012-01-13 09:00:50.494+0100: Kernel version: Neo4j - Graph Database Kernel 1.6.M02
9
- 2012-01-13 09:00:50.494+0100: Neo4j component versions:
10
- 2012-01-13 09:00:50.495+0100: Neo4j - Graph Database Kernel 1.6.M02
11
- 2012-01-13 09:00:50.495+0100: Store versions:
12
- 2012-01-13 09:00:50.495+0100: NeoStore v0.A.0
13
- 2012-01-13 09:00:50.495+0100: NodeStore v0.A.0
14
- 2012-01-13 09:00:50.495+0100: RelationshipStore v0.A.0
15
- 2012-01-13 09:00:50.495+0100: RelationshipTypeStore v0.A.0
16
- 2012-01-13 09:00:50.495+0100: PropertyStore v0.A.0
17
- 2012-01-13 09:00:50.495+0100: PropertyIndexStore v0.A.0
18
- 2012-01-13 09:00:50.495+0100: StringPropertyStore v0.A.0
19
- 2012-01-13 09:00:50.495+0100: ArrayPropertyStore v0.A.0
20
- 2012-01-13 09:00:50.502+0100: Process id: 17887@andreas-dell
21
- 2012-01-13 09:00:50.502+0100: Operating System: Linux; version: 3.0.0-14-generic; arch: amd64; cpus: 2
22
- 2012-01-13 09:00:50.503+0100: Max number of file descriptors: 4096
23
- 2012-01-13 09:00:50.503+0100: Number of open file descriptors: 50
24
- 2012-01-13 09:00:50.506+0100: Total Physical memory: 3.87 GB
25
- 2012-01-13 09:00:50.506+0100: Free Physical memory: 1.31 GB
26
- 2012-01-13 09:00:50.506+0100: Committed virtual memory: 866.66 MB
27
- 2012-01-13 09:00:50.506+0100: Total swap space: 4.88 GB
28
- 2012-01-13 09:00:50.507+0100: Free swap space: 3.69 GB
29
- 2012-01-13 09:00:50.507+0100: Byte order: LITTLE_ENDIAN
30
- 2012-01-13 09:00:50.507+0100: VM Name: Java HotSpot(TM) 64-Bit Server VM
31
- 2012-01-13 09:00:50.507+0100: VM Vendor: Sun Microsystems Inc.
32
- 2012-01-13 09:00:50.507+0100: VM Version: 20.1-b02
33
- 2012-01-13 09:00:50.509+0100: JIT compiler: HotSpot 64-Bit Tiered Compilers
34
- 2012-01-13 09:00:50.510+0100: Class Path:
35
- 2012-01-13 09:00:50.511+0100: [loader.0] file:/home/andreas/.rvm/gems/jruby-1.6.5/gems/neo4j-community-1.6.0.alpha.4-java/lib/neo4j-community/jars/neo4j-cypher-1.6.M02.jar
36
- 2012-01-13 09:00:50.511+0100: [loader.0] file:/home/andreas/.rvm/gems/jruby-1.6.5/gems/neo4j-community-1.6.0.alpha.4-java/lib/neo4j-community/jars/neo4j-graph-algo-1.6.M02.jar
37
- 2012-01-13 09:00:50.511+0100: [loader.0] file:/home/andreas/.rvm/gems/jruby-1.6.5/gems/neo4j-community-1.6.0.alpha.4-java/lib/neo4j-community/jars/neo4j-kernel-1.6.M02.jar
38
- 2012-01-13 09:00:50.511+0100: [loader.2] file:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/localedata.jar
39
- 2012-01-13 09:00:50.511+0100: [bootstrap] /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/modules/jdk.boot.jar
40
- 2012-01-13 09:00:50.511+0100: [loader.0] file:/home/andreas/.rvm/gems/jruby-1.6.5/gems/neo4j-community-1.6.0.alpha.4-java/lib/neo4j-community/jars/neo4j-lucene-index-1.6.M02.jar
41
- 2012-01-13 09:00:50.511+0100: [bootstrap] /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/rt.jar
42
- 2012-01-13 09:00:50.511+0100: [loader.2] file:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/dnsns.jar
43
- 2012-01-13 09:00:50.511+0100: [loader.0] file:/home/andreas/.rvm/gems/jruby-1.6.5/gems/neo4j-community-1.6.0.alpha.4-java/lib/neo4j-community/jars/neo4j-community-1.6.M02.jar
44
- 2012-01-13 09:00:50.511+0100: [bootstrap] /home/andreas/.rvm/rubies/jruby-1.6.5/lib/jruby.jar
45
- 2012-01-13 09:00:50.511+0100: [loader.0] file:/home/andreas/.rvm/gems/jruby-1.6.5/gems/neo4j-community-1.6.0.alpha.4-java/lib/neo4j-community/jars/neo4j-shell-1.6.M02.jar
46
- 2012-01-13 09:00:50.511+0100: [loader.0] file:/home/andreas/.rvm/gems/jruby-1.6.5/gems/neo4j-community-1.6.0.alpha.4-java/lib/neo4j-community/jars/scala-library-2.9.0-1.jar
47
- 2012-01-13 09:00:50.511+0100: [loader.0] file:/home/andreas/.rvm/gems/jruby-1.6.5/gems/neo4j-community-1.6.0.alpha.4-java/lib/neo4j-community/jars/lucene-core-3.1.0.jar
48
- 2012-01-13 09:00:50.511+0100: [bootstrap] /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/charsets.jar
49
- 2012-01-13 09:00:50.511+0100: [loader.0] file:/home/andreas/.rvm/gems/jruby-1.6.5/gems/neo4j-community-1.6.0.alpha.4-java/lib/neo4j-community/jars/neo4j-jmx-1.6.M02.jar
50
- 2012-01-13 09:00:50.511+0100: [loader.0] file:/home/andreas/.rvm/gems/jruby-1.6.5/gems/neo4j-community-1.6.0.alpha.4-java/lib/neo4j-community/jars/org.apache.servicemix.bundles.jline-0.9.94_1.jar
51
- 2012-01-13 09:00:50.511+0100: [loader.2] file:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/sunjce_provider.jar
52
- 2012-01-13 09:00:50.511+0100: [loader.0] file:/home/andreas/.rvm/gems/jruby-1.6.5/gems/neo4j-community-1.6.0.alpha.4-java/lib/neo4j-community/jars/neo4j-udc-1.6.M02.jar
53
- 2012-01-13 09:00:50.511+0100: [loader.0] file:/home/andreas/.rvm/gems/jruby-1.6.5/gems/json-1.6.4-java/lib/json/ext/generator.jar
54
- 2012-01-13 09:00:50.511+0100: [loader.0] file:/home/andreas/.rvm/gems/jruby-1.6.5/gems/neo4j-community-1.6.0.alpha.4-java/lib/neo4j-community/jars/server-api-1.6.M02.jar
55
- 2012-01-13 09:00:50.511+0100: [loader.0] file:/home/andreas/.rvm/gems/jruby-1.6.5/gems/json-1.6.4-java/lib/json/ext/parser.jar
56
- 2012-01-13 09:00:50.511+0100: [bootstrap] /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/jsse.jar
57
- 2012-01-13 09:00:50.511+0100: [bootstrap] /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/jce.jar
58
- 2012-01-13 09:00:50.511+0100: [bootstrap] /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/resources.jar
59
- 2012-01-13 09:00:50.511+0100: [bootstrap] /usr/lib/jvm/java-6-sun-1.6.0.26/jre/classes
60
- 2012-01-13 09:00:50.511+0100: [bootstrap] /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/sunrsasign.jar
61
- 2012-01-13 09:00:50.511+0100: [loader.1] file:/home/andreas/projects/neo4j/lib/
62
- 2012-01-13 09:00:50.511+0100: [loader.0] file:/home/andreas/.rvm/gems/jruby-1.6.5/gems/neo4j-community-1.6.0.alpha.4-java/lib/neo4j-community/jars/geronimo-jta_1.1_spec-1.1.1.jar
63
- 2012-01-13 09:00:50.511+0100: [loader.0] file:/home/andreas/.rvm/gems/jruby-1.6.5/gems/neo4j-community-1.6.0.alpha.4-java/lib/neo4j-community/jars/neo4j-graph-matching-1.6.M02.jar
64
- 2012-01-13 09:00:50.511+0100: [loader.2] file:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/sunpkcs11.jar
65
- 2012-01-13 09:00:50.511+0100: Library Path:
66
- 2012-01-13 09:00:50.512+0100: /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/server
67
- 2012-01-13 09:00:50.512+0100: /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64
68
- 2012-01-13 09:00:50.512+0100: /usr/lib/jvm/java-6-sun-1.6.0.26/lib/amd64
69
- 2012-01-13 09:00:50.512+0100: /usr/java/packages/lib/amd64
70
- 2012-01-13 09:00:50.512+0100: /usr/lib64
71
- 2012-01-13 09:00:50.512+0100: /lib64
72
- 2012-01-13 09:00:50.512+0100: /lib
73
- 2012-01-13 09:00:50.512+0100: /usr/lib
74
- 2012-01-13 09:00:50.515+0100: Garbage Collector: PS Scavenge: [PS Eden Space, PS Survivor Space]
75
- 2012-01-13 09:00:50.515+0100: Garbage Collector: PS MarkSweep: [PS Eden Space, PS Survivor Space, PS Old Gen, PS Perm Gen]
76
- 2012-01-13 09:00:50.516+0100: Memory Pool: Code Cache (Non-heap memory): committed=4.13 MB, used=3.89 MB, max=48.00 MB, threshold=0.00 B
77
- 2012-01-13 09:00:50.516+0100: Memory Pool: PS Eden Space (Heap memory): committed=152.88 MB, used=92.51 MB, max=158.06 MB, threshold=?
78
- 2012-01-13 09:00:50.516+0100: Memory Pool: PS Survivor Space (Heap memory): committed=3.81 MB, used=2.09 MB, max=3.81 MB, threshold=?
79
- 2012-01-13 09:00:50.516+0100: Memory Pool: PS Old Gen (Heap memory): committed=41.25 MB, used=12.60 MB, max=333.38 MB, threshold=0.00 B
80
- 2012-01-13 09:00:50.516+0100: Memory Pool: PS Perm Gen (Non-heap memory): committed=29.38 MB, used=29.28 MB, max=82.00 MB, threshold=0.00 B
81
- 2012-01-13 09:00:50.517+0100: VM Arguments: [-Djruby.memory.max=500m, -Djruby.stack.max=2048k, -Xmx500m, -Xss2048k, -Djffi.boot.library.path=/home/andreas/.rvm/rubies/jruby-1.6.5/lib/native/i386-Linux:/home/andreas/.rvm/rubies/jruby-1.6.5/lib/native/ppc-Linux:/home/andreas/.rvm/rubies/jruby-1.6.5/lib/native/x86_64-Linux, -Xbootclasspath/a:/home/andreas/.rvm/rubies/jruby-1.6.5/lib/jruby.jar, -Djruby.home=/home/andreas/.rvm/rubies/jruby-1.6.5, -Djruby.lib=/home/andreas/.rvm/rubies/jruby-1.6.5/lib, -Djruby.script=jruby, -Djruby.shell=/bin/sh]
82
- 2012-01-13 09:00:50.517+0100: System properties:
83
- 2012-01-13 09:00:50.517+0100: jruby.home = /home/andreas/.rvm/rubies/jruby-1.6.5
84
- 2012-01-13 09:00:50.517+0100: sun.boot.library.path = /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64
85
- 2012-01-13 09:00:50.517+0100: path.separator = :
86
- 2012-01-13 09:00:50.517+0100: file.encoding.pkg = sun.io
87
- 2012-01-13 09:00:50.517+0100: sun.java.launcher = SUN_STANDARD
88
- 2012-01-13 09:00:50.517+0100: user.country = US
89
- 2012-01-13 09:00:50.517+0100: sun.os.patch.level = unknown
90
- 2012-01-13 09:00:50.517+0100: user.dir = /home/andreas/projects/neo4j/lib
91
- 2012-01-13 09:00:50.517+0100: sun.jnu.encoding = UTF-8
92
- 2012-01-13 09:00:50.517+0100: jruby.memory.max = 500m
93
- 2012-01-13 09:00:50.517+0100: sun.management.compiler = HotSpot 64-Bit Tiered Compilers
94
- 2012-01-13 09:00:50.517+0100: jffi.boot.library.path = /home/andreas/.rvm/rubies/jruby-1.6.5/lib/native/i386-Linux:/home/andreas/.rvm/rubies/jruby-1.6.5/lib/native/ppc-Linux:/home/andreas/.rvm/rubies/jruby-1.6.5/lib/native/x86_64-Linux
95
- 2012-01-13 09:00:50.517+0100: user.home = /home/andreas
96
- 2012-01-13 09:00:50.517+0100: user.timezone = Europe/Stockholm
97
- 2012-01-13 09:00:50.517+0100: file.encoding = UTF-8
98
- 2012-01-13 09:00:50.517+0100: jruby.script = jruby
99
- 2012-01-13 09:00:50.517+0100: jruby.stack.max = 2048k
100
- 2012-01-13 09:00:50.517+0100: user.name = andreas
101
- 2012-01-13 09:00:50.517+0100: jruby.shell = /bin/sh
102
- 2012-01-13 09:00:50.517+0100: sun.java.command = org.jruby.Main /home/andreas/.rvm/rubies/jruby-1.6.5/bin/irb
103
- 2012-01-13 09:00:50.517+0100: sun.arch.data.model = 64
104
- 2012-01-13 09:00:50.517+0100: user.language = en
105
- 2012-01-13 09:00:50.518+0100: file.separator = /
106
- 2012-01-13 09:00:50.518+0100: sun.io.unicode.encoding = UnicodeLittle
107
- 2012-01-13 09:00:50.518+0100: sun.cpu.endian = little
108
- 2012-01-13 09:00:50.518+0100: jruby.lib = /home/andreas/.rvm/rubies/jruby-1.6.5/lib
109
- 2012-01-13 09:00:50.518+0100: sun.desktop = gnome
110
- 2012-01-13 09:00:50.518+0100: sun.cpu.isalist =
111
- 2012-01-13 09:00:50.518+0100: Neo4j Kernel properties:
112
- 2012-01-13 09:00:50.518+0100: store_dir=/home/andreas/projects/neo4j/lib/db
113
- 2012-01-13 09:00:50.518+0100: logical_log=/home/andreas/projects/neo4j/lib/db/nioneo_logical.log
114
- 2012-01-13 09:00:50.518+0100: online_backup_enabled=NO
115
- 2012-01-13 09:00:50.518+0100: ha.machine_id=2
116
- 2012-01-13 09:00:50.518+0100: enable_rules=YES
117
- 2012-01-13 09:00:50.518+0100: min_node_cache_size=0
118
- 2012-01-13 09:00:50.518+0100: neostore.relationshipstore.db.mapped_memory=50M
119
- 2012-01-13 09:00:50.518+0100: node_auto_indexing=false
120
- 2012-01-13 09:00:50.518+0100: neostore.nodestore.db.mapped_memory=25M
121
- 2012-01-13 09:00:50.518+0100: min_relationship_cache_size=0
122
- 2012-01-13 09:00:50.518+0100: ha.db=NO
123
- 2012-01-13 09:00:50.518+0100: max_relationship_cache_size=3500
124
- 2012-01-13 09:00:50.518+0100: use_adaptive_cache=YES
125
- 2012-01-13 09:00:50.518+0100: adaptive_cache_heap_ratio=0.77
126
- 2012-01-13 09:00:50.518+0100: identity_map=NO
127
- 2012-01-13 09:00:50.518+0100: adaptive_cache_manager_decrease_ratio=1.15
128
- 2012-01-13 09:00:50.518+0100: timestamps=YES
129
- 2012-01-13 09:00:50.518+0100: use_memory_mapped_buffers=true
130
- 2012-01-13 09:00:50.518+0100: rebuild_idgenerators_fast=true
131
- 2012-01-13 09:00:50.518+0100: ha.zoo_keeper_servers=localhost:2181,localhost:2182,localhost:2183
132
- 2012-01-13 09:00:50.518+0100: neostore.propertystore.db.index.keys.mapped_memory=1M
133
- 2012-01-13 09:00:50.518+0100: max_node_cache_size=1500
134
- 2012-01-13 09:00:50.518+0100: neostore.propertystore.db.strings.mapped_memory=130M
135
- 2012-01-13 09:00:50.519+0100: neostore.propertystore.db.arrays.mapped_memory=130M
136
- 2012-01-13 09:00:50.519+0100: neo_store=/home/andreas/projects/neo4j/lib/db/neostore
137
- 2012-01-13 09:00:50.519+0100: adaptive_cache_worker_sleep_time=3000
138
- 2012-01-13 09:00:50.519+0100: neostore.propertystore.db.index.mapped_memory=1M
139
- 2012-01-13 09:00:50.519+0100: create=true
140
- 2012-01-13 09:00:50.519+0100: adaptive_cache_manager_increase_ratio=1.1
141
- 2012-01-13 09:00:50.519+0100: enable_remote_shell=port=9332
142
- 2012-01-13 09:00:50.519+0100: neostore.propertystore.db.mapped_memory=90M
143
- 2012-01-13 09:00:50.519+0100: relationship_auto_indexing=false
144
- 2012-01-13 09:00:50.519+0100: storage_path=db
145
- 2012-01-13 09:00:50.519+0100: ha.server=localhost:6002
146
- 2012-01-13 09:00:50.519+0100: migration_thread=NO
147
- 2012-01-13 09:00:50.519+0100: Storage files:
148
- 2012-01-13 09:00:50.519+0100: neostore.relationshiptypestore.db.names: 38.00 B
149
- 2012-01-13 09:00:50.519+0100: neostore.id: 9.00 B
150
- 2012-01-13 09:00:50.519+0100: neostore.relationshiptypestore.db.names.id: 9.00 B
151
- 2012-01-13 09:00:50.519+0100: neostore.nodestore.db.id: 9.00 B
152
- 2012-01-13 09:00:50.519+0100: nioneo_logical.log.1: 16.00 B
153
- 2012-01-13 09:00:50.520+0100: neostore.propertystore.db.index: 0.00 B
154
- 2012-01-13 09:00:50.520+0100: neostore.propertystore.db.strings.id: 9.00 B
155
- 2012-01-13 09:00:50.520+0100: nioneo_logical.log.active: 4.00 B
156
- 2012-01-13 09:00:50.520+0100: neostore.propertystore.db.strings: 128.00 B
157
- 2012-01-13 09:00:50.520+0100: neostore.relationshiptypestore.db.id: 9.00 B
158
- 2012-01-13 09:00:50.520+0100: neostore: 54.00 B
159
- 2012-01-13 09:00:50.520+0100: neostore.nodestore.db: 9.00 B
160
- 2012-01-13 09:00:50.520+0100: neostore.propertystore.db.index.keys.id: 9.00 B
161
- 2012-01-13 09:00:50.520+0100: neostore.propertystore.db.arrays.id: 9.00 B
162
- 2012-01-13 09:00:50.520+0100: messages.log: 9.38 kB
163
- 2012-01-13 09:00:50.520+0100: neostore.relationshipstore.db.id: 9.00 B
164
- 2012-01-13 09:00:50.520+0100: neostore.propertystore.db.arrays: 128.00 B
165
- 2012-01-13 09:00:50.520+0100: neostore.relationshipstore.db: 0.00 B
166
- 2012-01-13 09:00:50.520+0100: neostore.propertystore.db.index.id: 9.00 B
167
- 2012-01-13 09:00:50.520+0100: neostore.propertystore.db.id: 9.00 B
168
- 2012-01-13 09:00:50.520+0100: neostore.propertystore.db: 0.00 B
169
- 2012-01-13 09:00:50.520+0100: index:
170
- 2012-01-13 09:00:50.521+0100: lucene-store.db: 32.00 B
171
- 2012-01-13 09:00:50.521+0100: lucene.log.1: 16.00 B
172
- 2012-01-13 09:00:50.521+0100: lucene.log.active: 4.00 B
173
- 2012-01-13 09:00:50.521+0100: - Total: 52.00 B
174
- 2012-01-13 09:00:50.521+0100: tm_tx_log.1: 0.00 B
175
- 2012-01-13 09:00:50.521+0100: neostore.relationshiptypestore.db: 0.00 B
176
- 2012-01-13 09:00:50.521+0100: lock: 0.00 B
177
- 2012-01-13 09:00:50.521+0100: active_tx_log: 11.00 B
178
- 2012-01-13 09:00:50.521+0100: neostore.propertystore.db.index.keys: 38.00 B
179
- 2012-01-13 09:00:50.521+0100: Id usage:
180
- 2012-01-13 09:00:50.521+0100: NodeStore: used=1 high=0
181
- 2012-01-13 09:00:50.522+0100: RelationshipStore: used=0 high=-1
182
- 2012-01-13 09:00:50.522+0100: RelationshipTypeStore: used=0 high=-1
183
- 2012-01-13 09:00:50.522+0100: PropertyStore: used=0 high=-1
184
- 2012-01-13 09:00:50.522+0100: PropertyIndexStore: used=0 high=-1
185
- 2012-01-13 09:00:50.522+0100: StringPropertyStore: used=1 high=0
186
- 2012-01-13 09:00:50.522+0100: ArrayPropertyStore: used=1 high=0
187
- 2012-01-13 09:00:50.525+0100: Schedulers: none
188
- none
189
- none
190
- none
191
- none
192
- none
193
- none
194
- none
195
- none
196
- none
197
- none
198
- none
199
- none
200
- none
201
- none
202
- none
203
- none
204
- none
205
- none
206
- none
207
- none
208
- none
209
- none
210
- none
211
- noop deadline [cfq]
212
- noop deadline [cfq]
213
-
214
- 2012-01-13 09:00:50.525+0100: --- CONFIGURATION END ---
215
- 2012-01-13 09:00:50.827+0100: Extension org.neo4j.kernel.KernelExtension[shell] loaded ok
216
- 2012-01-13 09:00:50.901+0100: Extension org.neo4j.kernel.KernelExtension[kernel jmx] loaded ok
217
- 2012-01-13 09:00:50.903+0100: Extension org.neo4j.kernel.KernelExtension[kernel udc] loaded ok
218
- 2012-01-13 09:43:49.270+0100: Closed log /home/andreas/projects/neo4j/lib/db/nioneo_logical.log
219
- 2012-01-13 09:43:49.362+0100: NeoStore closed
220
- 2012-01-13 09:43:49.367+0100: Closed log /home/andreas/projects/neo4j/lib/db/index/lucene.log
221
- 2012-01-13 09:43:49.367+0100: NeoStore closed
222
- 2012-01-13 09:43:49.374+0100: TM shutting down
Binary file
Binary file
Binary file
@@ -1 +0,0 @@
1
- RelationshipStore v0.A.0
@@ -1 +0,0 @@
1
- RelationshipTypeStore v0.A.0
Binary file