Re: [Neo4j] Fastest way to count relationships from a particular node.
Hey, What you suggest (a cache node) is an OK way of doing things. You could also inline the cached values in the node itself. Since managing relationships is atomic with respect to the cached counters, there will never be inconsistencies. Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] [Spring Data Graph] Precisions about Detached Entities and SDG under the hood
Hello, I'm currently testing some of Spring Data Graph features, and I have a few questions about some usages. Could someone explain to me how the following example works? I run the following unit test: @Test public void testUpdatingEntitiesNotInTransaction(){ Movie m = new Movie(); m.setTitle(Leon); m.persist(); Long id = m.getNodeId(); Movie retrievedMovie = movieRepository.findOne(id); m.setTitle(Babel); m.persist(); assertEquals(Leon, retrievedMovie.getTitle()); } And the assertion at the end fails, as retrievedMovie.getTitle() equals Babel and not Leon. This point is not really clear in the documentation : Does this occurs because of some cache? If so, is it the Neo4j cache? And what is exactly its scope : thread, session, ...? Or is any call to getters triggering an access to the database because of AspectJ? Anyway, unless I misundestood something, it's a bit confusing. Especially when used to APIs like Hibernate, which don't make any refresh of retrieved entities once we are outside of a transaction. When I read this in documentation, I don't expect that any persist operation affect other retrieved entities : Changing an attached entity inside a transaction will immediately write through the changes to the datastore. Whenever an entity is changed outside of a transaction it becomes detached. The changes are stored in the entity itself until the next call to persist(). All entities returned by library functions are initially in an attached state. Just as with any other entity, changing them outside of a transaction detaches them, and they must be reattached with persist() for the data to be saved. Maybe I have to precise some points : - I'm using Embedded database, with beforeTest cleaning - I don't use any transaction in this test. Thanks by advance for your help! Michel ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Neo4j High Availability
Hi, I am trying to configure Neo4J High availability. But I am getting some exceptions. The following are the configuration details. We have 3 Linux servers (Amazon cloud instances). Each one has Zookeeper 3.3.2 and Jetty 7. Deployed web application in Jetty by giving corresponding ha-server.conf as follows: ha.machine_id=1 ha.server=localhost:6001 ha.zoo_keeper_servers=internalip:2180, internalip:2180, internalip:2180 ha.pull_interval=5 enable_remote_shell = port=1331 Similary in linux server 2 and 3. Configured Zookeepr as follows: #server1.cfg tickTime=1 initLimit=50 syncLimit=10 dataDir=/usr/share/zookeeper-3.3.2/data/zookeeper1 clientPort=2183 server.1=ip-10-102-53-219.ec2.internal:2888:3888 server.2=ip-10-84-29-207.ec2.internal:2888:3888 server.3=ip-10-102-53-219.ec2.internal:2888:3888 Similary in linux server 2 and 3. Now started Jetty servers and Zookeeper servers. But I am getting the following exception at Web server Jetty servers. [main-SendThread(ipaddtress:2180)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.6.0_18] at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:592) ~[na:1.6.0_18] at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119) ~[zookeeper-3.3.2.jar:3.3.2-1031432] The following exceptions at Zookeeper servers: java.lang.InterruptedException at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2017) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2094) at java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:370) at org.apache.zookeeper.server.quorum.QuorumCnxManager$SendWorker.run(QuorumCnxManager.java:601) 2011-08-23 09:19:30,111 - WARN [Thread-48:QuorumCnxManager$SendWorker@621] - Send worker leaving thread 2011-08-23 09:19:30,113 - INFO [WorkerReceiver Thread:FastLeaderElection@496] - Notification: 3 (n.leader), 4294967353 (n.zxid), 1 (n.round), FOLLOWING (n.state), 2 (n.sid), LEADING (my state) 2011-08-23 09:20:30,127 - WARN [Thread-51:QuorumCnxManager$RecvWorker@702] - Connection broken for id 2, my id = 3, error = java.nio.channels.AsynchronousCloseException 2011-08-23 09:20:30,127 - WARN [Thread-50:QuorumCnxManager$SendWorker@612] - Interrupted while waiting for message on queue java.lang.InterruptedException at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2017) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2094) at java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:370) at org.apache.zookeeper.server.quorum.QuorumCnxManager$SendWorker.run(QuorumCnxManager.java:601) 2011-08-23 09:20:30,128 - WARN [Thread-50:QuorumCnxManager$SendWorker@621] - Send worker leaving thread 2011-08-23 09:20:30,130 - WARN [Thread-52:QuorumCnxManager$SendWorker@612] - Interrupted while waiting for message on queue java.lang.InterruptedException at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2017) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2094) at java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:370) at org.apache.zookeeper.server.quorum.QuorumCnxManager$SendWorker.run(QuorumCnxManager.java:601) 2011-08-23 09:20:30,130 - WARN [Thread-52:QuorumCnxManager$SendWorker@621] - Send worker leaving thread 2011-08-23 09:20:30,134 - INFO [WorkerReceiver Thread:FastLeaderElection@496] - Notification: 3 (n.leader), 4294967353 (n.zxid), 1 (n.round), FOLLOWING (n.state), 2 (n.sid), LEADING (my state) 2011-08-23 09:21:30,145 - WARN [Thread-54:QuorumCnxManager$SendWorker@612] - Interrupted while waiting for message on queue java.lang.InterruptedException at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2017) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2094) at java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:370) at org.apache.zookeeper.server.quorum.QuorumCnxManager$SendWorker.run(QuorumCnxManager.java:601) 2011-08-23 09:21:30,147 - WARN [Thread-54:QuorumCnxManager$SendWorker@621] - Send worker leaving thread 2011-08-23 09:21:30,149 - WARN [Thread-55:QuorumCnxManager$RecvWorker@702] - Connection broken
Re: [Neo4j] Announcing neo4django
Matt, very very cool, and a great contribution to the ecosystem! Now, Jake is working on a native Python upgrade from Tobias first stab, and it would be awesome to wire that in as an alternative way of connecting to your library, so you can choose either embedded or server use. I think Jake will update the list on the progress soonish! 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, Aug 17, 2011 at 1:00 AM, Matt Luongo m...@scholr.ly wrote: Graphistas, We just released an earlyish version of our Django / Neo4j REST integration on GitHub https://github.com/scholrly/neo4django. I wrote a couple paragraphs about it on my bloghttp://mattluongo.com/post/when-to-open-source. If you like it, make sure you thank Tobias for the original integration on which this was based, and Javier for the REST client it's using now. Please let me know what you think! If you have any questions, or are at all interested in contributing, feel free to talk to me or jump right in on GitHub - I can't wait to get this out into the wild. -- Matt Luongo Co-Founder, Scholr.ly ___ 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] Fuzzy Search Not Working :(
Romiko, thanks a lot for the update, I expanded the REST docs a bit to show this, see the manual http://docs.neo4j.org/chunked/snapshot/rest-api-indexes.html#rest-api-find-node-by-query that will be updated shortly from https://github.com/neo4j/community/commit/5e5ccfa95e9cc2598840728922e53aef02c8b470 Is that better? 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 Mon, Aug 22, 2011 at 11:52 PM, Romiko Derbynew romiko.derby...@readify.net wrote: For those that need to work with multiple words. This how fuzzy search works with multiple terms, the plus sign is used to separate the surname so the search below will match Bob The Builder , who is of course male :) http://localhost:5102/db/data/index/node/agency1-clients?query=+Name:Bobbie~%20+Name:Builder~%20AND%20Gender:Male -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Romiko Derbynew Sent: Tuesday, 23 August 2011 9:21 AM To: User@lists.neo4j.org Subject: Re: [Neo4j] Fuzzy Search Not Working :( Hi Guys, I got fuzzy search working now, I had to use the query version: http://localhost:5102/db/data/index/node/agency1-clients?query=Name:Bobbs~ :) From: Romiko Derbynew Sent: Monday, 22 August 2011 4:53 PM To: 'User@lists.neo4j.org' Subject: Fuzzy Search Not Working :( Hi Guys, The problem I am having is that I have created multiple index entries e.g. Key:Name Value: Joe Key:Name Value: Joe Blogs Works I am now querying the index, and can find Name:\Joe\ I am now querying the index, and can find Name:\Joe\~ I am now querying the index, and can find Name:\Joe Blogs\ I am now querying the index, and can find Name:\Joe Blogs\~ Does Not Work I am now querying the index, and can find Name:\Joey\~ This is not working, I also tried with a low matching value I am now querying the index, and can find Name:\Joey\~0.1 I am now querying the index, and can find Name:\Joey Blogs\~0.1 Please let me know what I am doing wrong here? I have tried doing these in the rest API calls e.g. /index/nodes/myindex/mykey:value~ Fi: I have completed building the .Net Api for Lucene Index Searches, Looks like this. If any .Net uses are keen to try out the full Client, it is on NUGet called Neo4jClient.Edge. ___ 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] Which one would perform better traversal or lucene index look up
If you haven't figured it out I'd say index is better suited for that, it's a virtually constant lookup time. 2011/7/29 noppani...@gmail.com Hi all, I'm trying to collecting website information and I'm using Jtidy to get something like title tag or some meta tag when crawling. However, I've got some serious performance issue which it takes some time to parse the whole page to just get one title. Every url will be inserted to neo4j even the duplicated ones. So, what I would like to do is to use traversal to lookup in neo4j if the url is collected already, just use the same title or should I use lucene index (not neo4j node index) to add url as key and store title, which one performs better in this case? Cheers, T. Sent from my BlackBerry® wireless device ___ 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] User Digest, Vol 53, Issue 95
Michael, Thanks for your quick answer. This leads me to two new points: - You said that an entity is attached when freshly loaded, but I found no way to explicitly detach entities. Am I right? If so, I think you should update the documentation which is quite confusing on this point, and explain clearly that detach entities should be used in a write-only mode. - Moreover, I think there could be some confusing side effects if entities always use read-through : Does this work with a cache or do the entities always read through the database? How would this example behave with two different clients : A client X does the following (let's say title property is indexed): 1. Movie retrievedMovie = movieRepository.findByPropertyValue(Babel); 2. output(retrievedMovie.getTitle()) // prepare some output like Web page 3. ... do some other operations 4. output(retrievedMovie.getTitle()) // for some reason, a second output is needed In the same time, a client Y executes the following code: 1. Movie retrievedMovie = movieRepository.findByPropertyValue(Babel); 2.retrievedMovie.setTitle(New title)); 3. retrievedMovie.persist(); 4. Some other stuff we don't care Which should be the value of the movie title for client X on step 4? Thanks by advance for your answer. Michel Date: Tue, 23 Aug 2011 11:42:13 +0200 From: Michael Hunger michael.hun...@neotechnology.com Subject: Re: [Neo4j] [Spring Data Graph] Precisions about Detached Entitiesand SDG under the hood To: Neo4j user discussions user@lists.neo4j.org Message-ID: 3a2f0a73-6183-4b32-a02a-7219f0a7f...@neotechnology.com Content-Type: text/plain; charset=us-ascii there are two states attached and detached: an entity is detached when it is created or when it is changed outside of a transaction. Otherwise (when it is freshly loaded, or after persist it is attached). For detached entities: persist() writes the changed properties and relationships to the graph. if attached (and inside of a tx) all changes are written directly. In your example you just overwrote the title with Babel and persisted that information to the graph, so the assert should say: The retrieved movie is attached, it is never detached, so it always refers to the node in the graph (read-through) (the data is _not_ copied). assertEquals(Babel, retrievedMovie.getTitle()); Attached entities read their data directly from the underlying node. HTH Michael The model is different to hibernate, as hibernate has no read-through. We would have loved not to support detached entities but as they are so common in web-frameworks we had to. The best way of working with SDG is to use domain level service methods which are transactional and do the interaction with the graph. Detached entities should just be used to (if at all) to persist user input (form data) from the UI. Am 23.08.2011 um 10:56 schrieb Michel Domenjoud: Hello, I'm currently testing some of Spring Data Graph features, and I have a few questions about some usages. Could someone explain to me how the following example works? I run the following unit test: @Test public void testUpdatingEntitiesNotInTransaction(){ Movie m = new Movie(); m.setTitle(Leon); m.persist(); Long id = m.getNodeId(); Movie retrievedMovie = movieRepository.findOne(id); m.setTitle(Babel); m.persist(); assertEquals(Leon, retrievedMovie.getTitle()); } And the assertion at the end fails, as retrievedMovie.getTitle() equals Babel and not Leon. This point is not really clear in the documentation : Does this occurs because of some cache? If so, is it the Neo4j cache? And what is exactly its scope : thread, session, ...? Or is any call to getters triggering an access to the database because of AspectJ? Anyway, unless I misundestood something, it's a bit confusing. Especially when used to APIs like Hibernate, which don't make any refresh of retrieved entities once we are outside of a transaction. When I read this in documentation, I don't expect that any persist operation affect other retrieved entities : Changing an attached entity inside a transaction will immediately write through the changes to the datastore. Whenever an entity is changed outside of a transaction it becomes detached. The changes are stored in the entity itself until the next call to persist(). All entities returned by library functions are initially in an attached state. Just as with any other entity, changing them outside of a transaction detaches them, and they must be reattached with persist() for the data to be saved. Maybe I have to precise some points : - I'm using Embedded database, with beforeTest cleaning - I don't use any transaction in this test. Thanks by advance for your help! Michel ___ Neo4j mailing list User@lists.neo4j.org
Re: [Neo4j] Checking for unfinished transactions
Transactions that haven't yet committed aren't written to the logical log so if you're about to check this at runtime it cannot be done in the same way. What you'd have to do is to monitor the transactions that are alive and maybe tie each to a client so that they can be rolled back if they get old without being finished. You can get a hold of the TransactionManager using: (AbstractGraphDatabase)graphDb).getConfig().getTxModule().getTxManager(); which can be used to suspend/resume/rollback transactions. 2011/7/31 Felipe Oliveira Carvalho felipe...@gmail.com How can I check if there are unfinished transactions? I want to do the same thing that is done when EmbeddedGraphDatabase is instantiated after a non-clean shutdown. Jul 31, 2011 5:06:12 PM org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog doInternalRecovery INFO: Non clean shutdown detected on log [/home/felipe/graph.db/nioneo_logical.log.2]. Recovery started ... Jul 31, 2011 5:06:12 PM org.neo4j.kernel.impl.transaction.TxManager init INFO: Unresolved transactions found, recovery started ... Jul 31, 2011 5:06:12 PM org.neo4j.kernel.impl.transaction.TxManager init INFO: Recovery completed, all transactions have been resolved to a consistent state. Is it too slow? I want to check if there are unfinished transactions to roll back them all. I'm writing a server and clients may not call finish() for some reason (unexpected errors) disobeying http://wiki.neo4j.org/content/Neo_Mistakes#Transactions_usage. I want to cleanup transactions on every new client connection so that every connection starts clean. Thanks, Felipe ___ 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] User Digest, Vol 53, Issue 95
Hi Michel, they are implicitely detached when modified outside of a transaction. But even in detached mode, for the unmodified fields it still reads through ! Could you point out how the docs could be improved? To make that easier to understand: http://static.springsource.org/spring-data/data-graph/snapshot-site/reference/html/#reference:programming-model:lifecycle They read always through but the db uses a cache of course. Regarding your example with different clients. Assuming the operation persists before #4 the title will be the new one as this is the new state in the db. It is the same as in a relational db, if you do two selects (which the read through is) then you get the value back that is current in the db. I understand your issue though. Right now the only option would be to copy the values that are needed for the output to a separate datastructure if you never want to have that happen. The problem with detaching and copying is that you get quickly into all the annoyances of fetch-depths, fetch-groups etc. again, that's a path I don't want to walk, it leads to hell :) Michael Am 23.08.2011 um 12:55 schrieb Michel Domenjoud: Michael, Thanks for your quick answer. This leads me to two new points: - You said that an entity is attached when freshly loaded, but I found no way to explicitly detach entities. Am I right? If so, I think you should update the documentation which is quite confusing on this point, and explain clearly that detach entities should be used in a write-only mode. - Moreover, I think there could be some confusing side effects if entities always use read-through : Does this work with a cache or do the entities always read through the database? How would this example behave with two different clients : A client X does the following (let's say title property is indexed): 1. Movie retrievedMovie = movieRepository.findByPropertyValue(Babel); 2. output(retrievedMovie.getTitle()) // prepare some output like Web page 3. ... do some other operations 4. output(retrievedMovie.getTitle()) // for some reason, a second output is needed In the same time, a client Y executes the following code: 1. Movie retrievedMovie = movieRepository.findByPropertyValue(Babel); 2.retrievedMovie.setTitle(New title)); 3. retrievedMovie.persist(); 4. Some other stuff we don't care Which should be the value of the movie title for client X on step 4? Thanks by advance for your answer. Michel Date: Tue, 23 Aug 2011 11:42:13 +0200 From: Michael Hunger michael.hun...@neotechnology.com Subject: Re: [Neo4j] [Spring Data Graph] Precisions about Detached Entitiesand SDG under the hood To: Neo4j user discussions user@lists.neo4j.org Message-ID: 3a2f0a73-6183-4b32-a02a-7219f0a7f...@neotechnology.com Content-Type: text/plain; charset=us-ascii there are two states attached and detached: an entity is detached when it is created or when it is changed outside of a transaction. Otherwise (when it is freshly loaded, or after persist it is attached). For detached entities: persist() writes the changed properties and relationships to the graph. if attached (and inside of a tx) all changes are written directly. In your example you just overwrote the title with Babel and persisted that information to the graph, so the assert should say: The retrieved movie is attached, it is never detached, so it always refers to the node in the graph (read-through) (the data is _not_ copied). assertEquals(Babel, retrievedMovie.getTitle()); Attached entities read their data directly from the underlying node. HTH Michael The model is different to hibernate, as hibernate has no read-through. We would have loved not to support detached entities but as they are so common in web-frameworks we had to. The best way of working with SDG is to use domain level service methods which are transactional and do the interaction with the graph. Detached entities should just be used to (if at all) to persist user input (form data) from the UI. Am 23.08.2011 um 10:56 schrieb Michel Domenjoud: Hello, I'm currently testing some of Spring Data Graph features, and I have a few questions about some usages. Could someone explain to me how the following example works? I run the following unit test: @Test public void testUpdatingEntitiesNotInTransaction(){ Movie m = new Movie(); m.setTitle(Leon); m.persist(); Long id = m.getNodeId(); Movie retrievedMovie = movieRepository.findOne(id); m.setTitle(Babel); m.persist(); assertEquals(Leon, retrievedMovie.getTitle()); } And the assertion at the end fails, as retrievedMovie.getTitle() equals Babel and not Leon. This point is not really clear in the documentation : Does this occurs because of some cache? If so, is it the Neo4j cache? And what is exactly its scope : thread, session, ...? Or is any call to getters triggering
Re: [Neo4j] Fuzzy Search Not Working :(
Hi Peter, Perfect, and it is always nice to have bob in an example :) much appreciated, will blog about search and neo4j so I don't forget. Much appreciated Sent from my iPhone On 23/08/2011, at 8:14 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Romiko, thanks a lot for the update, I expanded the REST docs a bit to show this, see the manual http://docs.neo4j.org/chunked/snapshot/rest-api-indexes.html#rest-api-find-node-by-query that will be updated shortly from https://github.com/neo4j/community/commit/5e5ccfa95e9cc2598840728922e53aef02c8b470 Is that better? 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 Mon, Aug 22, 2011 at 11:52 PM, Romiko Derbynew romiko.derby...@readify.net wrote: For those that need to work with multiple words. This how fuzzy search works with multiple terms, the plus sign is used to separate the surname so the search below will match Bob The Builder , who is of course male :) http://localhost:5102/db/data/index/node/agency1-clients?query=+Name:Bobbie~%20+Name:Builder~%20AND%20Gender:Male -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Romiko Derbynew Sent: Tuesday, 23 August 2011 9:21 AM To: User@lists.neo4j.org Subject: Re: [Neo4j] Fuzzy Search Not Working :( Hi Guys, I got fuzzy search working now, I had to use the query version: http://localhost:5102/db/data/index/node/agency1-clients?query=Name:Bobbs~ :) From: Romiko Derbynew Sent: Monday, 22 August 2011 4:53 PM To: 'User@lists.neo4j.org' Subject: Fuzzy Search Not Working :( Hi Guys, The problem I am having is that I have created multiple index entries e.g. Key:Name Value: Joe Key:Name Value: Joe Blogs Works I am now querying the index, and can find Name:\Joe\ I am now querying the index, and can find Name:\Joe\~ I am now querying the index, and can find Name:\Joe Blogs\ I am now querying the index, and can find Name:\Joe Blogs\~ Does Not Work I am now querying the index, and can find Name:\Joey\~ This is not working, I also tried with a low matching value I am now querying the index, and can find Name:\Joey\~0.1 I am now querying the index, and can find Name:\Joey Blogs\~0.1 Please let me know what I am doing wrong here? I have tried doing these in the rest API calls e.g. /index/nodes/myindex/mykey:value~ Fi: I have completed building the .Net Api for Lucene Index Searches, Looks like this. If any .Net uses are keen to try out the full Client, it is on NUGet called Neo4jClient.Edge. ___ 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] Optimal Seating plan problem
David, I think this problem falls into the category of graph algos. It seems there is some research required to get a suitable solution. Have you done some investigations yourself and can point the community to starting points, so people might have an easier time to get ideas? 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, Aug 10, 2011 at 3:25 PM, David Gildea david.gil...@prudential.com wrote: Hi All, I have an interesting problem I am trying to solve and would like some direction on how I could solve it using Neo4j. I work in a large building where the teams of developers are all over the places and we would like to keep teams together. So I would like to solve 2 problems hopefully at the same time. Assuming a have a Neo4j database of all employees, the reporting relationships and who the work with and also the seating location as a property I would like to calculate The optimal seating plan that would have all team co-located and beside their manager and Doing that with the least amount of moves for the computer department that actually need to the physical computers and phones etc. Is this that kind of problem that Neo4j could help solve, I think yes based on a basic knowledge of graph databases, but perhaps someone could give me some guidance on the suitability of Neo4j and a possible solution. Thanks Dave ___ 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] [Spring Data Graph] Precisions about Detached Entities and SDG under the hood
Hi Michael, Ok, I get your point now. In fact, the thing I didn't understand yet was that each get call on an entity can be compared as a SELECT on relational db, even no explicit call to the graph repository is done. So, if I understand well, I'd improve the documentation by adding somthing like that after the paragraph Existing All entities returned by library functions are initially in an attached state. Just as with any other entity, changing them outside of a transaction detaches them, and they must be reattached with persist() for the data to be saved. Add this after However, all entities are still attached when reading fields, as all gettters will read through the last data in the graph. For people used to develop with relationnal databases, this must be undestood as each getter call can be assimiled to a SELECT operation. Finally, I understand your point about read-through vs. fetch strategies issues, but this only means that developpers will have to code this glu by themselves on each application. I think that if SDG is intended to become a reference for using graph database, this kind of API will have to come with it one day (but maybe am I misleading because I'm too used to relationnal DB). Moreover, I see one point that could be really confusing with this approach in SDG : cross-store persistence. With this API, you provided the capability to manage JPA entities, which can use various fetch strategies, and Graph entities which use read through, in the same entity class. This point is not mentionned is the documentation, I think you should add a big warning about this. Something like: As mentionned on Chapter 18.8 Detached node entities, node entities are using read-through. On the other side, JPA entities can use various fetch strategies. This point must be considered with caution when developping applications. HTH, and more questions will certainly come about cross-store persistence! :) Michel 2011/8/23 Michael Hunger michael.hun...@neotechnology.com Hi Michel, they are implicitely detached when modified outside of a transaction. But even in detached mode, for the unmodified fields it still reads through ! Could you point out how the docs could be improved? To make that easier to understand: http://static.springsource.org/spring-data/data-graph/snapshot-site/reference/html/#reference:programming-model:lifecycle They read always through but the db uses a cache of course. Regarding your example with different clients. Assuming the operation persists before #4 the title will be the new one as this is the new state in the db. It is the same as in a relational db, if you do two selects (which the read through is) then you get the value back that is current in the db. I understand your issue though. Right now the only option would be to copy the values that are needed for the output to a separate datastructure if you never want to have that happen. The problem with detaching and copying is that you get quickly into all the annoyances of fetch-depths, fetch-groups etc. again, that's a path I don't want to walk, it leads to hell :) Michael Am 23.08.2011 um 12:55 schrieb Michel Domenjoud: Michael, Thanks for your quick answer. This leads me to two new points: - You said that an entity is attached when freshly loaded, but I found no way to explicitly detach entities. Am I right? If so, I think you should update the documentation which is quite confusing on this point, and explain clearly that detach entities should be used in a write-only mode. - Moreover, I think there could be some confusing side effects if entities always use read-through : Does this work with a cache or do the entities always read through the database? How would this example behave with two different clients : A client X does the following (let's say title property is indexed): 1. Movie retrievedMovie = movieRepository.findByPropertyValue(Babel); 2. output(retrievedMovie.getTitle()) // prepare some output like Web page 3. ... do some other operations 4. output(retrievedMovie.getTitle()) // for some reason, a second output is needed In the same time, a client Y executes the following code: 1. Movie retrievedMovie = movieRepository.findByPropertyValue(Babel); 2.retrievedMovie.setTitle(New title)); 3. retrievedMovie.persist(); 4. Some other stuff we don't care Which should be the value of the movie title for client X on step 4? Thanks by advance for your answer. Michel Date: Tue, 23 Aug 2011 11:42:13 +0200 From: Michael Hunger michael.hun...@neotechnology.com Subject: Re: [Neo4j] [Spring Data Graph] Precisions about Detached Entitiesand SDG under the hood To: Neo4j user discussions user@lists.neo4j.org Message-ID: 3a2f0a73-6183-4b32-a02a-7219f0a7f...@neotechnology.com Content-Type: text/plain; charset=us-ascii there are two states attached and detached: an entity is detached
Re: [Neo4j] Neo4j-Spatial: problems when delete spatial entities
Ben, the deletion code is in Andreas fork, see https://github.com/AndreasWilhelm/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/LayersTest.java#L82 for a test. We are about to release Neo4j Spatial 0.6, and after that merge this into the master. Just a heads-up. 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, Jul 29, 2011 at 6:27 PM, Ben Galon bga...@gmail.com wrote: Hi Peter I don't have git installed on my computer. so I opened a fork and commit my solution from the web UI. I could not find a way to upload the Test file, sorry for that. Best regards Ben On Fri, Jul 29, 2011 at 5:37 PM, Peter Neubauer neubauer.pe...@gmail.com wrote: Ben, The first bug is fixed in Andreas Wilhelms fork, thanks for pointing it out! Can't comment on the second from my mobile :) could you fork, add the test and see if you can fix it? /peter Sent from my phone. On Jul 29, 2011 7:29 AM, Ben Galon bga...@gmail.com wrote: Hello, I started working with neo4j-spatial a while ago. i found it very useful and the first thing i would like to say is Thanks for your wonderful work. While working on a project that require large amount of insert/delete operation I think i found two bugs. The first one is in EditableLayerImpl.java. When adding an object and immediately delete it, and then insert another object, you will get an error because the previousGeomNode field will refer to a node that have been deleted. The second bug is in the Rtree implementation (RTreeIndex.java). When removing an object from a leaf and the tree is need to be reorganize a null exception is raise at line 124. This happens because deleteRecursivelyEmptySubtree (at line 121) method delete the relationship from the lastParentNodeToDelete to it's parent (at line 740) and than the getIndexNodeParent method ant line 124 returns null. I think that this can be solved easily by applying the following changes to lines 120-126: Node lastParentNodeToDelParent = getIndexNodeParent(lastParentNodeToDelete); deleteRecursivelyEmptySubtree(lastParentNodeToDelete); // adjust tree adjustParentBoundingBox(lastParentNodeToDelParent, SpatialRelationshipTypes.RTREE_CHILD); adjustPathBoundingBox(lastParentNodeToDelParent); the line number are the same as in the github repository. I will be happy to your opinion about these issues. here is a short code that generate the second bug: import org.neo4j.gis.spatial.EditableLayer; import org.neo4j.gis.spatial.EditableLayerImpl; import org.neo4j.gis.spatial.RTreeIndex; import org.neo4j.gis.spatial.SpatialDatabaseService; import org.neo4j.gis.spatial.WKTGeometryEncoder; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.kernel.EmbeddedGraphDatabase; import com.vividsolutions.jts.geom.Coordinate; public class RteeTest { /** * @param args */ public static void main(String[] args) { final String dbFolder = c:\\RtreeTest; GraphDatabaseService graphDB = new EmbeddedGraphDatabase(dbFolder); SpatialDatabaseService sgDB = new SpatialDatabaseService(graphDB); EditableLayer testLayer = (EditableLayer)sgDB.createLayer(RtreeTest, WKTGeometryEncoder.class, EditableLayerImpl.class); for (int i = 0; i 15; i++){ for (int j = 0; j 10; j++){ testLayer.add(testLayer.getGeometryFactory().createPoint(new Coordinate(i, j))); } } ((RTreeIndex)testLayer.getIndex()).debugIndexTree(); testLayer.delete(60); // raise an java.lang.NullPointerException exception ((RTreeIndex)testLayer.getIndex()).debugIndexTree(); graphDB.shutdown(); } } Thanks again Ben ___ 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] Scala, SBT and Neo4J
Dear Neo4Jers I am experiencing some issues with the Scala (2.9.0-1) sbt (0.10.1) dependency control and Neo4J (1.4.1), and namely I observed the following facts: 1- When using the sbt line org.neo4j % neo4j % 1.4.1 neo4j-kernel is not fetched or/and is not found, which results in the following error object graphdb is not a member of package org.neo4j [error] import org.neo4j.graphdb._ 2- Removing org.neo4j % neo4j % 1.4.1 and including org.neo4j % neo4j-kernel % 1.4.1 works, in the sense that the package org.neo4j.graphdb is on the classpath 3- Including both org.neo4j % neo4j-kernel % 1.4.1 and org.neo4j.app % neo4j-server % 1.4.1 or org.neo4j % neo4j-kernel % 1.4.1 and org.neo4j % neo4j % 1.4.1 results once again in the same error message as in point 1. Am I missing anything? I need neo4j-server to use WrappingNeoServerBootstrapper, but it seems that I cannot have all dependencies at the same time. What's the problem? Thank you. Cheers Alex -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Scala-SBT-and-Neo4J-tp3277895p3277895.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] Spring Data Graph 1.1.0
Hi, if you look at https://github.com/SpringSource/spring-data-graph-examples/blob/master/hello-worlds/pom.xml I think you need to add the Springsource repo in order to find the artifacts? 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 Tue, Aug 23, 2011 at 12:10 AM, etc1 e...@nextideapartners.com wrote: Hi, I updated my pom to reflect this new release.. data-graph.version1.1.0.RELEASE/data-graph.version ...but I'm getting an error saying the resource can't be found... [INFO] Unable to find resource 'org.springframework.data:spring-data-graph-core:jar:1.1.0.RELEASE' in repository central (http://repo1.maven.org/maven2) [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. Missing: -- 1) org.springframework.data:spring-data-graph-core:jar:1.1.0.RELEASE Try downloading the file manually from the project website. Missing something? -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Andreas Kollegger Sent: Friday, August 19, 2011 2:58 PM To: Neo4j user discussions Subject: [Neo4j] Spring Data Graph 1.1.0 Hello Graphistas, We are pleased to announce that the second release (1.1.0.RELEASE) of the Spring Data Graph project with Neo4j support is now available! The key new features in the Spring Data Graph 1.1.0.RELEASE include: * Added Gremlin and Cypher support * Improved Neo4j Template * Improved REST API wrapper * documentation updates Read more details about it at http://blog.neo4j.org/2011/08/spring-data-graph-1.html Cheers, Andreas ___ 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] Enhanced API rewrite
Niels, I think the SuperGraph API (TM) should go into its own component and then depend on the collections component. I can prepare that and maybe move the code there during the week or next? This way, we can evolve the API apart from the more pragmatic collection component. 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 Mon, Aug 8, 2011 at 9:58 PM, Niels Hoogeveen pd_aficion...@hotmail.com wrote: Hi Dmitri, I would very much appreciate it if you tried out Enhanced API and gave me feed back about your findings. Apart from traversals it is more or less feature complete, but it could use some thorough trying out. Niels Date: Mon, 8 Aug 2011 20:20:14 +0500 From: shaban...@gmail.com To: user@lists.neo4j.org Subject: Re: [Neo4j] Enhanced API rewrite I ready to jump in too ;-) On Mon, Aug 8, 2011 at 3:37 PM, Niels Hoogeveen pd_aficion...@hotmail.comwrote: I can probably find the time for that. It would be fun working on these ideas in collaboration. I don't mind producing my usual brain-dumps and write some of the code, but quality will certainly improve when it is more than just me paying attention to this. Niels -- Dmitriy Shabanov ___ 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 index performance using Lucene
Hi Erik, I don't think there's much to be done about it. An on-disk Lucene index (not even an in-memory Lucene index I can imagine) will never be as fast as a HashMap or similar approach. Although you're using setCacheCapacity on the index which should make it pretty close to the performance of a HashMap for cache hits, unfortunately there's a bug which prevents results from ending up in the cache... it's in my backlog. 2011/7/29 Erik Fäßler erik.faess...@uni-jena.de Hi all, I've been doing preliminary evaluations on some Neo4j operations. One of which rises from a specific need in my application: My method will get a List of node ids (stored in the nodes' properties) and need to retrieve exactly these nodes from the GraphDB. This should happen as fast as possible, of course. I used an index for the ids. My code is as follows: private static final int SAMPLE_SIZE = 10; ... GraphDatabaseService graphDb = new EmbeddedGraphDatabase(tmp/graphdb); Transaction t = graphDb.beginTx(); IndexManager im = graphDb.index(); IndexNode ni = im.forNodes(nodes); ( (LuceneIndexNode) ni ).setCacheCapacity( nodes, 50 ); for (int i = 0; i SAMPLE_SIZE; ++i) { Node n = graphDb.createNode(); n.setProperty(id, i); ni.add(n, id, n.getProperty(id)); } t.success(); t.finish(); long time = System.currentTimeMillis(); for (int i = 0; i SAMPLE_SIZE; ++i) { Node n = ni.get(id, i).getSingle(); } System.out.println(System.currentTimeMillis() - time); It works, but is rather slow. If I do the last loop a second time, the Lucene cache kicks in and reduces the required time by half. But then it's still some time (2000ms on my machine). When I do the exact same thing with a HashMap for example, the same loop (with call Node n = ni.get(id, i).getSingle();) takes about 10ms. I now HashMaps have other drawbacks such like memory consumption. For my use case this wouldn't be the problem, however, as I would only have to cache about 1M nodes which is perfectly possible in a HashMap. My main question is: Have I done something wrong in my usage of the Lucene index? Can it be sped up somehow? Or will I always be served better performance wise using a HashMap for such cases where I have a large amount of single queries? Thank you and best regards, Erik ___ 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] Strange storage [Block not in use ] error we face with in neo4j.
Pere, are you stil having these issues? 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 Tue, Aug 16, 2011 at 8:58 AM, Pere Urbon Bayes p...@moviepilot.com wrote: Hi! community, in our project we stated to face with this strange errors that seems to be coming from the storage, any idea?, cause they looks strange and I don't want to thing this means we are loosing some data, xD!.. here you have my stack trace, any help will be really appreciated. - reason: org.neo4j.kernel.impl.nioneo.store.InvalidRecordException: Block not inUse[0] blockId[168588225] - - backtrace: [ - org/neo4j/kernel/impl/nioneo/store/AbstractDynamicStore.java:441:in `getLightRecord' - org/neo4j/kernel/impl/nioneo/store/AbstractDynamicStore.java:400:in `getLightRecords' - org/neo4j/kernel/impl/nioneo/store/PropertyStore.java:343:in `getRecord' - org/neo4j/kernel/impl/nioneo/xa/ReadTransaction.java:188:in `propertyGetValue' - org/neo4j/kernel/impl/nioneo/xa/NioNeoDbPersistenceSource.java:216:in `loadPropertyValue' - org/neo4j/kernel/impl/persistence/PersistenceManager.java:79:in `loadPropertyValue' - org/neo4j/kernel/impl/core/NodeManager.java:572:in `loadPropertyValue' - org/neo4j/kernel/impl/core/Primitive.java:538:in `getPropertyValue' - org/neo4j/kernel/impl/core/Primitive.java:158:in `getProperty' - org/neo4j/kernel/impl/core/NodeProxy.java:134:in `getProperty' - sun.reflect.GeneratedMethodAccessor19:-1:in `invoke' - sun/reflect/DelegatingMethodAccessorImpl.java:43:in `invoke' - java/lang/reflect/Method.java:616:in `invoke' - org/jruby/javasupport/JavaMethod.java:525:in `invokeDirectWithExceptionHandling' - /home/moviepilot/daemons/tomcat/webapps/ROOT/WEB-INF/gems/gems/neo4j-1.0.0-java/lib/neo4j/property/property.rb:14:in `props' - org/jruby/RubyKernel.java:2071:in `send' - /home/moviepilot/daemons/tomcat/webapps/ROOT/WEB-INF/gems/gems/neo4j-1.0.0-java/lib/neo4j/node_mixin/node_mixin.rb:46:in `props' - /home/moviepilot/daemons/tomcat/webapps/ROOT/WEB-INF/lib/sheldon/mixins/node_mixin.rb:35:in `external_id' - /home/moviepilot/daemons/tomcat/webapps/ROOT/WEB-INF/gems/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:392:in `external_id_with_trace_Custom_NodeMixin_external_id' - /home/moviepilot/daemons/tomcat/webapps/ROOT/WEB-INF/gems/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:191:in `trace_execution_scoped' - /home/moviepilot/daemons/tomcat/webapps/ROOT/WEB-INF/gems/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:190:in `trace_execution_scoped' - /home/moviepilot/daemons/tomcat/webapps/ROOT/WEB-INF/gems/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:387:in `external_id_with_trace_Custom_NodeMixin_external_id' - /home/moviepilot/daemons/tomcat/webapps/ROOT/WEB-INF/lib/sheldon/m - /purbon ___ 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] Replication corner cases?
2011/8/15 Tuure Laurinolli tuure.laurino...@portalify.com On Aug 12, 2011, at 20:40 , Tuure Laurinolli wrote: Updates will however propagate from the master to other slaves eventually so a write from one slave is not immediately visible on all other slaves. It sounds like eventual consistency from master to other slaves. if so, I am interested in finding out details about Neo4j HA member nodes voting quorum arbitrater setup (assuming using zookeeper) Looking at the code, it seems that the transaction is first prepare()'d on the slave, then the prepared log shipped to the master, applied and committed there, and the master txid shipped back and used to commit the transaction on slave. However, the locks seem to be held (both on slave and master) until the slave finishes committing or rolling back, so no visibility problems should occur. Further, the Transaction that MasterClient/MasterServer/MasterImpl creates on server-side is apparently only ever really used to hold locks. It is always rolled back (finishTransaction() in MasterImpl). This leads me to wonder if the following scenario is possible: - Slave A replicates T to master, master commits it and gets ready to return txnId, client X reads it from master, master crashes - Is it guaranteed that slave A commits the txn locally before a new master is elected (since a new master elected at this point won't have T, and thus client X would have read an update that never completed successfully Clearly slave A cannot commit the transaction, and its client gets some sort of error. Also, since master crashed, a new master will be elected and the transaction will never have existed in the new cluster. Yet client X managed to read the result, which will be wrong. Also, in this case, when master is restarted, can it rejoin the cluster, since its state has diverged from that of the cluster? If a machine starts up and sees that it has diverged from the cluster (represented by the current master) it will ask the master for a fresh database and start from there... keeping the diverged db around in another folder. ___ 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] Replication corner cases?
Hm, actually client X can't read anything touched by T from master, since slave A will have taken write locks on things it modifies, and the write locks are associated with T that never finishes in this example. Still, master's state will diverge from cluster state. It's ok to read things that are held by write locks, reads will not block. -- 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] Very Slow Transaction only on Windows
The problem could be that your Blueprints graph is instantiated with wrong transaction settings, making it commit for each operation. The reason it's fast on a Mac is that OS X cheats and doesn't actually force stuff to disk when you tell it to. 2011/8/15 Keiichiro Ono kei...@gmail.com Hi Michael, 2011/8/14 Michael Hunger michael.hun...@neotechnology.com: Btw. even on Kei's Macbook it shouldn't take a second to add 1000 vertices. Rather around a few milliseconds. Don't know what kind of overhead, the blueprints / cytoscape managers around the neo4j core add. I'm blueprints has a auto-tx mode where there is a new tx per each operation and you have to disable that (if you use external tx-managment). I wrote a very simple tests using only Neo4j and Blueprints API. https://gist.github.com/1147365 The typical output (by iMac w/Core2Duo) is like the following: 1: With helper, add node transaction finished in 118 msec. 2: With helper, add node transaction finished in 84 msec. 3: With helper, add node transaction finished in 98 msec. 4: With helper, add node transaction finished in 57 msec. 5: With helper, add node transaction finished in 54 msec. 6: With helper, add node transaction finished in 22 msec. 7: With helper, add node transaction finished in 29 msec. 8: With helper, add node transaction finished in 21 msec. 9: With helper, add node transaction finished in 21 msec. 10: With helper, add node transaction finished in 72 msec. 1: Without helper, add node transaction finished in 15 msec. 2: Without helper, add node transaction finished in 5 msec. 3: Without helper, add node transaction finished in 7 msec. 4: Without helper, add node transaction finished in 7 msec. 5: Without helper, add node transaction finished in 8 msec. 6: Without helper, add node transaction finished in 4 msec. 7: Without helper, add node transaction finished in 4 msec. 8: Without helper, add node transaction finished in 4 msec. 9: Without helper, add node transaction finished in 3 msec. 10: Without helper, add node transaction finished in 3 msec. Does this looks normal? I think manual transaction is reasonably fast. Transactions with utility class are slower, but it's understandable. In any case, Apple's JVM does not have performance problem, but somehow it's slow on Oracle's JVM on Windows(?). I'll try the same tests on other machines. Thanks, Kei (The following is the message log from the test) Mon Aug 15 11:28:43 PDT 2011: Physical mem: 8192MB, Heap size: 123MB Mon Aug 15 11:28:43 PDT 2011: Kernel version: Neo4j - Graph Database Kernel 1.4.1 Mon Aug 15 11:28:43 PDT 2011: Neo4j - Graph Database Kernel 1.4.1 Mon Aug 15 11:28:43 PDT 2011: Operating System: Mac OS X; version: 10.6.8; arch: x86_64; cpus: 2 Mon Aug 15 11:28:43 PDT 2011: VM Name: Java HotSpot(TM) 64-Bit Server VM Mon Aug 15 11:28:43 PDT 2011: VM Vendor: Apple Inc. Mon Aug 15 11:28:43 PDT 2011: VM Version: 20.1-b02-384 Mon Aug 15 11:28:43 PDT 2011: Boot Class Path: Mon Aug 15 11:28:43 PDT 2011: Library Path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java Mon Aug 15 11:28:43 PDT 2011: Garbage Collector: ParNew: [Par Eden Space, Par Survivor Space] Mon Aug 15 11:28:43 PDT 2011: Garbage Collector: ConcurrentMarkSweep: [Par Eden Space, Par Survivor Space, CMS Old Gen, CMS Perm Gen] Mon Aug 15 11:28:43 PDT 2011: VM Arguments: [-Dfile.encoding=UTF-8] Mon Aug 15 11:28:43 PDT 2011: Mon Aug 15 11:28:43 PDT 2011: create=true Mon Aug 15 11:28:43 PDT 2011: logical_log=target/neo4jTestDB/nioneo_logical.log Mon Aug 15 11:28:43 PDT 2011: neo_store=target/neo4jTestDB/neostore Mon Aug 15 11:28:43 PDT 2011: neostore.nodestore.db.mapped_memory=20M Mon Aug 15 11:28:43 PDT 2011: neostore.propertystore.db.arrays.mapped_memory=130M Mon Aug 15 11:28:43 PDT 2011: neostore.propertystore.db.index.keys.mapped_memory=1M Mon Aug 15 11:28:43 PDT 2011: neostore.propertystore.db.index.mapped_memory=1M Mon Aug 15 11:28:43 PDT 2011: neostore.propertystore.db.mapped_memory=90M Mon Aug 15 11:28:43 PDT 2011: neostore.propertystore.db.strings.mapped_memory=130M Mon Aug 15 11:28:43 PDT 2011: neostore.relationshipstore.db.mapped_memory=100M Mon Aug 15 11:28:43 PDT 2011: node_auto_indexing=false Mon Aug 15 11:28:43 PDT 2011: rebuild_idgenerators_fast=true Mon Aug 15 11:28:43 PDT 2011: relationship_auto_indexing=false Mon Aug 15 11:28:43 PDT 2011: store_dir=target/neo4jTestDB Mon Aug 15 11:28:43 PDT 2011: use_memory_mapped_buffers=true Cheers Michael Am 14.08.2011 um 05:00 schrieb Michael Kirby: Hello, Here is my messages.log , I also recently got a new computer and it takes about 3 seconds on that one. The heap for it 1809 MB. Thu Aug 11 12:05:17 PDT 2011: Opened [target\neo4jDB\nioneo_logical.log.1] clean empty log, version=0 Thu Aug 11 12:05:17 PDT 2011: Opened [C:\Users\Michael\blueprints-graph-cytoscapeMaster\target\neo4jDB\index\lucene.log.1] clean empty
Re: [Neo4j] Memory overflow while creating big graph
Could you just quickly look at where most time is spent when it's slowing down? Just start VisualVM, attach to the process and monitor CPU 2011/8/16 Jose Vinicius Pimenta Coletto jvcole...@gmail.com Hi, I made some changes to use the BatchInserter to generate the initial database. The strategy is to identify all nodes that must be inserted and after doing this I create the edges. But I still having problems, after inserting 9M of nodes the running is very slow and not reach the edges insertion. As already said the graph have 14M node and 11M edges. I am running the JVM as follows: 'java-Xmx4g-XX:-jar-UseGCOverheadLimit qsa.jar params'. Information on the machine I'm using: 'Linux 2.6.38-10-46-generic # Ubuntu SMP Tue Jun 28 15:07:17 UTC 2011x86_64 x86_64 x86_64 GNU / Linux' with 4GB of RAM. The code I'm using to create the initial database is attached, the method that should be looked at is: createDB. -- Thanks, Jose Vinicius Pimenta Coletto ___ 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] Replication corner cases?
On Aug 23, 2011, at 17:30 , Mattias Persson wrote: Hm, actually client X can't read anything touched by T from master, since slave A will have taken write locks on things it modifies, and the write locks are associated with T that never finishes in this example. Still, master's state will diverge from cluster state. It's ok to read things that are held by write locks, reads will not block. Hm, so to have safe replication with the scheme I described, readers would also need to take read locks on the items they read even if they don't plan to update anything based on the results. Then again, if read locks are taken like that, the client may as well read from any slave, since read lock causes state to be synchronized from master. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Replication corner cases?
2011/8/12 Tuure Laurinolli tuure.laurino...@portalify.com On Aug 11, 2011, at 23:26 , dhsieh wrote: According to http://docs.neo4j.org/chunked/stable/ha-architecture.html, this is my understanding and I would like for confirmation from Neo4j: A slave will handle writes by synchronizing with the master to preserve consistency. It sounds like 2-phase commit between write initiated slave master nodes. Actually it would seem that the 2PC stuff in Neo4j is not related to HA at all. Updates will however propagate from the master to other slaves eventually so a write from one slave is not immediately visible on all other slaves. It sounds like eventual consistency from master to other slaves. if so, I am interested in finding out details about Neo4j HA member nodes voting quorum arbitrater setup (assuming using zookeeper) Looking at the code, it seems that the transaction is first prepare()'d on the slave, then the prepared log shipped to the master, applied and committed there, and the master txid shipped back and used to commit the transaction on slave. However, the locks seem to be held (both on slave and master) until the slave finishes committing or rolling back, so no visibility problems should occur. 2PC doesn't work well in a distributed environment. Some sort of 3PC could do the trick and something I think will be implemented in the future. ___ 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] HA Consistency
Dave, the HA MBean, see http://docs.neo4j.org/chunked/snapshot/operations-monitoring.html is giving you information about what instance currently being master, so you can use that information to set up your load balancing. Would that work? 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, Aug 20, 2011 at 2:55 AM, David Rader dra...@allianceglobalservices.com wrote: In order to configure a load balancer to target all reads or all writes to the master in an HA - what's the best way to do this? For instance, if you had a single source of updates and many clients reading you might want to load balance the slaves as read-only and have the updates all flow to the master node. Since the master is elected and will change after a crash, what's the best way to see which node is the master and dynamically update a load balancer to correctly direct traffic? Or, what's the best way to update DNS entries to point to a master.neocluster.company.com vs. slave.neocluster.company.com or such? Thanks Dave Date: Fri, 19 Aug 2011 11:12:05 +0300 From: Tuure Laurinolli tuure.laurino...@portalify.com Subject: Re: [Neo4j] HA consistency To: Neo4j user discussions user@lists.neo4j.org Message-ID: 4d3381ef-89dc-402f-9efe-77d72131e...@portalify.com Content-Type: text/plain; charset=us-ascii On Aug 19, 2011, at 07:57 , David Rader wrote: It looks like the HA implementation is for eventual consistency, tunable by how often a slave polls the master for updates from other nodes. With a load balanced cluster, is the best practice to simply use sticky sessions on clients to ensure that immediate reads of updated data are served by the same node that wrote the update and are therefore consistent? Any other recommended approaches? If your goal is HA, there are two other approaches: 1) Always read from master and 2) Always take read lock on things you read Always reading from master works because writes are synchronously replicated to master, and taking a read lock works because taking a read lock always synchronizes with master (although it of course also disallows related writes for the duration of your transaction). These solutions affect write performance (reading from master consumes master capacity, and taking read locks prevents other transactions from completing). Read performance is certainly affected as well compared to sticky sessions, and is likely to be considerably lower because of the synchronization requirements, and load on master. Consistency guarantees would be as follows: - Reading from arbitrary slaves guarantees very little - Sticky sessions guarantee read-everything-up-until-your-previous-write - Reading from master guarantees consistency re: communications over side channels (if another node, after committing, tells you that he wrote something, you can see that write, or possibly some newer write) - Taking read locks guarantees read-everything-up-until-your-previous-lock-request and also repeatable reads ___ 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] Replication corner cases?
2011/8/23 Tuure Laurinolli tuure.laurino...@portalify.com On Aug 23, 2011, at 17:30 , Mattias Persson wrote: Hm, actually client X can't read anything touched by T from master, since slave A will have taken write locks on things it modifies, and the write locks are associated with T that never finishes in this example. Still, master's state will diverge from cluster state. It's ok to read things that are held by write locks, reads will not block. Hm, so to have safe replication with the scheme I described, readers would also need to take read locks on the items they read even if they don't plan to update anything based on the results. Then again, if read locks are taken like that, the client may as well read from any slave, since read lock causes state to be synchronized from master. read locks aren't taken during normal operation so just doing a traversals or similar won't grab read locks. Pulling updates and then doing a traversal will make sure it's performed on a consistent snapshot, if no write operations or lock-grabbings are performed during. ___ 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] Neo4j High Availability
Madan, just talked to Mattias on this. Zookeeper is a strange beast and casting exceptions often - what is the actual effect you are seeing - is the cluster not starting up or are there multiple masters? 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 Tue, Aug 23, 2011 at 11:26 AM, Madan Gubbala mgubb...@allianceglobalservices.com wrote: Hi, I am trying to configure Neo4J High availability. But I am getting some exceptions. The following are the configuration details. We have 3 Linux servers (Amazon cloud instances). Each one has Zookeeper 3.3.2 and Jetty 7. Deployed web application in Jetty by giving corresponding ha-server.conf as follows: ha.machine_id=1 ha.server=localhost:6001 ha.zoo_keeper_servers=internalip:2180, internalip:2180, internalip:2180 ha.pull_interval=5 enable_remote_shell = port=1331 Similary in linux server 2 and 3. Configured Zookeepr as follows: #server1.cfg tickTime=1 initLimit=50 syncLimit=10 dataDir=/usr/share/zookeeper-3.3.2/data/zookeeper1 clientPort=2183 server.1=ip-10-102-53-219.ec2.internal:2888:3888 server.2=ip-10-84-29-207.ec2.internal:2888:3888 server.3=ip-10-102-53-219.ec2.internal:2888:3888 Similary in linux server 2 and 3. Now started Jetty servers and Zookeeper servers. But I am getting the following exception at Web server Jetty servers. [main-SendThread(ipaddtress:2180)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.6.0_18] at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:592) ~[na:1.6.0_18] at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119) ~[zookeeper-3.3.2.jar:3.3.2-1031432] The following exceptions at Zookeeper servers: java.lang.InterruptedException at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2017) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2094) at java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:370) at org.apache.zookeeper.server.quorum.QuorumCnxManager$SendWorker.run(QuorumCnxManager.java:601) 2011-08-23 09:19:30,111 - WARN [Thread-48:QuorumCnxManager$SendWorker@621] - Send worker leaving thread 2011-08-23 09:19:30,113 - INFO [WorkerReceiver Thread:FastLeaderElection@496] - Notification: 3 (n.leader), 4294967353 (n.zxid), 1 (n.round), FOLLOWING (n.state), 2 (n.sid), LEADING (my state) 2011-08-23 09:20:30,127 - WARN [Thread-51:QuorumCnxManager$RecvWorker@702] - Connection broken for id 2, my id = 3, error = java.nio.channels.AsynchronousCloseException 2011-08-23 09:20:30,127 - WARN [Thread-50:QuorumCnxManager$SendWorker@612] - Interrupted while waiting for message on queue java.lang.InterruptedException at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2017) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2094) at java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:370) at org.apache.zookeeper.server.quorum.QuorumCnxManager$SendWorker.run(QuorumCnxManager.java:601) 2011-08-23 09:20:30,128 - WARN [Thread-50:QuorumCnxManager$SendWorker@621] - Send worker leaving thread 2011-08-23 09:20:30,130 - WARN [Thread-52:QuorumCnxManager$SendWorker@612] - Interrupted while waiting for message on queue java.lang.InterruptedException at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2017) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2094) at java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:370) at org.apache.zookeeper.server.quorum.QuorumCnxManager$SendWorker.run(QuorumCnxManager.java:601) 2011-08-23 09:20:30,130 - WARN [Thread-52:QuorumCnxManager$SendWorker@621] - Send worker leaving thread 2011-08-23 09:20:30,134 - INFO [WorkerReceiver Thread:FastLeaderElection@496] - Notification: 3 (n.leader), 4294967353 (n.zxid), 1 (n.round), FOLLOWING (n.state), 2 (n.sid), LEADING (my state) 2011-08-23 09:21:30,145 - WARN
Re: [Neo4j] Building neo4jpy for JCC in windows
Cool. Jake is to get the updated python bindings out soon against the embedded API, so we can merge and update things in this space! 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 Tue, Jul 26, 2011 at 6:37 AM, steven.kalemkiewicz steven.kalemkiew...@gmail.com wrote: Yes, I seem to have it working. At least at the moment, it compiles, installs, and I can run the tests as described in the README. jcc_d.lib seems to be the static library built with debugging enabled. However, JCC does not seem to be built with debugging enabled by default (if you create a dummy file to get around it not finding jcc_d.lib, you'll find it complains about not finding python27_d.lib before it bombs out with unresolved symbols). I was able to work around the issue by deleting line 160 from setup.py in the neo4py package. FROM: jcc_args = [ cpp.__file__, --debug, --shared, TO: jcc_args = [ cpp.__file__, # DELETED LINE --shared, -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Building-neo4jpy-for-JCC-in-windows-tp3046129p3199460.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] Using Spring Data Graph with REST
Hi Musa, while the REST server works with SDG, I would prefer staying embedded because the performance is just no great with the HTTP protocol. Do you absolutely need to use a remote DB? Another approach is to use Neo4j HA, execute against a local cluster instance and let Neo4j replicate to the other cluster members, if distribution is what you are after. 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 Sun, Aug 14, 2011 at 8:09 AM, musa musa.basb...@gmail.com wrote: Hi I am using Neo4j over REST technology (Neo4j Server) Is it recommended to use the Spring Data Graph also? If so what are the pros. in such case? 10x! -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Using-Spring-Data-Graph-with-REST-tp3253069p3253069.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] Spring Data Graph 1.1.0
This file spring-data-graph-core is no longer there. It should be enough if you'd depend on org.springframework.data : spring-data-graph-neo4j : 1.1.0.RELEASE see here: http://search.maven.org./#artifactdetails%7Corg.springframework.data%7Cspring-data-neo4j%7C1.1.0.RELEASE%7Cjar Michael Am 23.08.2011 um 00:10 schrieb etc1: Hi, I updated my pom to reflect this new release.. data-graph.version1.1.0.RELEASE/data-graph.version ...but I'm getting an error saying the resource can't be found... [INFO] Unable to find resource 'org.springframework.data:spring-data-graph-core:jar:1.1.0.RELEASE' in repository central (http://repo1.maven.org/maven2) [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. Missing: -- 1) org.springframework.data:spring-data-graph-core:jar:1.1.0.RELEASE Try downloading the file manually from the project website. Missing something? -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Andreas Kollegger Sent: Friday, August 19, 2011 2:58 PM To: Neo4j user discussions Subject: [Neo4j] Spring Data Graph 1.1.0 Hello Graphistas, We are pleased to announce that the second release (1.1.0.RELEASE) of the Spring Data Graph project with Neo4j support is now available! The key new features in the Spring Data Graph 1.1.0.RELEASE include: * Added Gremlin and Cypher support * Improved Neo4j Template * Improved REST API wrapper * documentation updates Read more details about it at http://blog.neo4j.org/2011/08/spring-data-graph-1.html Cheers, Andreas ___ 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] NodeBacked to Node
Thanks Michael, that was pretty helpful. I was already using @GraphTraversal but findAllByTraversal() and createEntityFromState() methods are what I was actually looking for. Thanks! -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-NodeBacked-to-Node-tp3276721p3279505.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] FullText and Exact Indices in graphs
Hi, I have some confusion around indices (full-text and index). Is it fine to have same index for all full-text and non-full-text (or exact) fields? or does it affect the performance? Or to put it in a different way, at what point do we separate indices? For example: I have a NodeEntity 'Product' with exact and full text indices. I have added all the fields to the same index. public class Product { @Indexed(indexName = product-search, fulltext=true) String name; @Indexed(indexName = product-search) int expectedAmount; @Indexed(indexName = product-search, fulltext=true) String details; . } I need to fire a compound query for fields name, details and expectedAmount. IndexNode namedProductIndex = graphDatabaseContext.getIndex(Product.class, product-search); IterableNode nodes = namedProductIndex.query((name:*book* OR details:*book*) AND expectedAmount:700); Therefore, I added all the fields name, details and expectedAmount keys in the same index called 'product-search'. name and details are full text but expectedAmount is not required to be full text. Is it ok to add full-text and non-full-ltext fields to the same index? Many Thanks, Sambodhi ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Server couldn't start after java.lang.OutOfMemoryError
The neo4j server refuses to start after getting a Java OutOfMemory Error. I was trying to start the server using the ./bin/neo4j start command. Starting neo4j-service...WARNING: not changing user process [26266]... waiting for server to be ready. BAD. another server-process is running with [] Console log: Exception in thread Statistics Gatherer java.lang.OutOfMemoryError: PermGen space at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getMethod0(Class.java:2670) at java.lang.Class.getMethod(Class.java:1603) at org.neo4j.helpers.Service.java6Loader(Service.java:330) at org.neo4j.helpers.Service.load(Service.java:191) at org.neo4j.helpers.Service.load(Service.java:207) at org.neo4j.kernel.EmbeddedGraphDbImpl.getManagementBean(EmbeddedGraphDbImpl.java:221) at org.neo4j.kernel.EmbeddedGraphDatabase.getManagementBean(EmbeddedGraphDatabase.java:156) at org.neo4j.server.rrd.DatabasePrimitivesSampleableBase.getObjectName(DatabasePrimitivesSampleableBase.java:86) at org.neo4j.server.rrd.DatabasePrimitivesSampleableBase.getValue(DatabasePrimitivesSampleableBase.java:53) at org.neo4j.server.rrd.RrdSampler.updateSample(RrdSampler.java:62) at org.neo4j.server.rrd.RrdJob.run(RrdJob.java:41) at org.neo4j.server.rrd.ScheduledJob$1.run(ScheduledJob.java:47) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) neo4j log: Aug 23, 2011 4:23:11 PM org.neo4j.server.logging.Logger log INFO: Starting Neo Server on port [7474] with [80] threads available Aug 23, 2011 4:23:11 PM org.mortbay.log.Slf4jLog info INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog Aug 23, 2011 4:23:11 PM org.neo4j.server.logging.Logger log INFO: Using database at /Users/nuo/5star/neo4j-community-1.4/data/graph.db Aug 23, 2011 4:23:11 PM org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog doInternalRecovery INFO: Non clean shutdown detected on log [/Users/nuo/5star/neo4j-community-1.4/data/graph.db/nioneo_logical.log.1]. Recovery started ... Aug 23, 2011 4:23:13 PM org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog doInternalRecovery INFO: Non clean shutdown detected on log [/Users/nuo/5star/neo4j-community-1.4/data/graph.db/index/lucene.log.1]. Recovery started ... Does anybody have any insights on what's happening? Is the recovery not finishing up and timing out or something else is happening? It starts fine if I clear the data (graph.db). In addition, I've modified line 109 of the ./bin/lib/neo4j script to JAVA_OPTS=-server ${wrapper_java_additional} -Xmx512m (basically adding -Xmx512m) and also updated the conf/neo4j.properties file to set mapped_memory for nodes and relationships to be 100M; but I was still seeing the out of memory exception. Did I do it right to increase the memory allocation to neo? Thanks, Nuo Yan ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Server couldn't start after java.lang.OutOfMemoryError
Hi Nuo, process [26266]... waiting for server to be ready. BAD. another server-process is running with [] Just to check before we dig deeper, are you certain you don't have another server process running? Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Server couldn't start after java.lang.OutOfMemoryError
I don't think another process was running but I'm not 100% certain (didn't check other than doing ./bin/neo4j status which shows not running). When it happens again I will check further and let you know. Thanks! Nuo On Tue, Aug 23, 2011 at 6:23 PM, Jim Webber j...@neotechnology.com wrote: Hi Nuo, process [26266]... waiting for server to be ready. BAD. another server-process is running with [] Just to check before we dig deeper, are you certain you don't have another server process running? Jim ___ 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] Server couldn't start after java.lang.OutOfMemoryError
It would also be very useful if you could send data/db/messages.log (to me directly since the mailing list doesn't like attachments) after such an error. thanks, Mattias Den onsdagen den 24:e augusti 2011 skrev Nuo Yanyan@gmail.com: I don't think another process was running but I'm not 100% certain (didn't check other than doing ./bin/neo4j status which shows not running). When it happens again I will check further and let you know. Thanks! Nuo On Tue, Aug 23, 2011 at 6:23 PM, Jim Webber j...@neotechnology.com wrote: Hi Nuo, process [26266]... waiting for server to be ready. BAD. another server-process is running with [] Just to check before we dig deeper, are you certain you don't have another server process running? Jim ___ 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 -- 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