Re: [Neo4j] HA starting issue
Hi Brendan Now that we bundle the coordinators (a.k.a ZooKeeper) with the installation, setting up an HA cluster is a little simpler than before (not much, but a bit). Here are the steps I use for setting up an HA cluster *on a single machine*. I'm using an Apple MacBook and Neo4j Enterprise 1.4.1. If you're setting up a cluster on separate machines, not a single machine, let me know, and I'll write up some instructions for doing that. We're going to configure a cluster with 3 ZooKeeper instances and 3 Neo4j instances. Each ZooKeeper instance will have different quorum and leader election ports, and a different client port, and each Neo4j instance will host its Webadmin on a different port. We're going to run the ZooKeeper instances with the following quorum and leader election ports, and client ports - localhost:2888:3888, client port 2181 - localhost:2889:3889, client port 2181 - localhost:2890:3890, client port 2181 We're going to host the Webadmin for the Neo4j instances at: - localhost:7474 - localhost:7475 - localhost:7476 *Step 1 - Download* Download the current milestone version of the Enterprise edition for your platform from http://neo4j.org/download/ Uncompress, and copy to your install location. *Step 2 - One copy per instance* Copy the entire neo4j directory two more times into the same install directory. I've renamed the neo4j directories in my setup as follows: - neo4j-enterprise-1.4.1-1 - neo4j-enterprise-1.4.1-2 - neo4j-enterprise-1.4.1-3 *Step 3 - Configure the 1st ZooKeeper and Neo4j instances * Update the *conf/coord.cfg* file (leave all other values the same): server.1=localhost:2888:3888 server.2=localhost:2889:3889 server.3=localhost:2890:3890 Update the conf/neo4j-server.properties file. Uncomment the line beginning org.neo4j.server.database.mode : org.neo4j.server.database.mode=HA Update the *conf/neo4j.properties* file: set the machine ID, configure the ZooKeeper instances (note, there are no spaces between the ZooKeeper addresses), and add a line for the pull interval: ha.machine_id=1 ha.zoo_keeper_servers=localhost:2181,localhost:2182,localhost:2183 ha.pull_interval=10 *Step 4 - Configure the 2nd ZooKeeper and Neo4j instances* Update the *conf/coord.cfg* file (note the change to the client port): server.1=localhost:2888:3888 server.2=localhost:2889:3889 server.3=localhost:2890:3890 clientPort=2182 Update the conf/neo4j-server.properties file. Uncomment the line beginning org.neo4j.server.database.mode, and change the webadmin port: org.neo4j.server.database.mode=HA org.neo4j.server.webserver.port=7475 conf/neo4j.properties Update the *conf/neo4j.properties* file: set the machine ID, configure the ZooKeeper instances (note, there are no spaces between the ZooKeeper addresses), and add a line for the pull interval: ha.machine_id=2 ha.zoo_keeper_servers=localhost:2181,localhost:2182,localhost:2183 ha.pull_interval=10 Finally, set the ZooKeeper ID: Open *data/coordinator/myid* and change the value to 2 *Step 5 - Configure the 3rd ZooKeeper and Neo4j instances* Update the *conf/coord.cfg* file (note the change to the client port): server.1=localhost:2888:3888 server.2=localhost:2889:3889 server.3=localhost:2890:3890 clientPort=2183 Update the conf/neo4j-server.properties file. Uncomment the line beginning org.neo4j.server.database.mode, and change the webadmin port: org.neo4j.server.database.mode=HA org.neo4j.server.webserver.port=7476 conf/neo4j.properties Update the *conf/neo4j.properties* file: set the machine ID, configure the ZooKeeper instances (note, there are no spaces between the ZooKeeper addresses), and add a line for the pull interval: ha.machine_id=3 ha.zoo_keeper_servers=localhost:2181,localhost:2182,localhost:2183 ha.pull_interval=10 Finally, set the ZooKeeper ID: Open *data/coordinator/myid* and change the value to 3 *Step 6 - Start the coordinators (the ZooKeeper cluster)* cd into each the root of each neo4j installation directory in turn, and run: bin/neo4j-coordinator start *Step 7 - Start the Neo4j instances* cd into each the root of each neo4j installation directory in turn, and run: bin/neo4j start *Step 8 - Verify installation* The cluster should now be up and running. Open a browser to http://localhost:7474/webadmin/ Click on the 'Server info' tab, and then select the 'High Availability' menu option from the left-hand menu. You should see details of all three machines in the cluster (though the address and instanceId values for each machine will be empty) In the 'Data browser' tab, create a new node and add a property. Wait 10+ secs (the polling interval configured above), then open http://localhost:7475/webadmin/ and http://localhost:7476/webadmin/ and confirm that the node and its property have been replicated to the other two instances. 2011/8/17 Brendan cheng ccp...@hotmail.com Hi, I have tried to follow your instructions on HA startup but failed. I have the a screenshot
Re: [Neo4j] Meetup London - Cyphering on Tuesday
Correction from space-time continuum this side of the Atlantic: that'll be Weds 27th July (last Weds of the month) for the London meetup. Cypher, Doctor Who and beers are as Andreas has promised. See you there ian On 19 July 2011 16:14, Andreas Kollegger andreas.kolleg...@neotechnology.com wrote: London-town Graphistas, Join us next Tuesday, when you can get a closer look at the new features of 1.4, with some special attention paid to Cypher as a new alternative for exploring the Doctor Who graph universe (well, and exploring any graph, of course). As always, there'll be plenty of time for general chit-chat, and a few rounds of beer, on us. Tangents are always welcome, so bring your questions. Sign up over on Skillsmatter[1] Cheers, Andreas [1] http://skillsmatter.com/podcast/java-jee/cypher/js-1603 ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Director of Customer Success, Neo Technology http://neotechnology.com UK: +44 7974 144424 Skype: iansrobinson ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Problems with neo4j 1.4 rest server and filter
Hi Mike The problem here is that 1.4 no longer accepts spaces in keys and values -instead, use underscores. Try: { order : depth_first, uniqueness : relationship, return_filter : { language : javascript, body : position.length() 0 position.lastRelationship().getProperty('name').toLowerCase().indexOf('test')!=-1}, max_depth : 1 } That is, depth first becomes depth_first, return filter becomes return_filter, and max depth becomes max_depth. Kind regards ian On 12 July 2011 11:39, mike_t t.pr...@gmx.net wrote: Hi, I have some problems with the new version of neo4j. For my application i wrote a few unit test. These worked perfectly in neo4j 1.2 and 1.3 but not in 1.4. For example: I wanna have all relationships for a node with a special name. So I post following message to the url http://localhost:7474/db/data/node/1/traverse/relationship : { order : depth first, uniqueness : relationship, return filter : { language : javascript, body : position.length() 0 position.lastRelationship().getProperty('name').toLowerCase().indexOf('test')!=-1 }, max depth : 1 } I think neo4j ignores the filter and returns all relationships. -- View this message in context: http://neo4j-user-list.438527.n3.nabble.com/Problems-with-neo4j-1-4-rest-server-and-filter-tp3162043p3162043.html Sent from the Neo4J User List mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Director of Customer Success, Neo Technology http://neotechnology.com UK: +44 7974 144424 Skype: iansrobinson ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] How to filter out a visited node in Cypher?
Hi Have you tried: return x, count(x) That will accumulate (i.e. roll up) all the occurrences of a particular node - plus you'll know how many times it was connected to. Kind regards ian On 11 July 2011 21:06, noppanit noppani...@gmail.com wrote: Hi! I'm not sure how to do this in Cypher. Basically, I want to count the outgoing nodes but I don't know the relationships and they're growing. For examples, Node1---[rel1]--Node2 || |---[rel2]--| | [rel3] | Node2 I want to count all the nodes that connected with Node1 with whatever relationships. I'm using this query start n=(1) match (n)--(x) where return x X will be 3 because there are three relationships out of Node1, I only want x=2, because rel1, and rel2 is connected to Node2 as well. I'm not sure I'm explaining this well. Thanks a lot, I love this community. -- View this message in context: http://neo4j-user-list.438527.n3.nabble.com/How-to-filter-out-a-visited-node-in-Cypher-tp3160310p3160310.html Sent from the Neo4J User List mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Director of Customer Success, Neo Technology http://neotechnology.com UK: +44 7974 144424 Skype: iansrobinson ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Experiencing errors with JSON parsing in neo4j-shell
Hi Warren If you surround the entire map with quotes, and use single quotes for keys and values, it should work: mkrel -c -d i -t DOMAIN_OF --np {'app':'foobar'} Kind regards ian -- Director of Customer Success, Neo Technology http://neotechnology.com UK: +44 7974 144424 Skype: iansrobinson On 31 May 2011 19:16, Pfeffer, Warren warren.pfef...@credit-suisse.comwrote: Hello All, Experiencing errors with JSON parsing in neo4j-shell Version neo4j-community-1.4.M02 running on 64bit SLES-10 with Java 1.6.0_01-b06 I tried all manner of quoting the JSON but no luck. Thanks in advance for any insight into this problem. WP neo4j-sh (0)$ help mkrel Creates a relationship to a new or existing node, f.ex: mkrel -ct KNOWS (will create a relationship to a new node) mkrel -t KNOWS 123 (will create a relationship to node with id 123). -c Supplied if there should be created a new node. --cd Go to the created node, like doing 'cd'. -d The direction: OUTGOING, INCOMING, o, i. --np Properties (a json map) to set for the new node (if one is created). --rp Properties (a json map) to set for the new relationship. -t The relationship type. -v Verbose mode: display created nodes/relationships. neo4j-sh (0)$ mkrel -c -d i -t DOMAIN_OF --np {app:foobar} org.neo4j.shell.util.json.JSONException: A JSONObject text must end with '}' at character 1 === Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html === ___ 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] Announcing Neo4j 1.4 M03 “Kiruna Stol”
Hello fellow graphistas, With another two weeks gone, we’re another milestone closer to the “Kiruna Stol” release. Today we’re releasing the third milestone in our journey towards the 1.4 products. The 1.4 M03 release brings lots of new features, including self relationships, additions to the Webadmin interface, and some fabulous performance improvements with our shiny new directionally-based cache. As usual, the packaged release is available from our download site. Grab it, play with it and give us your feedback on the mailing list. Don’t forget to be safe - this is a milestone release so back up your data! Enjoy! Ian Robinson Director of Customer Success, Neo Technology (For those of you who haven't yet rushed off to grab the release, and are still reading, a belated introduction. I'm Ian Robinson, and as you can see, I have the delightful title of Director of Customer Success. That means I'm here to help make you wildly successful in everything Neo4j and graph related. I'm based in London, but expect to see me pop up wherever Neo4j is being used to address your complex data issues. Over the next few weeks, we're going to make it even easier for you to give us your feedback, make suggestions, and raise issues. In the meantime, you can contact me at ian.robin...@neotechnology.com, or through this community lists.) ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Compact JSON format for the server
Another agreement here. It doesn't even have to be a query parameter - just identify the compact variant with a different URI. What would be the caching implications if it were a query parameter? Though the URI spec says querystring parameters effectively create a new URI, I think many caches/reverse proxies will treat http://localhost:7474/db/data/node/1?compact=true and http://localhost:7474/db/data/node/1http://localhost:7474/db/data/node/1?compact=true as the same URI. Which will mess up caching. I expected a full representation, and got back a compact one. Hmmm. May be worth testing with e.g. Squid. But the main point is: a compact representation belongs to a different resource. Identify it through the URI, not an HTTP header. ian On 21 May 2011 14:02, Rick Bullotta rick.bullo...@thingworx.com wrote: Agree with Jim. This fits better as a query parameter vs content type. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user