Re: [Neo4j] Modelling with neo4j

2011-09-28 Thread Peter Neubauer
Great Bryce,
Let us know if it could work out!

/peter

Sent from my phone.
On Sep 28, 2011 5:38 AM, Bryce bryc...@gmail.com wrote:
 Following up on the part of this discussion about moving the enhanced api
 out of the graph collections module, was meaning to get to this earlier
but
 got side tracked.

 The dependency that IndexedRelationship had on the ComparablePropertyType
 which I am assuming is what you are referring to there no longer exists.
 PropertySortedTree still has a dependency on ComparablePropertyType but
 this collection could be taken along with the enhanced api as a
 specialisation of the SortedTree collection specific to the enhanced api.
 As it still implements NodeCollection it can be used as the basis of an
 IndexedRelationship, but IndexedRelationship doesn't need to know about it
 at all.

 I am wondering however whether there is a problem with this as one thing I
 just realised isn't happening that previously did is the storage of
 the property type into the node collection, and for that matter
 PropertySortedTree currently has no node only constructor so wouldn't
 currently work correctly I will look into that (hadn't done that since
I
 haven't even had a good look at the enhanced api yet).

 On Sun, Sep 25, 2011 at 3:28 AM, Niels Hoogeveen
 pd_aficion...@hotmail.comwrote:


 +1
 Enhanced API grew out of a couple of classes I added to make
 IndexedRelationship work more easily (not exposing comparators), but it
is
 essentially a separate component. Giving it that status would help
other's
 improve it. Having laid some of the ground work, I feel it needs other
 people's input too. As it stands now, it is very much a one-man's work
and
 while I am confident it contains plenty of good ideas, it can only grow
with
 the input of other developers, just like IndexedRelationships has become
 much better thanks to the work Bryce put into it, and the work of others
to
 include graph-collections with structures I would not even have thought
 about.
 There is however one thing we need to look at. Right now
IndexRelationships
 has a dependency on Enhanced API for the indexing of nodes based on a
 property. At the same time Enhanced API has a dependency on
 graph-collections, transparently supporting IndexedRelationships in the
API.
 I think it would be best to remove the dependency of graph-collections on
 enhanced-api and only offer the slightly more complex option where the
user
 needs to provide a comparator. The other dependency can remain and in
fact
 can even be made stronger. Enhanced API could in principle be made to
 support any type of collection, now that Bryce has added a generic
 nodecollection interface.
 I agree enhanced api is not a great name, it says what it does, but
 certainly has little appeal. So I will be happy if someone can come up
with
 something sexier.
 Niels
  From: peter.neuba...@neotechnology.com
  Date: Sat, 24 Sep 2011 15:42:13 +0200
  To: user@lists.neo4j.org
  Subject: Re: [Neo4j] Modelling with neo4j
 
  Great thoughts guys!
  I think it would be interesting to break out the Enhanced API from
  graph-collections, rename it into something better (we can think of a
  name together) and provide a more fully fledged example that we can
  document and evolve.
 
  WDYT?
 
  Cheers,
 
  /peter neubauer
 
  GTalk: neubauer.peter
  Skype peter.neubauer
  Phone +46 704 106975
  LinkedIn http://www.linkedin.com/in/neubauer
  Twitter http://twitter.com/peterneubauer
 
  http://www.neo4j.org - Your high performance graph
 database.
  http://startupbootcamp.org/ - Öresund - Innovation happens HERE.
  http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
 
 
 
  On Sat, Sep 24, 2011 at 3:37 PM, Rick Bullotta
  rick.bullo...@thingworx.com wrote:
   That's a great summary, Niels. Very similar to how we've applied
Neo4J
 here at ThingWorx, though we've done most of the type system work (nodes
and
 relationships are all typed/subtyped) in our application domain layer. A
 few other items that we leveraged in our implementation that you may wish
to
 consider:
  
   - A common pattern we encountered was a collection of typed
entities
 (e.g. a typed collection), and we implemented a specific model using
 supernodes for this. This also allowed us to rapidly and easily
 iterate/search collections and also to organize nodes in a human
 comprehensible way that can be readily viewed with something like
Neoclipse
 for troubleshooting purposes. Also, if the type was truck, we stamped
the
 node with the type truck as a property (using enumerations with a
custom
 int member) and used that same enum as the relationship type between the
 node and the collection node. In our model, an entity has a single
type,
 but we implemented the concept of supertyping/subtyping in our domain
model
  
   - We found quite a few examples where a one-way relationship was
more
 than adequate and, instead of incurring the overhead of a relationship
 (particularly when millions of these 

Re: [Neo4j] Rebuilding Lucene index

2011-09-28 Thread Peter Neubauer
Good,
thanks for reporting back Rama!

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Fri, Sep 23, 2011 at 1:16 AM, Rama Manusama rama.manus...@gmail.com wrote:
 Hi all,

 Would like to confirm that the problem got somewhat solved after it tried to
 perform CheckIndex -fix on every lucene index folder. Unfortunately I could
 not investigate which 'corrupted' index did the tool delete, therefore a
 'complete' index rebuilding would be a good last option in this case. Anyway
 knowing that such tool exist is already a big step ahead.

 Thanks for everything!
 Rama






 On Mon, Sep 19, 2011 at 1:59 AM, Rama Manusama rama.manus...@gmail.comwrote:

 No problem, you could download it here
 https://docs.google.com/leaf?id=0B4qYoS7piZ7PNDdhNzkzMWEtMWMyYS00MWNmLWI3YzktYjFiZjllMzk0MzA2hl=en_US

 Thanks,
 Rama


 On Mon, Sep 19, 2011 at 12:32 AM, Michael Hunger 
 michael.hun...@neotechnology.com wrote:

 Sorry the mailing list eats attachments, can you copy it in the mail or
 make it available somewhere?

 Thanks

 Michael

 Am 18.09.2011 um 23:32 schrieb Rama Manusama:

  True, I reproduced the error again just now, messages.log is attached
 
  Thanks and cheers,
  Rama
 
  On Sun, Sep 18, 2011 at 11:14 PM, Mattias Persson 
 matt...@neotechnology.com
  wrote:
 
  I'm guessing the important stack trace regarding the loading of the
 lucene
  index provider is found in my-neo4j-db-folder/messages.log. Could you
 go
  look there?
 
  2011/9/18 Rama Manusama rama.manus...@gmail.com
 
  Hi Michael,
 
  Sure, here you go, thanks!
 
  Sep 18, 2011 9:37:39 PM
 org.neo4j.kernel.impl.transaction.TransactionImpl
  doBeforeCompletion
  WARNING: Caught exception from tx
 
 
 
 syncronization[org.neo4j.kernel.impl.core.TransactionEventsSyncHook@1531a989
  ]
  beforeCompletion()
  java.lang.RuntimeException: org.jruby.exceptions.RaiseException:
 Native
  Exception: 'class java.lang.IllegalArgumentException'; Message: No
 index
  provider 'lucene' found; StackTrace:
 java.lang.IllegalArgumentException:
  No
  index provider 'lucene' found
    at
 
 
 
 org.neo4j.kernel.IndexManagerImpl.getIndexProvider(IndexManagerImpl.java:76)
    at
 
 
 
 org.neo4j.kernel.IndexManagerImpl.findIndexConfig(IndexManagerImpl.java:116)
    at
 
 
 
 org.neo4j.kernel.IndexManagerImpl.getOrCreateIndexConfig(IndexManagerImpl.java:178)
    at
 
 
 
 org.neo4j.kernel.IndexManagerImpl.getOrCreateNodeIndex(IndexManagerImpl.java:267)
    at
  org.neo4j.kernel.IndexManagerImpl.forNodes(IndexManagerImpl.java:255)
 
     at
 
 
 
 org.neo4j.kernel.impl.core.TransactionEventsSyncHook.beforeCompletion(TransactionEventsSyncHook.java:95)
    at
 
 
 
 org.neo4j.kernel.impl.transaction.TransactionImpl.doBeforeCompletion(TransactionImpl.java:356)
    at
  org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:635)
    at
 
 
 
 org.neo4j.kernel.impl.transaction.TransactionImpl.commit(TransactionImpl.java:109)
    at
 
 org.neo4j.kernel.TopLevelTransaction.finish(TopLevelTransaction.java:85)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
 
 
 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at
 
 
 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at
 
 
 
 org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:508)
    at
 org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:368)
    at
 
 
 
 org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:50)
    at
 
 
 
 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:292)
    at
 
 org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:135)
    at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:63)
    at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
    at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
    at
 
 
 org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
    at
 
 
 
 org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:147)
    at
 
 
 
 org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:163)
    at
 
 
 
 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:292)
    at
 
 org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:135)
    at org.jruby.ast.VCallNode.interpret(VCallNode.java:86)
    at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
    at org.jruby.ast.EnsureNode.interpret(EnsureNode.java:98)
    at 

Re: [Neo4j] Some questions about design when using neo4j

2011-09-28 Thread Peter Neubauer
Gen,
I guess there is nothing out of the box right now, but you could get
inspiration from http://jung.sourceforge.net/doc/api/index.html,
especially 
http://jung.sourceforge.net/doc/api/edu/uci/ics/jung/algorithms/flows/EdmondsKarpMaxFlow.html
and implement one or just use it on a toy graph to test it out?

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Sat, Sep 3, 2011 at 12:33 AM, Benjamin Gustafsson
benjamingustafs...@gmail.com wrote:
 Just in case there are any graph experts out there that want to exercise
 their brains. (Its quite a while since I studied algorithms and optimization
 regarding graphs. :-)

 I'm able to implement a algorithm described in pseudocode (if anyone knows a
 good algorithm for my special case below).

 I have the transportation problem and need to find a preferably small (not
 necessarily smallest) set of nodes that transports a certain amount of
 credit/commodity from source node S to sink node T. All edges have a
 capacity stated as a attribute for the edge, this can be read while
 traversing the graph. Transportation cost for commodity/credit in the graph
 is zero. The only cost in this graph problem is computation time to *find a
 set of paths delivering all the commodity*(in my case credit). The path
 lengths chosen are not important.

 (This is the standard ripplepay problem, but I didn't like the algorithms
 used by the original ripplepay implementation. It does not scale up to
 millions of users. It is not fast enough.)

 http://en.wikipedia.org/wiki/Transportation_network_%28graph_theory%29

 And I also need a quick way of analysing if it is possible to send all
 commodity across the network. If the amount commodity to be sent is lower
 than max flow. (lower than min cut). There will initially be clusters with
 very few edges connecting the clusters. If the nodes are in different
 clusters the min cut can be really easy/*quick* to find (if we do it the
 right way).

 http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem

 Any implementations for neo4j already available regarding my special case?

 --
 //Benjamin Gustafsson
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] REST API Base URI

2011-09-28 Thread Jacob Hansson
On Tue, Sep 27, 2011 at 11:29 PM, Nuo Yan yan@gmail.com wrote:

 Hi Jake,

 Thanks for your reply.

 Sorry if my previous email was misleading, but I don't absolutely need
 key-based authentication; that just turned out to be the what I first
 thought of. I was trying to figure out what authentication methods were
 supported so that I can evaluate. HTTPS + basic auth with strong passwords
 do sound good to me at this moment. However, at this moment, instead of
 using authentication, I turned out configured security rules on my the
 neo4j
 server to only take connections from my app server so I temporarily don't
 have a problem in the near future. But it's good to know about the
 authentication extension.

 By the way, do you have any data about the performance impact of using the
 authentication extension to do basic auth + HTTPS compare to talking to
 neo4j without authentication (both through REST)? If you have such data,
 please let me know. That would be very helpful information.


I'm afraid not. However, as long as you make sure to reuse TCP connections
(Connection:keep-alive), the overhead of https should be minimal. While the
same does not apply for basic auth, it should not add a significant
performance overhead compared to normal REST.

/Jake



 Thanks,
 Nuo



 On Tue, Sep 27, 2011 at 6:10 AM, Jacob Hansson 
 jacob.hans...@neotechnology.com wrote:

  As far as I know, the auth plugin currently only supports HTTP BASIC
  authentication. But it would be interesting to expand it to allow other
  authentication methods, for instance by allowing pluggable authentication
  providers.
 
  So if I understand your question correctly, yes, it does support
  authentication beyond just limiting access by IP, but it does not support
  authentication using keys or certificates.
 
  Out of curiosity, what is the driver behind needing key-based
  authentication? The combination of HTTP BASIC, strong passwords and HTTPS
  seems like it would supply quite strong security, no?
 
  /Jake
 
  On Wed, Sep 21, 2011 at 9:16 PM, Nuo Yan yan@gmail.com wrote:
 
   Limiting access to certain URIs or IPs is great, but ideally at this
  moment
   I also need something like a key-based authentication so I can send a
   private key in the headers from my restclient and neo4j would
  authenticate
   and only take authenticated requests. Does the authentication extension
   support key-based authentication? If not, what forms of authentication
  does
   it currently support (user/password, token-based, shared-secret)?
  
   Thanks,
   Nuo
  
   On Wed, Sep 21, 2011 at 11:24 AM, Peter Neubauer 
   peter.neuba...@neotechnology.com wrote:
  
Nuo,
Thomas Baum has been working on an authentication extension for Neo4j
Server, see https://github.com/neo4j/authentication-extension. He
could help you set it up and test it - it's used in hosting scenarios
and should do what you want in terms of limiting access to certain
URIs if that is what you want?
   
Cheers,
   
/peter neubauer
   
GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer
   
http://www.neo4j.org   - Your high performance graph
   database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing
  party.
   
   
   
On Wed, Sep 21, 2011 at 6:14 PM, Nuo Yan yan@gmail.com wrote:
 For my scenario, I currently only use the LB for request
   authentication,
so
 that not everyone on the network can access the neo4j server. In my
  use
 case, I think making the base uri configurable (including the
  protocol,
e.g.
 https://foobar.com/) is enough.

 There are a couple other approaches that may also solve my problem.
  For
 example, having a configurable option to make the REST APIs return
  only
 relative paths in the result. Or, if neo4j could have a built-in
   request
 authentication mechanism for the REST interface, I may be able to
 get
   rid
of
 the lb completely.


 On Wed, Sep 21, 2011 at 7:04 AM, Peter Neubauer 
 peter.neuba...@neotechnology.com wrote:

 Nuo,
 right now the server is discovering its own IP upon startup.
  However,
 it sounds reasonable to return configurable base URL. I am just
 wondering if that really is enough to support a LB scenario? Do
 you
 need more stuff there?

 Cheers,

 /peter neubauer

 GTalk:  neubauer.peter
 Skype   peter.neubauer
 Phone   +46 704 106975
 LinkedIn   http://www.linkedin.com/in/neubauer
 Twitter  http://twitter.com/peterneubauer

 http://www.neo4j.org   - Your high performance graph
database.
 http://startupbootcamp.org/- Öresund - Innovation happens
 HERE.

Re: [Neo4j] cypher variable relationships

2011-09-28 Thread F. De Haes
Hi Michael,

I'm not using the latest snapshot but neo4j-community-1.5.M01, and neither *
or ^ work there. I thought maybe it was because my relationship contains a
blank space and thus is within ``. Anyway, it's not a big deal at the
moment.

Thanks anyway,
Filip

2011/9/28 Michael Hunger michael.hun...@neotechnology.com

 There was a syntax change in the current snapshot from using the caret ^ to
 a star *

 Cheers

 Michael

 Am 27.09.2011 um 11:29 schrieb F. De Haes:

  Hi all,
 
  I tried this cypher query both in the console of the stable and in the
  milestone release, but it produces the same error:
 
  start a=(123) match b-[:`Runs on`^1..3]-a return distinct b
 
  == `]' expected but `^' found
 
  Thanks for your help,
 
  Filip
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] cypher variable relationships

2011-09-28 Thread Peter Neubauer
Ok,
1.5 is coming out in some week, so stay tuned, things will work then
as seen in the appropriate manual edition.

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Wed, Sep 28, 2011 at 10:33 AM, F. De Haes fi...@nibewege.org wrote:
 Hi Michael,

 I'm not using the latest snapshot but neo4j-community-1.5.M01, and neither *
 or ^ work there. I thought maybe it was because my relationship contains a
 blank space and thus is within ``. Anyway, it's not a big deal at the
 moment.

 Thanks anyway,
 Filip

 2011/9/28 Michael Hunger michael.hun...@neotechnology.com

 There was a syntax change in the current snapshot from using the caret ^ to
 a star *

 Cheers

 Michael

 Am 27.09.2011 um 11:29 schrieb F. De Haes:

  Hi all,
 
  I tried this cypher query both in the console of the stable and in the
  milestone release, but it produces the same error:
 
  start a=(123) match b-[:`Runs on`^1..3]-a return distinct b
 
  == `]' expected but `^' found
 
  Thanks for your help,
 
  Filip
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] InvalidRecordException: Record[1983624] not in useRecord[1983624] not in use

2011-09-28 Thread René Pickhardt
hey everyone

I got a strange error message that a record is not in use if I call
hasRelationship() function even though I checked against null before! My
real purpose was to start the traverser but it exited with the same error
message. That is why I put the n.hasRelationship which also would not work.

I imported a graph with 50 mio. nodes and about the same size of
relationships. (though I am about to import more relationships later on) I
put 2 mio. nodes in a lucence index called article.

the counting variable t has the value 2385 (so the first 2385 calls work
fine) if I skip this node the same problem accoures again at t = 3239.

maybe it is usefull to say that I inserted the graph using the batch
inserter.

IndexHitsNode res = article.get(key, values[0]);
if (res!=null){
Node n = res.getSingle();
 if (n!=null){
if (n.hasRelationship(DynamicRelationshipType.withName( UPDATE ),
Direction.BOTH)){
 //n.traverse(Order.BREADTH_FIRST,StopEvaluator.DEPTH_ONE,
ReturnableEvaluator.ALL_BUT_START_NODE,DynamicRelationshipType.withName(
UPDATE ) );
 t++;
}
}

callstack:

org.neo4j.kernel.impl.nioneo.store.InvalidRecordException: Record[1983624]
not in useRecord[1983624] not in use

at
org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.java:230)
 at
org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:337)
at
org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:114)
 at
org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:97)
at
org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:108)
 at
org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:603)
at
org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:351)
 at
org.neo4j.kernel.impl.core.NodeImpl.loadInitialRelationships(NodeImpl.java:318)
at
org.neo4j.kernel.impl.core.NodeImpl.ensureRelationshipMapNotNull(NodeImpl.java:305)
 at
org.neo4j.kernel.impl.core.NodeImpl.getAllRelationshipsOfType(NodeImpl.java:156)
at org.neo4j.kernel.impl.core.NodeImpl.getRelationships(NodeImpl.java:236)
 at org.neo4j.kernel.impl.core.NodeImpl.hasRelationship(NodeImpl.java:576)
at org.neo4j.kernel.impl.core.NodeProxy.hasRelationship(NodeProxy.java:109)
 at IndexEvaluation.GenerateStreams(IndexEvaluation.java:124)
at IndexEvaluation.init(IndexEvaluation.java:98)
 at EntryPoint.main(EntryPoint.java:20)

-- 
--
mobile: +49 (0)176 6433 2481

Skype: +49 (0)6131 / 4958926

Skype: rene.pickhardt

www.rene-pickhardt.de
 http://www.beijing-china-blog.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] RBAC implementation using neo4j

2011-09-28 Thread Dharmendra Kumar
Hi All,

Was little curious if there is already any RBAC implementation using neo4j?
Any pointers/links would be really helpful.

Regards,
Dharmendra.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Current Geoserver integration instructions

2011-09-28 Thread handloomweaver
Hi

Another install question. I was wanting to test Neo4J as a backend for
Geoserver. The Neo4J Spatial docs at: 
seem a little out of date. They say copy ..the following JAR files into the
in the GeoServer directory webapps/geoserver/WEB-INF/lib:

json-simple-1.1.jar
geronimo-jta_1.1_spec-1.1.1.jar
neo4j-kernel-1.2-1.2.M04.jar
neo4j-index-1.2-1.2.M04.jar
neo4j-spatial.jar

These file names have obviously changed, well the bottom three certainly.
And neo4j-index seems to have been deprecated, 'Changes.txt' says Excludes
the neo4j-index component (not used anyhow) to enable HA mode. 

Anyway, could someone give me current instructions and filenames and
locations.

Apologies again for the noobness


--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Current-Geoserver-integration-instructions-tp3375578p3375578.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node

2011-09-28 Thread Johan Svensson
On Thu, Sep 22, 2011 at 2:15 PM, st3ven st3...@web.de wrote:

 Hi Johan,

 I changed the settings as you described, but that changed the speed not
 really significantly.

The previous configuration would make the machine use swap and that
will kill performance.


 To store the degree as a property on each node is an option, but I want the
 node degree to be calculated from the graph database as I also want to check

The problem is that you are trying to access a 85GB+ dataset using
only 16GB RAM. The recommendation then is to aggregate the information
(store the degree count as a property).

Peter also mentioned using HA (cache sharding) but if you can just get
some more RAM into the machine you will see an improvement.

SSD disk would also help here since you are touching all edges in the
graph while a mechanical disk (in this setup) will have horrible
performance ( low throughput with 99% load on disk). There are SSD
solutions that handle terabytes of data today and they are dropping in
price.

Regards,
Johan
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] InvalidRecordException: Record[1983624] not in useRecord[1983624] not in use

2011-09-28 Thread Mattias Persson
Which version of neo4j did you use to import your data, was it a
downloadable package, from maven or building yourself from a branch?

2011/9/28 René Pickhardt r.pickha...@googlemail.com

 hey everyone

 I got a strange error message that a record is not in use if I call
 hasRelationship() function even though I checked against null before! My
 real purpose was to start the traverser but it exited with the same error
 message. That is why I put the n.hasRelationship which also would not work.

 I imported a graph with 50 mio. nodes and about the same size of
 relationships. (though I am about to import more relationships later on) I
 put 2 mio. nodes in a lucence index called article.

 the counting variable t has the value 2385 (so the first 2385 calls work
 fine) if I skip this node the same problem accoures again at t = 3239.

 maybe it is usefull to say that I inserted the graph using the batch
 inserter.

 IndexHitsNode res = article.get(key, values[0]);
 if (res!=null){
 Node n = res.getSingle();
  if (n!=null){
 if (n.hasRelationship(DynamicRelationshipType.withName( UPDATE ),
 Direction.BOTH)){
  //n.traverse(Order.BREADTH_FIRST,StopEvaluator.DEPTH_ONE,
 ReturnableEvaluator.ALL_BUT_START_NODE,DynamicRelationshipType.withName(
 UPDATE ) );
  t++;
 }
 }

 callstack:

 org.neo4j.kernel.impl.nioneo.store.InvalidRecordException: Record[1983624]
 not in useRecord[1983624] not in use

 at

 org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.java:230)
  at

 org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:337)
 at

 org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:114)
  at

 org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:97)
 at

 org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:108)
  at

 org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:603)
 at
 org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:351)
  at

 org.neo4j.kernel.impl.core.NodeImpl.loadInitialRelationships(NodeImpl.java:318)
 at

 org.neo4j.kernel.impl.core.NodeImpl.ensureRelationshipMapNotNull(NodeImpl.java:305)
  at

 org.neo4j.kernel.impl.core.NodeImpl.getAllRelationshipsOfType(NodeImpl.java:156)
 at org.neo4j.kernel.impl.core.NodeImpl.getRelationships(NodeImpl.java:236)
  at org.neo4j.kernel.impl.core.NodeImpl.hasRelationship(NodeImpl.java:576)
 at org.neo4j.kernel.impl.core.NodeProxy.hasRelationship(NodeProxy.java:109)
  at IndexEvaluation.GenerateStreams(IndexEvaluation.java:124)
 at IndexEvaluation.init(IndexEvaluation.java:98)
  at EntryPoint.main(EntryPoint.java:20)

 --
 --
 mobile: +49 (0)176 6433 2481

 Skype: +49 (0)6131 / 4958926

 Skype: rene.pickhardt

 www.rene-pickhardt.de
  http://www.beijing-china-blog.com
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Current Geoserver integration instructions

2011-09-28 Thread Peter Neubauer
Al,
Andreas has a working GeoServer integration with the current Neo4j
Spatial and is just automating this with aWAR version of GeoServer.
Give me some day and I will get back to you with an updated
installation instruction of that is ok?

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Wed, Sep 28, 2011 at 11:58 AM, handloomweaver a...@atomised.coop wrote:
 Hi

 Another install question. I was wanting to test Neo4J as a backend for
 Geoserver. The Neo4J Spatial docs at:
 seem a little out of date. They say copy ..the following JAR files into the
 in the GeoServer directory webapps/geoserver/WEB-INF/lib:

 json-simple-1.1.jar
 geronimo-jta_1.1_spec-1.1.1.jar
 neo4j-kernel-1.2-1.2.M04.jar
 neo4j-index-1.2-1.2.M04.jar
 neo4j-spatial.jar

 These file names have obviously changed, well the bottom three certainly.
 And neo4j-index seems to have been deprecated, 'Changes.txt' says Excludes
 the neo4j-index component (not used anyhow) to enable HA mode.

 Anyway, could someone give me current instructions and filenames and
 locations.

 Apologies again for the noobness


 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/Current-Geoserver-integration-instructions-tp3375578p3375578.html
 Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] threads on embeddedGraphDb

2011-09-28 Thread st.pa

hi,

while i was not trying to use threads, everything went fine. now i need 
concurrent java threads to access the same (embedded?) graph database.
neo4j-manual.pdf for 1.4.1 says in section 1.1.2. that i should use 
HighlyAvailableGraphDatabase, which is no longer there in 1.5.1 as it 
seems. i have not looked into server and rest api yet, so is there a way 
to do a threaded app with say a queue thread and n worker threads inside 
the jvm that all do their own transactions on the same database 
location? the following exception is what i got for assigning the queue 
thread's embedded db to the worker threads, i guess.

Exception in thread Thread-6 java.lang.RuntimeException: 
java.nio.channels.ClosedByInterruptException
at 
org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:603)
at 
org.neo4j.index.impl.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:486)
at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:248)
at 
org.neo4j.index.impl.lucene.LuceneIndex$RelationshipIndex.get(LuceneIndex.java:480)
at de.stp.DatabaseNeo4j.removeUrlQueue(DatabaseNeo4j.java:777)
at de.stp.util.BufferNeo4j.next(BufferNeo4j.java:194)
at de.stp.RoboNeo4j.nächsterSchritt(RoboNeo4j.java:452)
at de.stp.RoboNeo4j.run(RoboNeo4j.java:436)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.nio.channels.ClosedByInterruptException
at 
java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:184)
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:772)
at 
org.apache.lucene.store.MMapDirectory$MMapIndexInput.init(MMapDirectory.java:225)
at 
org.apache.lucene.store.MMapDirectory$MMapIndexInput.init(MMapDirectory.java:217)
at org.apache.lucene.store.MMapDirectory.openInput(MMapDirectory.java:209)
at 
org.apache.lucene.index.CompoundFileReader.init(CompoundFileReader.java:66)
at 
org.apache.lucene.index.CompoundFileReader.init(CompoundFileReader.java:55)
at org.apache.lucene.index.IndexWriter.getFieldInfos(IndexWriter.java:1193)
at 
org.apache.lucene.index.IndexWriter.getCurrentFieldInfos(IndexWriter.java:1213)
at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1149)
at 
org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:590)
... 8 more

Thx for any ideas.
ciao, st.p.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] RBAC implementation using neo4j

2011-09-28 Thread Peter Neubauer
Dharmendra,
does something like
http://docs.neo4j.org/chunked/snapshot/examples-acl-structures-in-graphs.html
point you in the right direction?

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Wed, Sep 28, 2011 at 11:57 AM, Dharmendra Kumar
dharmendra...@gmail.com wrote:
 Hi All,

 Was little curious if there is already any RBAC implementation using neo4j?
 Any pointers/links would be really helpful.

 Regards,
 Dharmendra.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] RBAC implementation using neo4j

2011-09-28 Thread Dharmendra Kumar
Thanks Peter! I also came across this page after making the post. It is
indeed very helpful and sets a proper direction.

-Dharmendra.

On Wed, Sep 28, 2011 at 5:57 PM, Peter Neubauer 
peter.neuba...@neotechnology.com wrote:

 Dharmendra,
 does something like

 http://docs.neo4j.org/chunked/snapshot/examples-acl-structures-in-graphs.html
 point you in the right direction?

 Cheers,

 /peter neubauer

 GTalk:  neubauer.peter
 Skype   peter.neubauer
 Phone   +46 704 106975
 LinkedIn   http://www.linkedin.com/in/neubauer
 Twitter  http://twitter.com/peterneubauer

 http://www.neo4j.org   - Your high performance graph database.
 http://startupbootcamp.org/- Öresund - Innovation happens HERE.
 http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



 On Wed, Sep 28, 2011 at 11:57 AM, Dharmendra Kumar
 dharmendra...@gmail.com wrote:
  Hi All,
 
  Was little curious if there is already any RBAC implementation using
 neo4j?
  Any pointers/links would be really helpful.
 
  Regards,
  Dharmendra.
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] threads on embeddedGraphDb

2011-09-28 Thread Peter Neubauer
Hi there,
Neo4j in itself is thread safe, so you can pass it around as a
singleton and access it from different Java threads.

The HighlyAvailableGraphDatabase for scaling over multiple machines is
part of neo4j-enterprise, so you need to update your maven
dependencies to change community for enterprise. Does that help?

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Wed, Sep 28, 2011 at 2:26 PM, st.pa st...@web.de wrote:

 hi,

 while i was not trying to use threads, everything went fine. now i need
 concurrent java threads to access the same (embedded?) graph database.
 neo4j-manual.pdf for 1.4.1 says in section 1.1.2. that i should use
 HighlyAvailableGraphDatabase, which is no longer there in 1.5.1 as it
 seems. i have not looked into server and rest api yet, so is there a way
 to do a threaded app with say a queue thread and n worker threads inside
 the jvm that all do their own transactions on the same database
 location? the following exception is what i got for assigning the queue
 thread's embedded db to the worker threads, i guess.

 Exception in thread Thread-6 java.lang.RuntimeException:
 java.nio.channels.ClosedByInterruptException
 at
 org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:603)
 at
 org.neo4j.index.impl.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:486)
 at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:248)
 at
 org.neo4j.index.impl.lucene.LuceneIndex$RelationshipIndex.get(LuceneIndex.java:480)
 at de.stp.DatabaseNeo4j.removeUrlQueue(DatabaseNeo4j.java:777)
 at de.stp.util.BufferNeo4j.next(BufferNeo4j.java:194)
 at de.stp.RoboNeo4j.nächsterSchritt(RoboNeo4j.java:452)
 at de.stp.RoboNeo4j.run(RoboNeo4j.java:436)
 at java.lang.Thread.run(Thread.java:619)
 Caused by: java.nio.channels.ClosedByInterruptException
 at
 java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:184)
 at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:772)
 at
 org.apache.lucene.store.MMapDirectory$MMapIndexInput.init(MMapDirectory.java:225)
 at
 org.apache.lucene.store.MMapDirectory$MMapIndexInput.init(MMapDirectory.java:217)
 at org.apache.lucene.store.MMapDirectory.openInput(MMapDirectory.java:209)
 at
 org.apache.lucene.index.CompoundFileReader.init(CompoundFileReader.java:66)
 at
 org.apache.lucene.index.CompoundFileReader.init(CompoundFileReader.java:55)
 at org.apache.lucene.index.IndexWriter.getFieldInfos(IndexWriter.java:1193)
 at
 org.apache.lucene.index.IndexWriter.getCurrentFieldInfos(IndexWriter.java:1213)
 at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1149)
 at
 org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:590)
        ... 8 more

 Thx for any ideas.
 ciao, st.p.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] threads on embeddedGraphDb

2011-09-28 Thread Mattias Persson
Having multiple threads accessing a neo4j graph database concurrently is
what it's built for. This looks to be an issue with a lucene index.
java.nio.* is very sensitive to thread interrupts, but I've never seen this
exception before. Are you using Thread.interrupt() or some library that
might do that for controlling threads?

2011/9/28 st.pa st...@web.de


 hi,

 while i was not trying to use threads, everything went fine. now i need
 concurrent java threads to access the same (embedded?) graph database.
 neo4j-manual.pdf for 1.4.1 says in section 1.1.2. that i should use
 HighlyAvailableGraphDatabase, which is no longer there in 1.5.1 as it
 seems. i have not looked into server and rest api yet, so is there a way
 to do a threaded app with say a queue thread and n worker threads inside
 the jvm that all do their own transactions on the same database
 location? the following exception is what i got for assigning the queue
 thread's embedded db to the worker threads, i guess.

 Exception in thread Thread-6 java.lang.RuntimeException:
 java.nio.channels.ClosedByInterruptException
 at

 org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:603)
 at

 org.neo4j.index.impl.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:486)
 at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:248)
 at

 org.neo4j.index.impl.lucene.LuceneIndex$RelationshipIndex.get(LuceneIndex.java:480)
 at de.stp.DatabaseNeo4j.removeUrlQueue(DatabaseNeo4j.java:777)
 at de.stp.util.BufferNeo4j.next(BufferNeo4j.java:194)
 at de.stp.RoboNeo4j.nächsterSchritt(RoboNeo4j.java:452)
 at de.stp.RoboNeo4j.run(RoboNeo4j.java:436)
 at java.lang.Thread.run(Thread.java:619)
 Caused by: java.nio.channels.ClosedByInterruptException
 at

 java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:184)
 at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:772)
 at

 org.apache.lucene.store.MMapDirectory$MMapIndexInput.init(MMapDirectory.java:225)
 at

 org.apache.lucene.store.MMapDirectory$MMapIndexInput.init(MMapDirectory.java:217)
 at org.apache.lucene.store.MMapDirectory.openInput(MMapDirectory.java:209)
 at

 org.apache.lucene.index.CompoundFileReader.init(CompoundFileReader.java:66)
 at

 org.apache.lucene.index.CompoundFileReader.init(CompoundFileReader.java:55)
 at org.apache.lucene.index.IndexWriter.getFieldInfos(IndexWriter.java:1193)
 at

 org.apache.lucene.index.IndexWriter.getCurrentFieldInfos(IndexWriter.java:1213)
 at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1149)
 at

 org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:590)
... 8 more

 Thx for any ideas.
 ciao, st.p.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] InvalidRecordException: Record[1983624] not in useRecord[1983624] not in use

2011-09-28 Thread René Pickhardt
Neo1.4.M04 community edition no self build.

2011/9/28 Mattias Persson matt...@neotechnology.com

 Which version of neo4j did you use to import your data, was it a
 downloadable package, from maven or building yourself from a branch?

 2011/9/28 René Pickhardt r.pickha...@googlemail.com

  hey everyone
 
  I got a strange error message that a record is not in use if I call
  hasRelationship() function even though I checked against null before! My
  real purpose was to start the traverser but it exited with the same error
  message. That is why I put the n.hasRelationship which also would not
 work.
 
  I imported a graph with 50 mio. nodes and about the same size of
  relationships. (though I am about to import more relationships later on)
 I
  put 2 mio. nodes in a lucence index called article.
 
  the counting variable t has the value 2385 (so the first 2385 calls work
  fine) if I skip this node the same problem accoures again at t = 3239.
 
  maybe it is usefull to say that I inserted the graph using the batch
  inserter.
 
  IndexHitsNode res = article.get(key, values[0]);
  if (res!=null){
  Node n = res.getSingle();
   if (n!=null){
  if (n.hasRelationship(DynamicRelationshipType.withName( UPDATE ),
  Direction.BOTH)){
   //n.traverse(Order.BREADTH_FIRST,StopEvaluator.DEPTH_ONE,
  ReturnableEvaluator.ALL_BUT_START_NODE,DynamicRelationshipType.withName(
  UPDATE ) );
   t++;
  }
  }
 
  callstack:
 
  org.neo4j.kernel.impl.nioneo.store.InvalidRecordException:
 Record[1983624]
  not in useRecord[1983624] not in use
 
  at
 
 
 org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.java:230)
   at
 
 
 org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:337)
  at
 
 
 org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:114)
   at
 
 
 org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:97)
  at
 
 
 org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:108)
   at
 
 
 org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:603)
  at
 
 org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:351)
   at
 
 
 org.neo4j.kernel.impl.core.NodeImpl.loadInitialRelationships(NodeImpl.java:318)
  at
 
 
 org.neo4j.kernel.impl.core.NodeImpl.ensureRelationshipMapNotNull(NodeImpl.java:305)
   at
 
 
 org.neo4j.kernel.impl.core.NodeImpl.getAllRelationshipsOfType(NodeImpl.java:156)
  at
 org.neo4j.kernel.impl.core.NodeImpl.getRelationships(NodeImpl.java:236)
   at
 org.neo4j.kernel.impl.core.NodeImpl.hasRelationship(NodeImpl.java:576)
  at
 org.neo4j.kernel.impl.core.NodeProxy.hasRelationship(NodeProxy.java:109)
   at IndexEvaluation.GenerateStreams(IndexEvaluation.java:124)
  at IndexEvaluation.init(IndexEvaluation.java:98)
   at EntryPoint.main(EntryPoint.java:20)
 
  --
  --
  mobile: +49 (0)176 6433 2481
 
  Skype: +49 (0)6131 / 4958926
 
  Skype: rene.pickhardt
 
  www.rene-pickhardt.de
   http://www.beijing-china-blog.com
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 



 --
 Mattias Persson, [matt...@neotechnology.com]
 Hacker, Neo Technology
 www.neotechnology.com
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
--
mobile: +49 (0)176 6433 2481

Skype: +49 (0)6131 / 4958926

Skype: rene.pickhardt

www.rene-pickhardt.de
 http://www.beijing-china-blog.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] InvalidRecordException: Record[1983624] not in useRecord[1983624] not in use

2011-09-28 Thread Rick Bullotta
Why are you running a beta version?

On Sep 28, 2011, at 9:03 AM, René Pickhardt r.pickha...@googlemail.com 
wrote:

 Neo1.4.M04 community edition no self build.
 
 2011/9/28 Mattias Persson matt...@neotechnology.com
 
 Which version of neo4j did you use to import your data, was it a
 downloadable package, from maven or building yourself from a branch?
 
 2011/9/28 René Pickhardt r.pickha...@googlemail.com
 
 hey everyone
 
 I got a strange error message that a record is not in use if I call
 hasRelationship() function even though I checked against null before! My
 real purpose was to start the traverser but it exited with the same error
 message. That is why I put the n.hasRelationship which also would not
 work.
 
 I imported a graph with 50 mio. nodes and about the same size of
 relationships. (though I am about to import more relationships later on)
 I
 put 2 mio. nodes in a lucence index called article.
 
 the counting variable t has the value 2385 (so the first 2385 calls work
 fine) if I skip this node the same problem accoures again at t = 3239.
 
 maybe it is usefull to say that I inserted the graph using the batch
 inserter.
 
 IndexHitsNode res = article.get(key, values[0]);
 if (res!=null){
 Node n = res.getSingle();
 if (n!=null){
 if (n.hasRelationship(DynamicRelationshipType.withName( UPDATE ),
 Direction.BOTH)){
 //n.traverse(Order.BREADTH_FIRST,StopEvaluator.DEPTH_ONE,
 ReturnableEvaluator.ALL_BUT_START_NODE,DynamicRelationshipType.withName(
 UPDATE ) );
 t++;
 }
 }
 
 callstack:
 
 org.neo4j.kernel.impl.nioneo.store.InvalidRecordException:
 Record[1983624]
 not in useRecord[1983624] not in use
 
 at
 
 
 org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.java:230)
 at
 
 
 org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:337)
 at
 
 
 org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:114)
 at
 
 
 org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:97)
 at
 
 
 org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:108)
 at
 
 
 org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:603)
 at
 
 org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:351)
 at
 
 
 org.neo4j.kernel.impl.core.NodeImpl.loadInitialRelationships(NodeImpl.java:318)
 at
 
 
 org.neo4j.kernel.impl.core.NodeImpl.ensureRelationshipMapNotNull(NodeImpl.java:305)
 at
 
 
 org.neo4j.kernel.impl.core.NodeImpl.getAllRelationshipsOfType(NodeImpl.java:156)
 at
 org.neo4j.kernel.impl.core.NodeImpl.getRelationships(NodeImpl.java:236)
 at
 org.neo4j.kernel.impl.core.NodeImpl.hasRelationship(NodeImpl.java:576)
 at
 org.neo4j.kernel.impl.core.NodeProxy.hasRelationship(NodeProxy.java:109)
 at IndexEvaluation.GenerateStreams(IndexEvaluation.java:124)
 at IndexEvaluation.init(IndexEvaluation.java:98)
 at EntryPoint.main(EntryPoint.java:20)
 
 --
 --
 mobile: +49 (0)176 6433 2481
 
 Skype: +49 (0)6131 / 4958926
 
 Skype: rene.pickhardt
 
 www.rene-pickhardt.de
 http://www.beijing-china-blog.com
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
 
 
 
 
 --
 Mattias Persson, [matt...@neotechnology.com]
 Hacker, Neo Technology
 www.neotechnology.com
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
 
 
 
 
 -- 
 --
 mobile: +49 (0)176 6433 2481
 
 Skype: +49 (0)6131 / 4958926
 
 Skype: rene.pickhardt
 
 www.rene-pickhardt.de
 http://www.beijing-china-blog.com
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] InvalidRecordException: Record[1983624] not in useRecord[1983624] not in use

2011-09-28 Thread Chris Gioran
Hi Rene,

According to git log, 1,4.M04 was tagged 10/06/2011, while the fix for
a bug in the BatchInserterImpl that caused corrupted stores which gave
the message you are seeing is

https://github.com/neo4j/community/commit/71fbe4ac1174fad16a7bb154c9f78d3f1b377248

which has a date of 04/07/2011.

This makes 1.4.M06 the earliest release to use that does not have this
issue or, even better, go for 1.4.1 which is the latest stable
release. Since you are comfortable using milestones, 1.5.M01 might be
of interest to you.

http://neo4j.org/download has the links that you need.

hope that helped,
CG

2011/9/28 René Pickhardt r.pickha...@googlemail.com:
 Neo1.4.M04 community edition no self build.

 2011/9/28 Mattias Persson matt...@neotechnology.com

 Which version of neo4j did you use to import your data, was it a
 downloadable package, from maven or building yourself from a branch?

 2011/9/28 René Pickhardt r.pickha...@googlemail.com

  hey everyone
 
  I got a strange error message that a record is not in use if I call
  hasRelationship() function even though I checked against null before! My
  real purpose was to start the traverser but it exited with the same error
  message. That is why I put the n.hasRelationship which also would not
 work.
 
  I imported a graph with 50 mio. nodes and about the same size of
  relationships. (though I am about to import more relationships later on)
 I
  put 2 mio. nodes in a lucence index called article.
 
  the counting variable t has the value 2385 (so the first 2385 calls work
  fine) if I skip this node the same problem accoures again at t = 3239.
 
  maybe it is usefull to say that I inserted the graph using the batch
  inserter.
 
  IndexHitsNode res = article.get(key, values[0]);
  if (res!=null){
  Node n = res.getSingle();
   if (n!=null){
  if (n.hasRelationship(DynamicRelationshipType.withName( UPDATE ),
  Direction.BOTH)){
   //n.traverse(Order.BREADTH_FIRST,StopEvaluator.DEPTH_ONE,
  ReturnableEvaluator.ALL_BUT_START_NODE,DynamicRelationshipType.withName(
  UPDATE ) );
   t++;
  }
  }
 
  callstack:
 
  org.neo4j.kernel.impl.nioneo.store.InvalidRecordException:
 Record[1983624]
  not in useRecord[1983624] not in use
 
  at
 
 
 org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.java:230)
   at
 
 
 org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:337)
  at
 
 
 org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:114)
   at
 
 
 org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:97)
  at
 
 
 org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:108)
   at
 
 
 org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:603)
  at
 
 org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:351)
   at
 
 
 org.neo4j.kernel.impl.core.NodeImpl.loadInitialRelationships(NodeImpl.java:318)
  at
 
 
 org.neo4j.kernel.impl.core.NodeImpl.ensureRelationshipMapNotNull(NodeImpl.java:305)
   at
 
 
 org.neo4j.kernel.impl.core.NodeImpl.getAllRelationshipsOfType(NodeImpl.java:156)
  at
 org.neo4j.kernel.impl.core.NodeImpl.getRelationships(NodeImpl.java:236)
   at
 org.neo4j.kernel.impl.core.NodeImpl.hasRelationship(NodeImpl.java:576)
  at
 org.neo4j.kernel.impl.core.NodeProxy.hasRelationship(NodeProxy.java:109)
   at IndexEvaluation.GenerateStreams(IndexEvaluation.java:124)
  at IndexEvaluation.init(IndexEvaluation.java:98)
   at EntryPoint.main(EntryPoint.java:20)
 
  --
  --
  mobile: +49 (0)176 6433 2481
 
  Skype: +49 (0)6131 / 4958926
 
  Skype: rene.pickhardt
 
  www.rene-pickhardt.de
   http://www.beijing-china-blog.com
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 



 --
 Mattias Persson, [matt...@neotechnology.com]
 Hacker, Neo Technology
 www.neotechnology.com
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




 --
 --
 mobile: +49 (0)176 6433 2481

 Skype: +49 (0)6131 / 4958926

 Skype: rene.pickhardt

 www.rene-pickhardt.de
  http://www.beijing-china-blog.com
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Forward slashes in index values

2011-09-28 Thread Jim Webber
Hi Tatham,

I've closed off this issue in Github now: 
https://github.com/neo4j/community/issues/25

For all you Neo4j REST API client maintainers, this means there *WILL BE 
BREAKING CHANGES* to the Neo4j REST API in the 1.5 release.

I'll try to ensure they're all very well documented in the manual, but 
following the URI above will show you how things look on the wire now.

Tatham/Romiko/Josh/Nigel/Jake/and others, you have tweaks to make...

Jim

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] InvalidRecordException: Record[1983624] not in useRecord[1983624] not in use

2011-09-28 Thread Mattias Persson
I'm curious to know how you found that old milestone also :) you picked the
one out of extremely few having some kind of data problems.

Den onsdagen den 28:e september 2011 skrev Chris Gioran
chris.gio...@neotechnology.com:
 Hi Rene,

 According to git log, 1,4.M04 was tagged 10/06/2011, while the fix for
 a bug in the BatchInserterImpl that caused corrupted stores which gave
 the message you are seeing is


https://github.com/neo4j/community/commit/71fbe4ac1174fad16a7bb154c9f78d3f1b377248

 which has a date of 04/07/2011.

 This makes 1.4.M06 the earliest release to use that does not have this
 issue or, even better, go for 1.4.1 which is the latest stable
 release. Since you are comfortable using milestones, 1.5.M01 might be
 of interest to you.

 http://neo4j.org/download has the links that you need.

 hope that helped,
 CG

 2011/9/28 René Pickhardt r.pickha...@googlemail.com:
 Neo1.4.M04 community edition no self build.

 2011/9/28 Mattias Persson matt...@neotechnology.com

 Which version of neo4j did you use to import your data, was it a
 downloadable package, from maven or building yourself from a branch?

 2011/9/28 René Pickhardt r.pickha...@googlemail.com

  hey everyone
 
  I got a strange error message that a record is not in use if I call
  hasRelationship() function even though I checked against null before!
My
  real purpose was to start the traverser but it exited with the same
error
  message. That is why I put the n.hasRelationship which also would not
 work.
 
  I imported a graph with 50 mio. nodes and about the same size of
  relationships. (though I am about to import more relationships later
on)
 I
  put 2 mio. nodes in a lucence index called article.
 
  the counting variable t has the value 2385 (so the first 2385 calls
work
  fine) if I skip this node the same problem accoures again at t = 3239.
 
  maybe it is usefull to say that I inserted the graph using the batch
  inserter.
 
  IndexHitsNode res = article.get(key, values[0]);
  if (res!=null){
  Node n = res.getSingle();
   if (n!=null){
  if (n.hasRelationship(DynamicRelationshipType.withName( UPDATE ),
  Direction.BOTH)){
   //n.traverse(Order.BREADTH_FIRST,StopEvaluator.DEPTH_ONE,
 
ReturnableEvaluator.ALL_BUT_START_NODE,DynamicRelationshipType.withName(
  UPDATE ) );
   t++;
  }
  }
 
  callstack:
 
  org.neo4j.kernel.impl.nioneo.store.InvalidRecordException:
 Record[1983624]
  not in useRecord[1983624] not in use
 
  at
 
 

org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.java:230)
   at
 
 

org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:337)
  at
 
 

org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:114)
   at
 
 

org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:97)
  at
 
 

org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:108)
   at
 
 

org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:603)
  at
 

org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:351)
   at
 
 

org.neo4j.kernel.impl.core.NodeImpl.loadInitialRelationships(NodeImpl.java:318)
  at
 
 

org.neo4j.kernel.impl.core.NodeImpl.ensureRelationshipMapNotNull(NodeImpl.java:305)
   at
 
 

org.neo4j.kernel.impl.core.NodeImpl.getAllRelationshipsOfType(NodeImpl.java:156)
  at
 org.neo4j.kernel.impl.core.NodeImpl.getRelationships(NodeImpl.java:236)
   at
 org.neo4j.kernel.impl.core.NodeImpl.hasRelationship(NodeImpl.java:576)
  at
 org.neo4j.kernel.impl.core.NodeProxy.hasRelationship(NodeProxy.java:109)
   at IndexEvaluation.GenerateStreams(IndexEvaluation.java:124)
  at IndexEvaluation.init(IndexEvaluation.java:98)
   at EntryPoint.main(EntryPoint.

-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] neo4j-ha and spring-data-graph

2011-09-28 Thread Toby O'Rourke
Hi,

I'm trying to do a POC using neo4j and spring-data-graph. I have configured 3 
VMs running zookeeper and deployed a simple webapp to tomcat on each instance. 
I've run into a bit of a problem with replication though. I can only see data 
being replicated when I restart each tomcat instance – which is obviously no 
good.

I have the following in my application context:

bean id=graphDatabaseService 
class=org.neo4j.kernel.HighlyAvailableGraphDatabase destroy-method=shutdown
  scope=singleton
constructor-arg index=0 value=${database.path}/
constructor-arg index=1
map
entry key=ha.machine_id value=${server.id} /
entry key=ha.server value=zoo1:${ha.server.port} /
entry key=ha.zoo_keeper_servers value=${zookeeper.servers} 
/
entry key=enable_remote_shell value=port=1331 /
entry key=pull_interval value=1 /
/map
/constructor-arg
/bean

I am starting zoo1 first so that it becomes the master. Server.id is 
allocated at runtime from a system property set on each machine –Dserver.id=x 
in the tomcat startup script. From what I understand the pull_interval=1 
setting means that data should be synchronized once per second, yet I am only 
seeing it happen when the servers are bounced. Am I missing something?

Thanks,

Toby.

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] threads on embeddedGraphDb

2011-09-28 Thread st.pa
(inline response.)

Am 28.09.2011 14:40, schrieb Peter Neubauer:
 Hi there,
 Neo4j in itself is thread safe, so you can pass it around as a
 singleton and access it from different Java threads.

knowing that it should work helped me to make it work. my mistake 
probably was to pass the instance of EmbeddedGraphDb as a final 
parameter to the other threads, because it didn't throw up an exception 
when i took the final keyword out and i can live with checkstyle having 
a problem with a non-final parameter.


 The HighlyAvailableGraphDatabase for scaling over multiple machines is
 part of neo4j-enterprise, so you need to update your maven
 dependencies to change community for enterprise. Does that help?

 Cheers,

 /peter neubauer

thankyousoverymuch, community will do for now.
st.p. from berlin


 GTalk:  neubauer.peter
 Skype   peter.neubauer
 Phone   +46 704 106975
 LinkedIn   http://www.linkedin.com/in/neubauer
 Twitter  http://twitter.com/peterneubauer

 http://www.neo4j.org   - Your high performance graph database.
 http://startupbootcamp.org/- Öresund - Innovation happens HERE.
 http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



 On Wed, Sep 28, 2011 at 2:26 PM, st.past...@web.de  wrote:

 hi,

 while i was not trying to use threads, everything went fine. now i need
 concurrent java threads to access the same (embedded?) graph database.
 neo4j-manual.pdf for 1.4.1 says in section 1.1.2. that i should use
 HighlyAvailableGraphDatabase, which is no longer there in 1.5.1 as it
 seems. i have not looked into server and rest api yet, so is there a way
 to do a threaded app with say a queue thread and n worker threads inside
 the jvm that all do their own transactions on the same database
 location? the following exception is what i got for assigning the queue
 thread's embedded db to the worker threads, i guess.

 Exception in thread Thread-6 java.lang.RuntimeException:
 java.nio.channels.ClosedByInterruptException
 at
 org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:603)
 at
 org.neo4j.index.impl.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:486)
 at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:248)
 at
 org.neo4j.index.impl.lucene.LuceneIndex$RelationshipIndex.get(LuceneIndex.java:480)
 at de.stp.DatabaseNeo4j.removeUrlQueue(DatabaseNeo4j.java:777)
 at de.stp.util.BufferNeo4j.next(BufferNeo4j.java:194)
 at de.stp.RoboNeo4j.nächsterSchritt(RoboNeo4j.java:452)
 at de.stp.RoboNeo4j.run(RoboNeo4j.java:436)
 at java.lang.Thread.run(Thread.java:619)
 Caused by: java.nio.channels.ClosedByInterruptException
 at
 java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:184)
 at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:772)
 at
 org.apache.lucene.store.MMapDirectory$MMapIndexInput.init(MMapDirectory.java:225)
 at
 org.apache.lucene.store.MMapDirectory$MMapIndexInput.init(MMapDirectory.java:217)
 at org.apache.lucene.store.MMapDirectory.openInput(MMapDirectory.java:209)
 at
 org.apache.lucene.index.CompoundFileReader.init(CompoundFileReader.java:66)
 at
 org.apache.lucene.index.CompoundFileReader.init(CompoundFileReader.java:55)
 at org.apache.lucene.index.IndexWriter.getFieldInfos(IndexWriter.java:1193)
 at
 org.apache.lucene.index.IndexWriter.getCurrentFieldInfos(IndexWriter.java:1213)
 at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1149)
 at
 org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:590)
 ... 8 more

 Thx for any ideas.
 ciao, st.p.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user


___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] InvalidRecordException: Record[1983624] not in useRecord[1983624] not in use

2011-09-28 Thread René Pickhardt
Hey guys,

I don't know how I found the old milestone. I was downloading it once I
started using neo4j.

I will just migrate to the current stable version and tell you afterwards if
I still have problems. by your comments I guess the problem will be solved.
Thanks so far!

best regards René

2011/9/28 Mattias Persson matt...@neotechnology.com

 I'm curious to know how you found that old milestone also :) you picked the
 one out of extremely few having some kind of data problems.

 Den onsdagen den 28:e september 2011 skrev Chris Gioran
 chris.gio...@neotechnology.com:
  Hi Rene,
 
  According to git log, 1,4.M04 was tagged 10/06/2011, while the fix for
  a bug in the BatchInserterImpl that caused corrupted stores which gave
  the message you are seeing is
 
 

 https://github.com/neo4j/community/commit/71fbe4ac1174fad16a7bb154c9f78d3f1b377248
 
  which has a date of 04/07/2011.
 
  This makes 1.4.M06 the earliest release to use that does not have this
  issue or, even better, go for 1.4.1 which is the latest stable
  release. Since you are comfortable using milestones, 1.5.M01 might be
  of interest to you.
 
  http://neo4j.org/download has the links that you need.
 
  hope that helped,
  CG
 
  2011/9/28 René Pickhardt r.pickha...@googlemail.com:
  Neo1.4.M04 community edition no self build.
 
  2011/9/28 Mattias Persson matt...@neotechnology.com
 
  Which version of neo4j did you use to import your data, was it a
  downloadable package, from maven or building yourself from a branch?
 
  2011/9/28 René Pickhardt r.pickha...@googlemail.com
 
   hey everyone
  
   I got a strange error message that a record is not in use if I call
   hasRelationship() function even though I checked against null before!
 My
   real purpose was to start the traverser but it exited with the same
 error
   message. That is why I put the n.hasRelationship which also would not
  work.
  
   I imported a graph with 50 mio. nodes and about the same size of
   relationships. (though I am about to import more relationships later
 on)
  I
   put 2 mio. nodes in a lucence index called article.
  
   the counting variable t has the value 2385 (so the first 2385 calls
 work
   fine) if I skip this node the same problem accoures again at t =
 3239.
  
   maybe it is usefull to say that I inserted the graph using the batch
   inserter.
  
   IndexHitsNode res = article.get(key, values[0]);
   if (res!=null){
   Node n = res.getSingle();
if (n!=null){
   if (n.hasRelationship(DynamicRelationshipType.withName( UPDATE ),
   Direction.BOTH)){
//n.traverse(Order.BREADTH_FIRST,StopEvaluator.DEPTH_ONE,
  
 ReturnableEvaluator.ALL_BUT_START_NODE,DynamicRelationshipType.withName(
   UPDATE ) );
t++;
   }
   }
  
   callstack:
  
   org.neo4j.kernel.impl.nioneo.store.InvalidRecordException:
  Record[1983624]
   not in useRecord[1983624] not in use
  
   at
  
  
 

 org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.java:230)
at
  
  
 

 org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:337)
   at
  
  
 

 org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:114)
at
  
  
 

 org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:97)
   at
  
  
 

 org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:108)
at
  
  
 

 org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:603)
   at
  
 
 org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:351)
at
  
  
 

 org.neo4j.kernel.impl.core.NodeImpl.loadInitialRelationships(NodeImpl.java:318)
   at
  
  
 

 org.neo4j.kernel.impl.core.NodeImpl.ensureRelationshipMapNotNull(NodeImpl.java:305)
at
  
  
 

 org.neo4j.kernel.impl.core.NodeImpl.getAllRelationshipsOfType(NodeImpl.java:156)
   at
  org.neo4j.kernel.impl.core.NodeImpl.getRelationships(NodeImpl.java:236)
at
  org.neo4j.kernel.impl.core.NodeImpl.hasRelationship(NodeImpl.java:576)
   at
 
 org.neo4j.kernel.impl.core.NodeProxy.hasRelationship(NodeProxy.java:109)
at IndexEvaluation.GenerateStreams(IndexEvaluation.java:124)
   at IndexEvaluation.init(IndexEvaluation.java:98)
at EntryPoint.main(EntryPoint.

 --
 Mattias Persson, [matt...@neotechnology.com]
 Hacker, Neo Technology
 www.neotechnology.com
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
--
mobile: +49 (0)176 6433 2481

Skype: +49 (0)6131 / 4958926

Skype: rene.pickhardt

www.rene-pickhardt.de
 http://www.beijing-china-blog.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] InvalidRecordException: Record[1983624] not in useRecord[1983624] not in use

2011-09-28 Thread Rick Bullotta
Hi, René.

I recognized your error almost immediately, since we encountered it in an early 
1.4 beta. ;-)

I think you'll have a good result if you can switch to the 1.4.1 release!

Best,

Rick

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of René Pickhardt
Sent: Wednesday, September 28, 2011 10:29 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] InvalidRecordException: Record[1983624] not in 
useRecord[1983624] not in use

Hey guys,

I don't know how I found the old milestone. I was downloading it once I
started using neo4j.

I will just migrate to the current stable version and tell you afterwards if
I still have problems. by your comments I guess the problem will be solved.
Thanks so far!

best regards René

2011/9/28 Mattias Persson matt...@neotechnology.com

 I'm curious to know how you found that old milestone also :) you picked the
 one out of extremely few having some kind of data problems.

 Den onsdagen den 28:e september 2011 skrev Chris Gioran
 chris.gio...@neotechnology.com:
  Hi Rene,
 
  According to git log, 1,4.M04 was tagged 10/06/2011, while the fix for
  a bug in the BatchInserterImpl that caused corrupted stores which gave
  the message you are seeing is
 
 

 https://github.com/neo4j/community/commit/71fbe4ac1174fad16a7bb154c9f78d3f1b377248
 
  which has a date of 04/07/2011.
 
  This makes 1.4.M06 the earliest release to use that does not have this
  issue or, even better, go for 1.4.1 which is the latest stable
  release. Since you are comfortable using milestones, 1.5.M01 might be
  of interest to you.
 
  http://neo4j.org/download has the links that you need.
 
  hope that helped,
  CG
 
  2011/9/28 René Pickhardt r.pickha...@googlemail.com:
  Neo1.4.M04 community edition no self build.
 
  2011/9/28 Mattias Persson matt...@neotechnology.com
 
  Which version of neo4j did you use to import your data, was it a
  downloadable package, from maven or building yourself from a branch?
 
  2011/9/28 René Pickhardt r.pickha...@googlemail.com
 
   hey everyone
  
   I got a strange error message that a record is not in use if I call
   hasRelationship() function even though I checked against null before!
 My
   real purpose was to start the traverser but it exited with the same
 error
   message. That is why I put the n.hasRelationship which also would not
  work.
  
   I imported a graph with 50 mio. nodes and about the same size of
   relationships. (though I am about to import more relationships later
 on)
  I
   put 2 mio. nodes in a lucence index called article.
  
   the counting variable t has the value 2385 (so the first 2385 calls
 work
   fine) if I skip this node the same problem accoures again at t =
 3239.
  
   maybe it is usefull to say that I inserted the graph using the batch
   inserter.
  
   IndexHitsNode res = article.get(key, values[0]);
   if (res!=null){
   Node n = res.getSingle();
if (n!=null){
   if (n.hasRelationship(DynamicRelationshipType.withName( UPDATE ),
   Direction.BOTH)){
//n.traverse(Order.BREADTH_FIRST,StopEvaluator.DEPTH_ONE,
  
 ReturnableEvaluator.ALL_BUT_START_NODE,DynamicRelationshipType.withName(
   UPDATE ) );
t++;
   }
   }
  
   callstack:
  
   org.neo4j.kernel.impl.nioneo.store.InvalidRecordException:
  Record[1983624]
   not in useRecord[1983624] not in use
  
   at
  
  
 

 org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.java:230)
at
  
  
 

 org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:337)
   at
  
  
 

 org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:114)
at
  
  
 

 org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:97)
   at
  
  
 

 org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:108)
at
  
  
 

 org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:603)
   at
  
 
 org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:351)
at
  
  
 

 org.neo4j.kernel.impl.core.NodeImpl.loadInitialRelationships(NodeImpl.java:318)
   at
  
  
 

 org.neo4j.kernel.impl.core.NodeImpl.ensureRelationshipMapNotNull(NodeImpl.java:305)
at
  
  
 

 org.neo4j.kernel.impl.core.NodeImpl.getAllRelationshipsOfType(NodeImpl.java:156)
   at
  org.neo4j.kernel.impl.core.NodeImpl.getRelationships(NodeImpl.java:236)
at
  org.neo4j.kernel.impl.core.NodeImpl.hasRelationship(NodeImpl.java:576)
   at
 
 org.neo4j.kernel.impl.core.NodeProxy.hasRelationship(NodeProxy.java:109)
at IndexEvaluation.GenerateStreams(IndexEvaluation.java:124)
   at IndexEvaluation.init(IndexEvaluation.java:98)
at EntryPoint.main(EntryPoint.

 --
 Mattias Persson, [matt...@neotechnology.com]
 Hacker, Neo Technology
 www.neotechnology.com
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 

Re: [Neo4j] neo4j-ha and spring-data-graph

2011-09-28 Thread Michael Hunger
Could you also share the property files of the 3 vm's ?

Thanks

Michael

Am 28.09.2011 um 15:59 schrieb Toby O'Rourke:

 Hi,
 
 I'm trying to do a POC using neo4j and spring-data-graph. I have configured 3 
 VMs running zookeeper and deployed a simple webapp to tomcat on each 
 instance. I've run into a bit of a problem with replication though. I can 
 only see data being replicated when I restart each tomcat instance – which is 
 obviously no good.
 
 I have the following in my application context:
 
bean id=graphDatabaseService 
 class=org.neo4j.kernel.HighlyAvailableGraphDatabase 
 destroy-method=shutdown
  scope=singleton
constructor-arg index=0 value=${database.path}/
constructor-arg index=1
map
entry key=ha.machine_id value=${server.id} /
entry key=ha.server value=zoo1:${ha.server.port} /
entry key=ha.zoo_keeper_servers 
 value=${zookeeper.servers} /
entry key=enable_remote_shell value=port=1331 /
entry key=pull_interval value=1 /
/map
/constructor-arg
/bean
 
 I am starting zoo1 first so that it becomes the master. Server.id is 
 allocated at runtime from a system property set on each machine –Dserver.id=x 
 in the tomcat startup script. From what I understand the pull_interval=1 
 setting means that data should be synchronized once per second, yet I am only 
 seeing it happen when the servers are bounced. Am I missing something?
 
 Thanks,
 
 Toby.
 
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Some questions about design when using neo4j

2011-09-28 Thread Marko Rodriguez
Hey,

If you want to play with JUNG over Neo4j, you can do it via TinkerPop.

Graph g = new Neo4jGraph(/tmp/neo4j);
GraphJung jung = new GraphJung(g);

That GraphJung object is a implementation of the JUNG Interfaces and can be 
processed by the JUNG algorithms package.

https://github.com/tinkerpop/blueprints/wiki/JUNG-Ouplementation

HTH,
Marko.

http://markorodriguez.com

On Sep 28, 2011, at 1:06 AM, Peter Neubauer wrote:

 Gen,
 I guess there is nothing out of the box right now, but you could get
 inspiration from http://jung.sourceforge.net/doc/api/index.html,
 especially 
 http://jung.sourceforge.net/doc/api/edu/uci/ics/jung/algorithms/flows/EdmondsKarpMaxFlow.html
 and implement one or just use it on a toy graph to test it out?
 
 Cheers,
 
 /peter neubauer
 
 GTalk:  neubauer.peter
 Skype   peter.neubauer
 Phone   +46 704 106975
 LinkedIn   http://www.linkedin.com/in/neubauer
 Twitter  http://twitter.com/peterneubauer
 
 http://www.neo4j.org   - Your high performance graph database.
 http://startupbootcamp.org/- Öresund - Innovation happens HERE.
 http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
 
 
 
 On Sat, Sep 3, 2011 at 12:33 AM, Benjamin Gustafsson
 benjamingustafs...@gmail.com wrote:
 Just in case there are any graph experts out there that want to exercise
 their brains. (Its quite a while since I studied algorithms and optimization
 regarding graphs. :-)
 
 I'm able to implement a algorithm described in pseudocode (if anyone knows a
 good algorithm for my special case below).
 
 I have the transportation problem and need to find a preferably small (not
 necessarily smallest) set of nodes that transports a certain amount of
 credit/commodity from source node S to sink node T. All edges have a
 capacity stated as a attribute for the edge, this can be read while
 traversing the graph. Transportation cost for commodity/credit in the graph
 is zero. The only cost in this graph problem is computation time to *find a
 set of paths delivering all the commodity*(in my case credit). The path
 lengths chosen are not important.
 
 (This is the standard ripplepay problem, but I didn't like the algorithms
 used by the original ripplepay implementation. It does not scale up to
 millions of users. It is not fast enough.)
 
 http://en.wikipedia.org/wiki/Transportation_network_%28graph_theory%29
 
 And I also need a quick way of analysing if it is possible to send all
 commodity across the network. If the amount commodity to be sent is lower
 than max flow. (lower than min cut). There will initially be clusters with
 very few edges connecting the clusters. If the nodes are in different
 clusters the min cut can be really easy/*quick* to find (if we do it the
 right way).
 
 http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem
 
 Any implementations for neo4j already available regarding my special case?
 
 --
 //Benjamin Gustafsson
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
 
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] neo4j-ha and spring-data-graph

2011-09-28 Thread Toby O'Rourke
Hi, 

I'm not quite sure which property files you're talking about. The
configuration passed to HighlyAvailableGraphDatabase comes from the map
specified as a constructor argument directly in the spring Context.
database.path, server.id, ha.server.port, and zookeeper.servers are set by
system properties when tomcat is started so for each server:

# VM1
export JAVA_OPTS=-Dserver.id=1 -Dha.server.port=6001
-Ddatabase.path=/home/ubuntu/db
-Dzookeeper.servers=zoo1:2181,zoo2:2181,zoo3:2181
# VM2
export JAVA_OPTS=-Dserver.id=2 -Dha.server.port=6001
-Ddatabase.path=/home/ubuntu/db
-Dzookeeper.servers=zoo1:2181,zoo2:2181,zoo3:2181
# VM3
export JAVA_OPTS=-Dserver.id=3 -Dha.server.port=6001
-Ddatabase.path=/home/ubuntu/db
-Dzookeeper.servers=zoo1:2181,zoo2:2181,zoo3:2181

Written as a properties file, for one server, they would look like this:

ha.machine_id=1
ha.server=zoo1:6001
ha.zoo_keeper_servers=zoo1:2181,zoo2:2181,zoo3:2181
enable_remote_shell=port=1331
pull_interval=1

But looking at the sample code on the wiki, I'm just short cutting it a
bit by doing it in the Spring Context rather than parsing a properties
file in a main method? In terms of the zookeeper config, zoo.cfg looks
like this: 

tickTime=2000
dataDir=/var/lib/zookeeper
clientPort=2181
initLimit=5
syncLimit=2
server.1=zoo1:2888:3888
server.2=zoo2:2888:3888
server.3=zoo3:2888:3888


Should I be including some other config?

Thanks, 

Toby.


On 28/09/2011 15:53, Michael Hunger michael.hun...@neotechnology.com
wrote:

Could you also share the property files of the 3 vm's ?

Thanks

Michael

Am 28.09.2011 um 15:59 schrieb Toby O'Rourke:

 Hi,
 
 I'm trying to do a POC using neo4j and spring-data-graph. I have
configured 3 VMs running zookeeper and deployed a simple webapp to
tomcat on each instance. I've run into a bit of a problem with
replication though. I can only see data being replicated when I restart
each tomcat instance ­ which is obviously no good.
 
 I have the following in my application context:
 
bean id=graphDatabaseService
class=org.neo4j.kernel.HighlyAvailableGraphDatabase
destroy-method=shutdown
  scope=singleton
constructor-arg index=0 value=${database.path}/
constructor-arg index=1
map
entry key=ha.machine_id value=${server.id} /
entry key=ha.server value=zoo1:${ha.server.port} /
entry key=ha.zoo_keeper_servers
value=${zookeeper.servers} /
entry key=enable_remote_shell value=port=1331 /
entry key=pull_interval value=1 /
/map
/constructor-arg
/bean
 
 I am starting zoo1 first so that it becomes the master. Server.id is
allocated at runtime from a system property set on each machine
­Dserver.id=x in the tomcat startup script. From what I understand the
pull_interval=1 setting means that data should be synchronized once per
second, yet I am only seeing it happen when the servers are bounced. Am
I missing something?
 
 Thanks,
 
 Toby.
 
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] neo4j-ha and spring-data-graph

2011-09-28 Thread Michael Hunger
Could you also get the /home/ubuntu/db/messages.log of each of the 3 instances 
to see if there are any issues with the HA communication?

Thanks so much,

Michael

Am 28.09.2011 um 18:11 schrieb Toby O'Rourke:

 Hi, 
 
 I'm not quite sure which property files you're talking about. The
 configuration passed to HighlyAvailableGraphDatabase comes from the map
 specified as a constructor argument directly in the spring Context.
 database.path, server.id, ha.server.port, and zookeeper.servers are set by
 system properties when tomcat is started so for each server:
 
 # VM1
 export JAVA_OPTS=-Dserver.id=1 -Dha.server.port=6001
 -Ddatabase.path=/home/ubuntu/db
 -Dzookeeper.servers=zoo1:2181,zoo2:2181,zoo3:2181
 # VM2
 export JAVA_OPTS=-Dserver.id=2 -Dha.server.port=6001
 -Ddatabase.path=/home/ubuntu/db
 -Dzookeeper.servers=zoo1:2181,zoo2:2181,zoo3:2181
 # VM3
 export JAVA_OPTS=-Dserver.id=3 -Dha.server.port=6001
 -Ddatabase.path=/home/ubuntu/db
 -Dzookeeper.servers=zoo1:2181,zoo2:2181,zoo3:2181
 
 Written as a properties file, for one server, they would look like this:
 
 ha.machine_id=1
 ha.server=zoo1:6001
 ha.zoo_keeper_servers=zoo1:2181,zoo2:2181,zoo3:2181
 enable_remote_shell=port=1331
 pull_interval=1
 
 But looking at the sample code on the wiki, I'm just short cutting it a
 bit by doing it in the Spring Context rather than parsing a properties
 file in a main method? In terms of the zookeeper config, zoo.cfg looks
 like this: 
 
 tickTime=2000
 dataDir=/var/lib/zookeeper
 clientPort=2181
 initLimit=5
 syncLimit=2
 server.1=zoo1:2888:3888
 server.2=zoo2:2888:3888
 server.3=zoo3:2888:3888
 
 
 Should I be including some other config?
 
 Thanks, 
 
 Toby.
 
 
 On 28/09/2011 15:53, Michael Hunger michael.hun...@neotechnology.com
 wrote:
 
 Could you also share the property files of the 3 vm's ?
 
 Thanks
 
 Michael
 
 Am 28.09.2011 um 15:59 schrieb Toby O'Rourke:
 
 Hi,
 
 I'm trying to do a POC using neo4j and spring-data-graph. I have
 configured 3 VMs running zookeeper and deployed a simple webapp to
 tomcat on each instance. I've run into a bit of a problem with
 replication though. I can only see data being replicated when I restart
 each tomcat instance ­ which is obviously no good.
 
 I have the following in my application context:
 
   bean id=graphDatabaseService
 class=org.neo4j.kernel.HighlyAvailableGraphDatabase
 destroy-method=shutdown
 scope=singleton
   constructor-arg index=0 value=${database.path}/
   constructor-arg index=1
   map
   entry key=ha.machine_id value=${server.id} /
   entry key=ha.server value=zoo1:${ha.server.port} /
   entry key=ha.zoo_keeper_servers
 value=${zookeeper.servers} /
   entry key=enable_remote_shell value=port=1331 /
   entry key=pull_interval value=1 /
   /map
   /constructor-arg
   /bean
 
 I am starting zoo1 first so that it becomes the master. Server.id is
 allocated at runtime from a system property set on each machine
 Dserver.id=x in the tomcat startup script. From what I understand the
 pull_interval=1 setting means that data should be synchronized once per
 second, yet I am only seeing it happen when the servers are bounced. Am
 I missing something?
 
 Thanks,
 
 Toby.
 
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
 
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
 
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] InvalidRecordException: Record[1983624] not in useRecord[1983624] not in use

2011-09-28 Thread René Pickhardt
I used the current stable release and the problem did not arise anymore but
I got new problems.

for many nodes even though (according to the data set they should have
relations) the
function  (n.hasRelationship(DynamicRelationshipType.withName( UPDATE ),
Direction.BOTH)) does not stop. It just seems to jump into an endless loop
;(

I don't think I made a mistake in the code for the batch inserter but i just
attached it. My insertion contains of two steps:

first I create many node in the graph and store them also in an index:
batchArticle. I do not query agains the index to check if a node with this
key already existed. But my keys are unique.

private void AddBatchNode(String key, String title){
MapString,Object properties = new HashMapString,Object();

properties.put( key, key );
properties.put( title, title );
 properties.put( timestamp, 1 );
long node = inserter.createNode( properties );

properties = MapUtil.map( key, key );
batchArticle.add( node, properties );
 }

then I attach many updates (also nodes encoded via timestamp) to every node
and connect them via a relationship.

private void BatchUpdate(String timestamp, String key) {
if (batchArticle.get(key, key).getSingle()!=null){
 long node = batchArticle.get(key, key).getSingle();
MapString,Object properties = new HashMapString,Object();
 properties.put( timestamp, timestamp );
 long ci = inserter.createNode( properties );

inserter.createRelationship( node, ci, DynamicRelationshipType.withName(
UPDATE ),null);
}
 }

the last step (i did not implement this) is to connect the nodes from the
first steps via friendship relations. But I wanted to do some testing
first...

anyone knows of this problem?

2011/9/28 Rick Bullotta rick.bullo...@thingworx.com

 Hi, René.

 I recognized your error almost immediately, since we encountered it in an
 early 1.4 beta. ;-)

 I think you'll have a good result if you can switch to the 1.4.1 release!

 Best,

 Rick

 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
 On Behalf Of René Pickhardt
 Sent: Wednesday, September 28, 2011 10:29 AM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] InvalidRecordException: Record[1983624] not in
 useRecord[1983624] not in use

 Hey guys,

 I don't know how I found the old milestone. I was downloading it once I
 started using neo4j.

 I will just migrate to the current stable version and tell you afterwards
 if
 I still have problems. by your comments I guess the problem will be solved.
 Thanks so far!

 best regards René

 2011/9/28 Mattias Persson matt...@neotechnology.com

  I'm curious to know how you found that old milestone also :) you picked
 the
  one out of extremely few having some kind of data problems.
 
  Den onsdagen den 28:e september 2011 skrev Chris Gioran
  chris.gio...@neotechnology.com:
   Hi Rene,
  
   According to git log, 1,4.M04 was tagged 10/06/2011, while the fix for
   a bug in the BatchInserterImpl that caused corrupted stores which gave
   the message you are seeing is
  
  
 
 
 https://github.com/neo4j/community/commit/71fbe4ac1174fad16a7bb154c9f78d3f1b377248
  
   which has a date of 04/07/2011.
  
   This makes 1.4.M06 the earliest release to use that does not have this
   issue or, even better, go for 1.4.1 which is the latest stable
   release. Since you are comfortable using milestones, 1.5.M01 might be
   of interest to you.
  
   http://neo4j.org/download has the links that you need.
  
   hope that helped,
   CG
  
   2011/9/28 René Pickhardt r.pickha...@googlemail.com:
   Neo1.4.M04 community edition no self build.
  
   2011/9/28 Mattias Persson matt...@neotechnology.com
  
   Which version of neo4j did you use to import your data, was it a
   downloadable package, from maven or building yourself from a branch?
  
   2011/9/28 René Pickhardt r.pickha...@googlemail.com
  
hey everyone
   
I got a strange error message that a record is not in use if I call
hasRelationship() function even though I checked against null
 before!
  My
real purpose was to start the traverser but it exited with the same
  error
message. That is why I put the n.hasRelationship which also would
 not
   work.
   
I imported a graph with 50 mio. nodes and about the same size of
relationships. (though I am about to import more relationships
 later
  on)
   I
put 2 mio. nodes in a lucence index called article.
   
the counting variable t has the value 2385 (so the first 2385 calls
  work
fine) if I skip this node the same problem accoures again at t =
  3239.
   
maybe it is usefull to say that I inserted the graph using the
 batch
inserter.
   
IndexHitsNode res = article.get(key, values[0]);
if (res!=null){
Node n = res.getSingle();
 if (n!=null){
if (n.hasRelationship(DynamicRelationshipType.withName( UPDATE ),
Direction.BOTH)){
 //n.traverse(Order.BREADTH_FIRST,StopEvaluator.DEPTH_ONE,
   
  

Re: [Neo4j] REST, Transactions and Uniqueness

2011-09-28 Thread Linan Wang
Peter,
I feel uniqueness has been a recurring theme in neo4j applications,
especially when it's used heavily on algorithms traversing existing
data. it would be great if it's supported in kernel level:

interface NodeUniquenessConstraint
{
   public Node getNode();
   public void setupNode(Node newNode);
}

public Node getOrCreateNode(NodeUniquenessConstraint constraint)
{
  // Preparation, acquires lock, etc.
  Node n = constraint.getNode();
  if(n == null)
  {
 n = createNode();
 constraint.setupNode(n);
  }
  ...
  return n;
}

or, there is something similar already implemented?

On Tue, Sep 27, 2011 at 9:38 PM, Peter Neubauer
peter.neuba...@neotechnology.com wrote:
 Guys,
 Maps are now supported as parameters, look at the Gremlin plugin för
 reference in the docs. Will add that for parameters to the cypher plugin
 too.

 Thanks for chipping in!

 /peter

 Sent from my phone.
 On Sep 27, 2011 8:12 PM, Tony Wooster twoos...@gmail.com wrote:
 Hi Linan,

 That's essentially what I implemented, but the logic just became that
 much more tortured when going over REST. Like I said, less of a Java
 programmer. The implementation I came up with on the REST side (hacky
 though it may be) was this:

 @Description( An extension to help maintain unique relationships )
 public class IndexTester extends ServerPlugin
 {
     @Name( error_if_in_node_index )
     @Description( Will return a 4xx error if a key/value pair is found in
 +
                   a given index. Also errors if the index doesn't
 exist.)
     @PluginTarget( GraphDatabaseService.class )
     public Boolean errorIfInNodeIndex(
                 @Source GraphDatabaseService graphDb,
                 @Description( Name of the index to earch. )
                     @Parameter( name = indexName ) String indexName,
                 @Description( Name of key to search. )
                     @Parameter( name = key ) String key,
                 @Description( Value to search for. )
                     @Parameter( name = value ) String value )
             throws BadInputException
     {

         if ( !graphDb.index().existsForNodes( indexName ) )
             throw new BadInputException(Index doesn't exist, new
 NotFoundException());

         IndexNode index = graphDb.index().forNodes( indexName );

         if (index.get(key, value).size()  0)
             throw new BadInputException(Key/value pair found in index);
         return null;
     }
 }

 I'm still not entirely certain that this is the appropriate way to go;
 probably a better solution would be a more general add node with
 unique, indexed fields command that's slightly more functional than
 this batch-operation-quirks based hack. As an aside -- does anyone
 know when/if lists of maps for parameters will be implemented for REST
 plugins?

 Thanks for the response!

 -T

 On Thu, Sep 22, 2011 at 4:57 PM, Linan Wang tali.w...@gmail.com wrote:

 Hi,
 i had the issue few days ago and thanks to McKinley I got a workable
 solution. i think the best way to do is through unmanaged extension.
 the overhead of multiple REST calls could make the matter more
 complex.

 here is part of my ObjectFactory class. in my situation it's an
 external id needs to be uniq. feel free to correct my codes :) the
 performance is not ideal though. on my imac I got around 50 insertions
 per sec. the bottle neck is not memory.

        public T get(long externalId)
        {
                // try asynchronized read first;
                IndexNode idx = getDefaultNodeIndex();

                IndexHitsNode h = idx.get(IDX_KEY_EXTERNAL_ID,
 externalId);
                Node n = h.getSingle();
                h.close();

                if(n != null)
                        return wrap(n);

                // if not found, try synchronized version;
                return null;
        }

        public T getOrCreate(long externalId)
        {

                T ret = get( externalId );
                if(ret != null)
                        return ret;

                // if not found, try synchronized version;
                return synchronizedGetOrCreate(externalId);
        }

        private synchronized T synchronizedGetOrCreate(long externalId)
        {
                // Just in case!
                T ret = get( externalId );
                if(ret != null)
                        return ret;

                IndexNode idx = getDefaultNodeIndex();
                Node n = null;

                Transaction tx = db.beginTx();

                try{
                        n = db.createNode();

                        // set property
                        n.setProperty(AbstractObject.EXTERNAL_ID_KEY,
 externalId);

                        // add to default index;
                        idx.add(n, IDX_KEY_EXTERNAL_ID, externalId);

                        tx.success();
                }catch(Exception e){
                        tx.failure();
                }finally{
                        tx.finish();
   

[Neo4j] See the graph in the Neo4J embedded db

2011-09-28 Thread andrew ton


Hello, 
I have stored triples into the Neo4J embedded db, now I want to see the 
graph or data in the db. How can I do it? 

Thanks,
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] See the graph in the Neo4J embedded db

2011-09-28 Thread noppanit
You could use neoclipse to see it. 

Sent from my BlackBerry® wireless device

-Original Message-
From: tt6 [via Neo4j Community Discussions] 
ml-node+s438527n3377257...@n3.nabble.com
Date: Wed, 28 Sep 2011 13:23:29 
To: noppanitnoppani...@gmail.com
Subject: [Neo4j] See the graph in the Neo4J embedded db





Hello, 
I have stored triples into the Neo4J embedded db, now I want to see the 
graph or data in the db. How can I do it? 

Thanks,
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


___
If you reply to this email, your message will be added to the discussion below:
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-See-the-graph-in-the-Neo4J-embedded-db-tp3377257p3377257.html
To start a new topic under Neo4j Community Discussions, email 
ml-node+s438527n438527...@n3.nabble.com
To unsubscribe from Neo4j Community Discussions, visit 
http://neo4j-community-discussions.438527.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=438527code=bm9wcGFuaXQuY0BnbWFpbC5jb218NDM4NTI3fDExOTIzNzAyNjk=


--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-See-the-graph-in-the-Neo4J-embedded-db-tp3377257p3377301.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Forward slashes in index values

2011-09-28 Thread jadell
Thanks for the heads up, Jim.  On a tangentially related note, I filed this
request: https://github.com/neo4j/community/issues/35

Basically, in the future, it would be useful to have a way to determine the
server version via REST so the various clients can account for differences
in the protocol like this.

Thanks!

-- Josh Adell

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Forward-slashes-in-index-values-tp3347515p3377304.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Neo4J Rest server support SPARQL??

2011-09-28 Thread andrew ton


Hi,
After adding nodes and relationships into Neo4J REST server using REST API. How 
do I read data from the database using SPARQL? Does the database support SPARQL?

Regards,
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4J Rest server support SPARQL??

2011-09-28 Thread Marko Rodriguez
Hey,

 After adding nodes and relationships into Neo4J REST server using REST API. 
 How do I read data from the database using SPARQL? Does the database support 
 SPARQL?

Neo4j is not an RDF database in its raw form. Its data model is a bit more 
complicated than RDF and as such, is not amenable to SPARQL which assumes only 
an edge-labeled graph. However, with that said, the pattern matching 
functionality of Cypher is somewhat analogous to SPARQL so you might find 
solace in that. Moreover, you can also use Gremlin for pattern matching, though 
it doesn't have the same look-and-feel as SPARQL (see 
https://github.com/tinkerpop/gremlin/wiki/SPARQL-vs.-Gremlin ).

Next. If you actually have used GraphSail (via Blueprints) to model your data 
as an RDF graph in Neo4j, then you can access it via Sesame SPARQL engine --- 
however, as it stands, not via the Neo4j REST server without rolling your own 
extension. If you are so inclined, you can either use Rexster 
(http://rexster.tinkerpop.com) and its SPARQL kibble or steal the code in 
Rexster's SPARQL kibble and make it work for Neo4j Server (shouldn't be more 
than an a few hours work).

see http://rexster-kibbles.tinkerpop.com/

https://github.com/tinkerpop/rexster-kibbles/tree/master/sparql-kibble

Hope that is clear,
Marko.

http://markorodriguez.com

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Execute SPARQL on Neo4J REST database?

2011-09-28 Thread andrew ton
Hi,
After adding nodes and relationships into Neo4J REST server using REST API. How 
do I read data from the database using SPARQL? Does the database support SPARQL?

Regards,
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Forward slashes in index values

2011-09-28 Thread Peter Neubauer
Good call Josh,
Valid and much appreciated!

/peter

Sent from my phone.
On Sep 28, 2011 10:33 PM, jadell josh.ad...@gmail.com wrote:
 Thanks for the heads up, Jim. On a tangentially related note, I filed this
 request: https://github.com/neo4j/community/issues/35

 Basically, in the future, it would be useful to have a way to determine
the
 server version via REST so the various clients can account for differences
 in the protocol like this.

 Thanks!

 -- Josh Adell

 --
 View this message in context:
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Forward-slashes-in-index-values-tp3347515p3377304.html
 Sent from the Neo4j Community Discussions mailing list archive at
Nabble.com.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] REST, Transactions and Uniqueness

2011-09-28 Thread Peter Neubauer
Linan,
It's high prio in the backlog for 1.6, so this WILL be taken care of. I
believe there is also an issue on this on Github? If not, please raise one
to track progress for the community. Thanks!

/peter

Sent from my phone.
On Sep 28, 2011 10:02 PM, Linan Wang tali.w...@gmail.com wrote:
 Peter,
 I feel uniqueness has been a recurring theme in neo4j applications,
 especially when it's used heavily on algorithms traversing existing
 data. it would be great if it's supported in kernel level:

 interface NodeUniquenessConstraint
 {
 public Node getNode();
 public void setupNode(Node newNode);
 }

 public Node getOrCreateNode(NodeUniquenessConstraint constraint)
 {
 // Preparation, acquires lock, etc.
 Node n = constraint.getNode();
 if(n == null)
 {
 n = createNode();
 constraint.setupNode(n);
 }
 ...
 return n;
 }

 or, there is something similar already implemented?

 On Tue, Sep 27, 2011 at 9:38 PM, Peter Neubauer
 peter.neuba...@neotechnology.com wrote:
 Guys,
 Maps are now supported as parameters, look at the Gremlin plugin för
 reference in the docs. Will add that for parameters to the cypher plugin
 too.

 Thanks for chipping in!

 /peter

 Sent from my phone.
 On Sep 27, 2011 8:12 PM, Tony Wooster twoos...@gmail.com wrote:
 Hi Linan,

 That's essentially what I implemented, but the logic just became that
 much more tortured when going over REST. Like I said, less of a Java
 programmer. The implementation I came up with on the REST side (hacky
 though it may be) was this:

 @Description( An extension to help maintain unique relationships )
 public class IndexTester extends ServerPlugin
 {
 @Name( error_if_in_node_index )
 @Description( Will return a 4xx error if a key/value pair is found
in
 +
   a given index. Also errors if the index doesn't
 exist.)
 @PluginTarget( GraphDatabaseService.class )
 public Boolean errorIfInNodeIndex(
 @Source GraphDatabaseService graphDb,
 @Description( Name of the index to earch. )
 @Parameter( name = indexName ) String indexName,
 @Description( Name of key to search. )
 @Parameter( name = key ) String key,
 @Description( Value to search for. )
 @Parameter( name = value ) String value )
 throws BadInputException
 {

 if ( !graphDb.index().existsForNodes( indexName ) )
 throw new BadInputException(Index doesn't exist, new
 NotFoundException());

 IndexNode index = graphDb.index().forNodes( indexName );

 if (index.get(key, value).size()  0)
 throw new BadInputException(Key/value pair found in
index);
 return null;
 }
 }

 I'm still not entirely certain that this is the appropriate way to go;
 probably a better solution would be a more general add node with
 unique, indexed fields command that's slightly more functional than
 this batch-operation-quirks based hack. As an aside -- does anyone
 know when/if lists of maps for parameters will be implemented for REST
 plugins?

 Thanks for the response!

 -T

 On Thu, Sep 22, 2011 at 4:57 PM, Linan Wang tali.w...@gmail.com wrote:

 Hi,
 i had the issue few days ago and thanks to McKinley I got a workable
 solution. i think the best way to do is through unmanaged extension.
 the overhead of multiple REST calls could make the matter more
 complex.

 here is part of my ObjectFactory class. in my situation it's an
 external id needs to be uniq. feel free to correct my codes :) the
 performance is not ideal though. on my imac I got around 50 insertions
 per sec. the bottle neck is not memory.

public T get(long externalId)
{
// try asynchronized read first;
IndexNode idx = getDefaultNodeIndex();

IndexHitsNode h = idx.get(IDX_KEY_EXTERNAL_ID,
 externalId);
Node n = h.getSingle();
h.close();

if(n != null)
return wrap(n);

// if not found, try synchronized version;
return null;
}

public T getOrCreate(long externalId)
{

T ret = get( externalId );
if(ret != null)
return ret;

// if not found, try synchronized version;
return synchronizedGetOrCreate(externalId);
}

private synchronized T synchronizedGetOrCreate(long externalId)
{
// Just in case!
T ret = get( externalId );
if(ret != null)
return ret;

IndexNode idx = getDefaultNodeIndex();
Node n = null;

Transaction tx = db.beginTx();

try{
n = db.createNode();

// set property
n.setProperty(AbstractObject.EXTERNAL_ID_KEY,
 externalId);


Re: [Neo4j] See the graph in the Neo4J embedded db

2011-09-28 Thread Mattias Persson
Or webadmin...

1) download the neo4j package
2) put your db in neo4j-dir/data/graph.db/ and start it
3) go to http://localhost:7474, click tab Data Browser and then the right
most button for visualization mode

there's you can see your graph.

2011/9/28 noppanit noppani...@gmail.com

 You could use neoclipse to see it.

 Sent from my BlackBerry® wireless device

 -Original Message-
 From: tt6 [via Neo4j Community Discussions] 
 ml-node+s438527n3377257...@n3.nabble.com
 Date: Wed, 28 Sep 2011 13:23:29
 To: noppanitnoppani...@gmail.com
 Subject: [Neo4j] See the graph in the Neo4J embedded db





 Hello,
 I have stored triples into the Neo4J embedded db, now I want to see the
 graph or data in the db. How can I do it?

 Thanks,
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user


 ___
 If you reply to this email, your message will be added to the discussion
 below:

 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-See-the-graph-in-the-Neo4J-embedded-db-tp3377257p3377257.html
 To start a new topic under Neo4j Community Discussions, email
 ml-node+s438527n438527...@n3.nabble.com
 To unsubscribe from Neo4j Community Discussions, visit
 http://neo4j-community-discussions.438527.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=438527code=bm9wcGFuaXQuY0BnbWFpbC5jb218NDM4NTI3fDExOTIzNzAyNjk=


 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-See-the-graph-in-the-Neo4J-embedded-db-tp3377257p3377301.html
 Sent from the Neo4j Community Discussions mailing list archive at
 Nabble.com.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] REST, Transactions and Uniqueness

2011-09-28 Thread Tony Wooster
Peter,

Thanks for replying. That's great to hear (the last I heard was just
that it wasn't going to make it into 1.5), elsewhere on the forums. I
know there's an issue tracking uniqueness in indices somewhere -- I
think on GitHub already.

In the meantime, you mentioned that maps are available as parameters
to extensions. Could you provide an example of how to use this? No
matter what I try, I'm getting errors like:

WARNING: Failed to load plugin [ServerPlugin[IndexAdder]]: Unsupported
parameter type: java.util.Mapjava.lang.String, java.lang.Object[]

... or ...

WARNING: Failed to load plugin [ServerPlugin[IndexAdder]]: Unsupported
parameter type: java.util.Mapjava.lang.String, java.lang.Object

... or ...

WARNING: Failed to load plugin [ServerPlugin[IndexAdder]]: Unsupported
parameter type: interface java.util.Map

Like I said previously, I'm not too hot on Java, but having spent a
lot of time reading the source code and a bit on java reflection, I
can't quite figure out how to specify Map types in the parameter list
to my extension. My attempts of:

public Node addUniqueNode(
@Source GraphDatabaseService graphDb,
@Description( Map of indexName : bodyKeys to search. )
@Parameter( name = indices )
MapString,String[] indices )

or, similarly:

@Parameter( name = indices ) MapString,Object indices )

or,

@Parameter( name = indices ) Map indices )

All failed. I just can't see how to wheedle at Map through
parameterExtractor in PluginPointFactoryImpl.java. Any ideas here?

Thanks much,

-Tony


On Wed, Sep 28, 2011 at 2:10 PM, Peter Neubauer
peter.neuba...@neotechnology.com wrote:
 Linan,
 It's high prio in the backlog for 1.6, so this WILL be taken care of. I
 believe there is also an issue on this on Github? If not, please raise one
 to track progress for the community. Thanks!

 /peter

 Sent from my phone.
 On Sep 28, 2011 10:02 PM, Linan Wang tali.w...@gmail.com wrote:
 Peter,
 I feel uniqueness has been a recurring theme in neo4j applications,
 especially when it's used heavily on algorithms traversing existing
 data. it would be great if it's supported in kernel level:

 interface NodeUniquenessConstraint
 {
 public Node getNode();
 public void setupNode(Node newNode);
 }

 public Node getOrCreateNode(NodeUniquenessConstraint constraint)
 {
 // Preparation, acquires lock, etc.
 Node n = constraint.getNode();
 if(n == null)
 {
 n = createNode();
 constraint.setupNode(n);
 }
 ...
 return n;
 }

 or, there is something similar already implemented?

 On Tue, Sep 27, 2011 at 9:38 PM, Peter Neubauer
 peter.neuba...@neotechnology.com wrote:
 Guys,
 Maps are now supported as parameters, look at the Gremlin plugin för
 reference in the docs. Will add that for parameters to the cypher plugin
 too.

 Thanks for chipping in!

 /peter

 Sent from my phone.
 On Sep 27, 2011 8:12 PM, Tony Wooster twoos...@gmail.com wrote:
 Hi Linan,

 That's essentially what I implemented, but the logic just became that
 much more tortured when going over REST. Like I said, less of a Java
 programmer. The implementation I came up with on the REST side (hacky
 though it may be) was this:

 @Description( An extension to help maintain unique relationships )
 public class IndexTester extends ServerPlugin
 {
     @Name( error_if_in_node_index )
     @Description( Will return a 4xx error if a key/value pair is found
 in
 +
                   a given index. Also errors if the index doesn't
 exist.)
     @PluginTarget( GraphDatabaseService.class )
     public Boolean errorIfInNodeIndex(
                 @Source GraphDatabaseService graphDb,
                 @Description( Name of the index to earch. )
                     @Parameter( name = indexName ) String indexName,
                 @Description( Name of key to search. )
                     @Parameter( name = key ) String key,
                 @Description( Value to search for. )
                     @Parameter( name = value ) String value )
             throws BadInputException
     {

         if ( !graphDb.index().existsForNodes( indexName ) )
             throw new BadInputException(Index doesn't exist, new
 NotFoundException());

         IndexNode index = graphDb.index().forNodes( indexName );

         if (index.get(key, value).size()  0)
             throw new BadInputException(Key/value pair found in
 index);
         return null;
     }
 }

 I'm still not entirely certain that this is the appropriate way to go;
 probably a better solution would be a more general add node with
 unique, indexed fields command that's slightly more functional than
 this batch-operation-quirks based hack. As an aside -- does anyone
 know when/if lists of maps for parameters will be implemented for REST
 plugins?

 Thanks for the response!

 -T

 On Thu, Sep 22, 2011 at 4:57 PM, Linan Wang tali.w...@gmail.com wrote:

 Hi,
 i had the issue few days ago and thanks to McKinley I got a workable
 

Re: [Neo4j] InvalidRecordException: Record[1983624] not in useRecord[1983624] not in use

2011-09-28 Thread Mattias Persson
So maybe you've hit yet another BatchInserter bug... will have to run a
similar test and try to reproduce it. Can it be reproduced consistently and
with varying data sets/sizes? Can you reproduce it if not using
BatchInserter?

2011/9/28 René Pickhardt r.pickha...@googlemail.com

 I used the current stable release and the problem did not arise anymore but
 I got new problems.

 for many nodes even though (according to the data set they should have
 relations) the
 function  (n.hasRelationship(DynamicRelationshipType.withName( UPDATE ),
 Direction.BOTH)) does not stop. It just seems to jump into an endless loop
 ;(

 I don't think I made a mistake in the code for the batch inserter but i
 just
 attached it. My insertion contains of two steps:

 first I create many node in the graph and store them also in an index:
 batchArticle. I do not query agains the index to check if a node with this
 key already existed. But my keys are unique.

 private void AddBatchNode(String key, String title){
 MapString,Object properties = new HashMapString,Object();

 properties.put( key, key );
 properties.put( title, title );
  properties.put( timestamp, 1 );
 long node = inserter.createNode( properties );

 properties = MapUtil.map( key, key );
 batchArticle.add( node, properties );
  }

 then I attach many updates (also nodes encoded via timestamp) to every node
 and connect them via a relationship.

 private void BatchUpdate(String timestamp, String key) {
 if (batchArticle.get(key, key).getSingle()!=null){
  long node = batchArticle.get(key, key).getSingle();
 MapString,Object properties = new HashMapString,Object();
  properties.put( timestamp, timestamp );
  long ci = inserter.createNode( properties );

 inserter.createRelationship( node, ci, DynamicRelationshipType.withName(
 UPDATE ),null);
 }
  }

 the last step (i did not implement this) is to connect the nodes from the
 first steps via friendship relations. But I wanted to do some testing
 first...

 anyone knows of this problem?

 2011/9/28 Rick Bullotta rick.bullo...@thingworx.com

  Hi, René.
 
  I recognized your error almost immediately, since we encountered it in an
  early 1.4 beta. ;-)
 
  I think you'll have a good result if you can switch to the 1.4.1 release!
 
  Best,
 
  Rick
 
  -Original Message-
  From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
  On Behalf Of René Pickhardt
  Sent: Wednesday, September 28, 2011 10:29 AM
  To: Neo4j user discussions
  Subject: Re: [Neo4j] InvalidRecordException: Record[1983624] not in
  useRecord[1983624] not in use
 
  Hey guys,
 
  I don't know how I found the old milestone. I was downloading it once I
  started using neo4j.
 
  I will just migrate to the current stable version and tell you afterwards
  if
  I still have problems. by your comments I guess the problem will be
 solved.
  Thanks so far!
 
  best regards René
 
  2011/9/28 Mattias Persson matt...@neotechnology.com
 
   I'm curious to know how you found that old milestone also :) you picked
  the
   one out of extremely few having some kind of data problems.
  
   Den onsdagen den 28:e september 2011 skrev Chris Gioran
   chris.gio...@neotechnology.com:
Hi Rene,
   
According to git log, 1,4.M04 was tagged 10/06/2011, while the fix
 for
a bug in the BatchInserterImpl that caused corrupted stores which
 gave
the message you are seeing is
   
   
  
  
 
 https://github.com/neo4j/community/commit/71fbe4ac1174fad16a7bb154c9f78d3f1b377248
   
which has a date of 04/07/2011.
   
This makes 1.4.M06 the earliest release to use that does not have
 this
issue or, even better, go for 1.4.1 which is the latest stable
release. Since you are comfortable using milestones, 1.5.M01 might be
of interest to you.
   
http://neo4j.org/download has the links that you need.
   
hope that helped,
CG
   
2011/9/28 René Pickhardt r.pickha...@googlemail.com:
Neo1.4.M04 community edition no self build.
   
2011/9/28 Mattias Persson matt...@neotechnology.com
   
Which version of neo4j did you use to import your data, was it a
downloadable package, from maven or building yourself from a
 branch?
   
2011/9/28 René Pickhardt r.pickha...@googlemail.com
   
 hey everyone

 I got a strange error message that a record is not in use if I
 call
 hasRelationship() function even though I checked against null
  before!
   My
 real purpose was to start the traverser but it exited with the
 same
   error
 message. That is why I put the n.hasRelationship which also would
  not
work.

 I imported a graph with 50 mio. nodes and about the same size of
 relationships. (though I am about to import more relationships
  later
   on)
I
 put 2 mio. nodes in a lucence index called article.

 the counting variable t has the value 2385 (so the first 2385
 calls
   work
 fine) if I skip this node the same problem accoures again at t =
   3239.
 

[Neo4j] Neo4J support Android platform??

2011-09-28 Thread andrew ton


Hello,

I'm playing around with Neo4J (both embedded and REST server). I have a 
question that can we use Neo4J on mobile platforms, e.g. Android? 

Regards,
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Open Data Sets?

2011-09-28 Thread McKinley
I want to create some demos of relational database extraction into Neo4j but
I cannot share the data I use with the public. I know there are several
resources for open data sets on the net, but has anyone on the list already
found a nice, large data set that you are happy with?

Thanks,

McKinley
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] See the graph in the Neo4J embedded db

2011-09-28 Thread andrew ton


Hi noppanit,

Thank you for your quick reply! I have 
checked http://wiki.neo4j.org/content/Neoclipse#Configuration about Neoclipse. 
Where can I find Neoclipse? The donwload page just show neo4j packages. I am 
using neo4j-community-1.5.M01 as REST server. In eclipse I use neo4j API to 
store data into embedded database.

I really appreciate your help if you can give me clear information. Thank you!

Regards,



From: noppanit noppani...@gmail.com
To: user@lists.neo4j.org
Sent: Wednesday, September 28, 2011 1:33 PM
Subject: Re: [Neo4j] See the graph in the Neo4J embedded db

You could use neoclipse to see it. 

Sent from my BlackBerry® wireless device

-Original Message-
From: tt6 [via Neo4j Community Discussions] 
ml-node+s438527n3377257...@n3.nabble.com
Date: Wed, 28 Sep 2011 13:23:29 
To: noppanitnoppani...@gmail.com
Subject: [Neo4j] See the graph in the Neo4J embedded db





Hello, 
I have stored triples into the Neo4J embedded db, now I want to see the 
graph or data in the db. How can I do it? 

Thanks,
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


___
If you reply to this email, your message will be added to the discussion below:
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-See-the-graph-in-the-Neo4J-embedded-db-tp3377257p3377257.html
To start a new topic under Neo4j Community Discussions, email 
ml-node+s438527n438527...@n3.nabble.com
To unsubscribe from Neo4j Community Discussions, visit 
http://neo4j-community-discussions.438527.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=438527code=bm9wcGFuaXQuY0BnbWFpbC5jb218NDM4NTI3fDExOTIzNzAyNjk=


--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-See-the-graph-in-the-Neo4J-embedded-db-tp3377257p3377301.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4J support Android platform??

2011-09-28 Thread noppanit
I think if you can use REST then it won't be a problem. And I think most
mobile platforms support REST and HTTP.

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Neo4J-support-Android-platform-tp3377564p3377651.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4J support Android platform??

2011-09-28 Thread tt6

Hi noppanit,

I meant that if I have an Android application then can my Android
application stores data in a Neo4J database in the device?

Thanks

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Neo4J-support-Android-platform-tp3377564p3377666.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] REST, Transactions and Uniqueness

2011-09-28 Thread Linan Wang
peter,
a quick implementation is submitted. pull request sent. my naming
ability is probably not the best part. see if the codes make sense.
thanks.

On Wed, Sep 28, 2011 at 10:10 PM, Peter Neubauer
peter.neuba...@neotechnology.com wrote:
 Linan,
 It's high prio in the backlog for 1.6, so this WILL be taken care of. I
 believe there is also an issue on this on Github? If not, please raise one
 to track progress for the community. Thanks!

 /peter

 Sent from my phone.
 On Sep 28, 2011 10:02 PM, Linan Wang tali.w...@gmail.com wrote:
 Peter,
 I feel uniqueness has been a recurring theme in neo4j applications,
 especially when it's used heavily on algorithms traversing existing
 data. it would be great if it's supported in kernel level:

 interface NodeUniquenessConstraint
 {
 public Node getNode();
 public void setupNode(Node newNode);
 }

 public Node getOrCreateNode(NodeUniquenessConstraint constraint)
 {
 // Preparation, acquires lock, etc.
 Node n = constraint.getNode();
 if(n == null)
 {
 n = createNode();
 constraint.setupNode(n);
 }
 ...
 return n;
 }

 or, there is something similar already implemented?

 On Tue, Sep 27, 2011 at 9:38 PM, Peter Neubauer
 peter.neuba...@neotechnology.com wrote:
 Guys,
 Maps are now supported as parameters, look at the Gremlin plugin för
 reference in the docs. Will add that for parameters to the cypher plugin
 too.

 Thanks for chipping in!

 /peter

 Sent from my phone.
 On Sep 27, 2011 8:12 PM, Tony Wooster twoos...@gmail.com wrote:
 Hi Linan,

 That's essentially what I implemented, but the logic just became that
 much more tortured when going over REST. Like I said, less of a Java
 programmer. The implementation I came up with on the REST side (hacky
 though it may be) was this:

 @Description( An extension to help maintain unique relationships )
 public class IndexTester extends ServerPlugin
 {
     @Name( error_if_in_node_index )
     @Description( Will return a 4xx error if a key/value pair is found
 in
 +
                   a given index. Also errors if the index doesn't
 exist.)
     @PluginTarget( GraphDatabaseService.class )
     public Boolean errorIfInNodeIndex(
                 @Source GraphDatabaseService graphDb,
                 @Description( Name of the index to earch. )
                     @Parameter( name = indexName ) String indexName,
                 @Description( Name of key to search. )
                     @Parameter( name = key ) String key,
                 @Description( Value to search for. )
                     @Parameter( name = value ) String value )
             throws BadInputException
     {

         if ( !graphDb.index().existsForNodes( indexName ) )
             throw new BadInputException(Index doesn't exist, new
 NotFoundException());

         IndexNode index = graphDb.index().forNodes( indexName );

         if (index.get(key, value).size()  0)
             throw new BadInputException(Key/value pair found in
 index);
         return null;
     }
 }

 I'm still not entirely certain that this is the appropriate way to go;
 probably a better solution would be a more general add node with
 unique, indexed fields command that's slightly more functional than
 this batch-operation-quirks based hack. As an aside -- does anyone
 know when/if lists of maps for parameters will be implemented for REST
 plugins?

 Thanks for the response!

 -T

 On Thu, Sep 22, 2011 at 4:57 PM, Linan Wang tali.w...@gmail.com wrote:

 Hi,
 i had the issue few days ago and thanks to McKinley I got a workable
 solution. i think the best way to do is through unmanaged extension.
 the overhead of multiple REST calls could make the matter more
 complex.

 here is part of my ObjectFactory class. in my situation it's an
 external id needs to be uniq. feel free to correct my codes :) the
 performance is not ideal though. on my imac I got around 50 insertions
 per sec. the bottle neck is not memory.

        public T get(long externalId)
        {
                // try asynchronized read first;
                IndexNode idx = getDefaultNodeIndex();

                IndexHitsNode h = idx.get(IDX_KEY_EXTERNAL_ID,
 externalId);
                Node n = h.getSingle();
                h.close();

                if(n != null)
                        return wrap(n);

                // if not found, try synchronized version;
                return null;
        }

        public T getOrCreate(long externalId)
        {

                T ret = get( externalId );
                if(ret != null)
                        return ret;

                // if not found, try synchronized version;
                return synchronizedGetOrCreate(externalId);
        }

        private synchronized T synchronizedGetOrCreate(long externalId)
        {
                // Just in case!
                T ret = get( externalId );
                if(ret != null)
                        return ret;

                IndexNode idx = getDefaultNodeIndex();
                Node n = null;

    

Re: [Neo4j] REST, Transactions and Uniqueness

2011-09-28 Thread Tony Wooster
Scratch that question...

Got it working. I didn't realize that Map parameters wasn't available
in stable 1.4.1. On the other hand, I also found what I believe to be
a bug?

I have an extension with the following signature:

@PluginTarget( GraphDatabaseService.class )
public Node addUniqueNode(
@Source GraphDatabaseService graphDb,
@Description( Map of indexName : bodyKeys to search. )
@Parameter( name = indices ) Map indices,
@Description( Node body )
@Parameter( name = body ) Map body )
throws BadInputException

I can POST against it, and it runs fine. However, trying to fetch
extension information yields:

http get /db/data/ext/IndexAdder/graphdb/add_unique_node
== 500 Internal Server Error
== html
== head
== meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1/
== titleError 500 INTERNAL_SERVER_ERROR/title
== /head
== bodyh2HTTP ERROR 500/h2
== pProblem accessing
/db/data/ext/IndexAdder/graphdb/add_unique_node. Reason:
== preINTERNAL_SERVER_ERROR/pre/ph3Caused
by:/h3prejava.lang.NullPointerException
== at 
org.neo4j.server.rest.repr.ExtensionPointRepresentation$ParameterRepresentation.serialize(ExtensionPointRepresentation.java:110)
== at org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:40)
== at 
org.neo4j.server.rest.repr.ListSerializer.addMapping(ListSerializer.java:56)
== at 
org.neo4j.server.rest.repr.MappingRepresentation.addTo(MappingRepresentation.java:52)
== at 
org.neo4j.server.rest.repr.ListRepresentation.serialize(ListRepresentation.java:60)
== at org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:73)
== at 
org.neo4j.server.rest.repr.MappingSerializer.putList(MappingSerializer.java:61)
== at 
org.neo4j.server.rest.repr.ListRepresentation.putTo(ListRepresentation.java:73)
== at 
org.neo4j.server.rest.repr.ObjectRepresentation$PropertyGetter.putTo(ObjectRepresentation.java:132)
== at 
org.neo4j.server.rest.repr.ObjectRepresentation.serialize(ObjectRepresentation.java:143)
== at 
org.neo4j.server.rest.repr.MappingRepresentation.serialize(MappingRepresentation.java:42)
== at org.neo4j.server.rest.repr.OutputFormat.format(OutputFormat.java:123)
== at 
org.neo4j.server.rest.repr.OutputFormat.response(OutputFormat.java:100)
== at org.neo4j.server.rest.repr.OutputFormat.ok(OutputFormat.java:48)
== at 
org.neo4j.server.rest.web.ExtensionService.getGraphDatabaseExtensionDescription(ExtensionService.java:148)
... snip ...

-Tony


On Wed, Sep 28, 2011 at 2:45 PM, Tony Wooster twoos...@gmail.com wrote:
 Peter,

 Thanks for replying. That's great to hear (the last I heard was just
 that it wasn't going to make it into 1.5), elsewhere on the forums. I
 know there's an issue tracking uniqueness in indices somewhere -- I
 think on GitHub already.

 In the meantime, you mentioned that maps are available as parameters
 to extensions. Could you provide an example of how to use this? No
 matter what I try, I'm getting errors like:

 WARNING: Failed to load plugin [ServerPlugin[IndexAdder]]: Unsupported
 parameter type: java.util.Mapjava.lang.String, java.lang.Object[]

 ... or ...

 WARNING: Failed to load plugin [ServerPlugin[IndexAdder]]: Unsupported
 parameter type: java.util.Mapjava.lang.String, java.lang.Object

 ... or ...

 WARNING: Failed to load plugin [ServerPlugin[IndexAdder]]: Unsupported
 parameter type: interface java.util.Map

 Like I said previously, I'm not too hot on Java, but having spent a
 lot of time reading the source code and a bit on java reflection, I
 can't quite figure out how to specify Map types in the parameter list
 to my extension. My attempts of:

    public Node addUniqueNode(
                @Source GraphDatabaseService graphDb,
                @Description( Map of indexName : bodyKeys to search. )
                    @Parameter( name = indices )
 MapString,String[] indices )

 or, similarly:

                    @Parameter( name = indices ) MapString,Object indices )

 or,

                    @Parameter( name = indices ) Map indices )

 All failed. I just can't see how to wheedle at Map through
 parameterExtractor in PluginPointFactoryImpl.java. Any ideas here?

 Thanks much,

 -Tony


 On Wed, Sep 28, 2011 at 2:10 PM, Peter Neubauer
 peter.neuba...@neotechnology.com wrote:
 Linan,
 It's high prio in the backlog for 1.6, so this WILL be taken care of. I
 believe there is also an issue on this on Github? If not, please raise one
 to track progress for the community. Thanks!

 /peter

 Sent from my phone.
 On Sep 28, 2011 10:02 PM, Linan Wang tali.w...@gmail.com wrote:
 Peter,
 I feel uniqueness has been a recurring theme in neo4j applications,
 especially when it's used heavily on algorithms traversing existing
 data. it would be great if it's supported in kernel level:

 interface NodeUniquenessConstraint
 {
 public Node getNode();
 public void setupNode(Node 

Re: [Neo4j] See the graph in the Neo4J embedded db

2011-09-28 Thread Adriano Henrique de Almeida
Andrew, check out the download page:

http://neo4j.org/download/, you can find Neoclipse at the bottom of the
page.

Regards

2011/9/28 andrew ton andrewt...@yahoo.com



 Hi noppanit,

 Thank you for your quick reply! I have checked
 http://wiki.neo4j.org/content/Neoclipse#Configuration about Neoclipse.
 Where can I find Neoclipse? The donwload page just show neo4j packages. I
 am using neo4j-community-1.5.M01 as REST server. In eclipse I use neo4j API
 to store data into embedded database.

 I really appreciate your help if you can give me clear information. Thank
 you!

 Regards,


 
 From: noppanit noppani...@gmail.com
 To: user@lists.neo4j.org
 Sent: Wednesday, September 28, 2011 1:33 PM
 Subject: Re: [Neo4j] See the graph in the Neo4J embedded db

 You could use neoclipse to see it.

 Sent from my BlackBerry® wireless device

 -Original Message-
 From: tt6 [via Neo4j Community Discussions] 
 ml-node+s438527n3377257...@n3.nabble.com
 Date: Wed, 28 Sep 2011 13:23:29
 To: noppanitnoppani...@gmail.com
 Subject: [Neo4j] See the graph in the Neo4J embedded db





 Hello,
 I have stored triples into the Neo4J embedded db, now I want to see the
 graph or data in the db. How can I do it?

 Thanks,
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user


 ___
 If you reply to this email, your message will be added to the discussion
 below:

 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-See-the-graph-in-the-Neo4J-embedded-db-tp3377257p3377257.html
 To start a new topic under Neo4j Community Discussions, email
 ml-node+s438527n438527...@n3.nabble.com
 To unsubscribe from Neo4j Community Discussions, visit
 http://neo4j-community-discussions.438527.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=438527code=bm9wcGFuaXQuY0BnbWFpbC5jb218NDM4NTI3fDExOTIzNzAyNjk=


 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-See-the-graph-in-the-Neo4J-embedded-db-tp3377257p3377301.html
 Sent from the Neo4j Community Discussions mailing list archive at
 Nabble.com.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] See the graph in the Neo4j embedded db

2011-09-28 Thread Reza Ameri
Hi,
I think you should use graph viewers like jung.

On Wed, Sep 28, 2011 at 11:50 PM, tt6 andrewt...@yahoo.com wrote:


 Hello,
 I have stored triples into the Neo4J embedded db, now I want to see the
 graph or data in the db. How can I do it?

 Thanks,

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/See-the-graph-in-the-Neo4j-embedded-db-tp3377246p3377246.html
 Sent from the Neo4j Community Discussions mailing list archive at
 Nabble.com.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Open Data Sets?

2011-09-28 Thread Peter Neubauer
Dbpedia is good in RDF. We should start making a list.

/peter

Sent from my phone.
On Sep 29, 2011 12:09 AM, McKinley mckinley1...@gmail.com wrote:
 I want to create some demos of relational database extraction into Neo4j
but
 I cannot share the data I use with the public. I know there are several
 resources for open data sets on the net, but has anyone on the list
already
 found a nice, large data set that you are happy with?

 Thanks,

 McKinley
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Open Data Sets?

2011-09-28 Thread Michael Hunger
and put them as ready to use neo4j databasen on http://example-data.neo4j.org

Cheers M

mobile mail please excuse brevity and typos

Am 29.09.2011 um 07:17 schrieb Peter Neubauer 
peter.neuba...@neotechnology.com:

 Dbpedia is good in RDF. We should start making a list.
 
 /peter
 
 Sent from my phone.
 On Sep 29, 2011 12:09 AM, McKinley mckinley1...@gmail.com wrote:
 I want to create some demos of relational database extraction into Neo4j
 but
 I cannot share the data I use with the public. I know there are several
 resources for open data sets on the net, but has anyone on the list
 already
 found a nice, large data set that you are happy with?
 
 Thanks,
 
 McKinley
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user