Re: [Neo4j] Accessing node properties with batch inserter
Yes, That sounds right. Could you please file an issue?
Send from a device with crappy keyboard and autocorrection.
/peter
On Feb 17, 2012 4:22 PM, "Paul Jackson" wrote:
> Hi Peter,
>
> I shouldn't have added that code. I added it as a test to see if that was
> the problem. This code does not delete nor use transactions, yet the
> properties returned are empty. I guess I am using it wrong?
>
> BatchInserter batchInserter = new BatchInserterImpl(storeDir);
> GraphDatabaseService graph = batchInserter.getGraphDbService();
> Node node = graph.createNode();
> long id = node.getId();
> node.setProperty("MyKey", "MyValue");
> Map properties = batchInserter.getNodeProperties(id);
>
> Intuition says it should remember the property was added. Bug or user
> error?
>
> Thanks,
> -Paul
>
___
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register
and consider posting at https://groups.google.com/forum/#!forum/neo4j
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Accessing node properties with batch inserter
2012/2/15 Peter Neubauer
> Paul,
> that GDB instance you get is NOT supporting deletions or transactions
> (it does just ignore them) it's more for reading stuff. See the
> JavaDoc for the method:
>
>/**
> *
> * @return a GraphDatabaseService that does not support deletion
> and transactions
> */
>public GraphDatabaseService getGraphDbService();
>
> When having a Batchinserter open, please do all modifications via it ...
>
> I think it should work regardless though...
> Cheers,
>
> /peter neubauer
>
> G: neubauer.peter
> S: peter.neubauer
> P: +46 704 106975
> L: http://www.linkedin.com/in/neubauer
> T: @peterneubauer
>
> Neo4j 1.6 released - dzone.com/6S4K
> The Neo4j Heroku Challenge - http://neo4j-challenge.herokuapp.com/
>
>
>
> On Tue, Feb 14, 2012 at 10:33 PM, Paul A. Jackson
> wrote:
> > Just started using the batch inserter and I think I am missing a basic
> concept.
> >
> > This code snippet using Neo 1.5 returns a zero-length map. I would
> expect it to have a single property (MyKey).
> >
> >String storeDir = "./neodb";
> >deleteDirectory(new File(storeDir));
> >BatchInserter batchInserter = new BatchInserterImpl(storeDir);
> >GraphDatabaseService graph = batchInserter.getGraphDbService();
> >Transaction transaction = graph.beginTx();
> >Node node = graph.createNode();
> >long id = node.getId();
> >node.setProperty("MyKey", "MyValue");
> >transaction.success();
> >transaction.finish();
> >Map properties = batchInserter.getNodeProperties(id);
>// properties is empty
> >
> > I added the Transaction stuff for testing, but was expecting that to not
> be necessary as well.
> >
> > Thanks,
> >
> > Paul Jackson, Principal Software Engineer
> > Pitney Bowes Software
> > 4200 Parliament Place | Suite 600 | Lanham, MD 20706-1844 USA
> > O: 301.918.0850 | M: 703.862.0120 | www.pb.com
> > [email protected]
> >
> > Every connection is a new opportunityT
> >
> >
> >
> > Please consider the environment before printing or forwarding this
> email. If you do print this email, please recycle the paper.
> >
> > This email message may contain confidential, proprietary and/or
> privileged information. It is intended only for the use of the intended
> recipient(s). If you have received it in error, please immediately advise
> the sender by reply email and then delete this email message. Any
> disclosure, copying, distribution or use of the information contained in
> this email message to or by anyone other than the intended recipient is
> strictly prohibited. Any views expressed in this message are those of the
> individual sender, except where the sender specifically states them to be
> the views of the Company.
> >
> >
> > ___
> > NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please
> register and consider posting at
> https://groups.google.com/forum/#!forum/neo4j
> >
> > Neo4j mailing list
> > [email protected]
> > https://lists.neo4j.org/mailman/listinfo/user
> ___
> NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please
> register and consider posting at
> https://groups.google.com/forum/#!forum/neo4j
>
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>
--
Mattias Persson, [[email protected]]
Hacker, Neo Technology
www.neotechnology.com
___
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register
and consider posting at https://groups.google.com/forum/#!forum/neo4j
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Accessing node properties with batch inserter
Paul,
that GDB instance you get is NOT supporting deletions or transactions
(it does just ignore them) it's more for reading stuff. See the
JavaDoc for the method:
/**
*
* @return a GraphDatabaseService that does not support deletion
and transactions
*/
public GraphDatabaseService getGraphDbService();
When having a Batchinserter open, please do all modifications via it ...
Cheers,
/peter neubauer
G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer
Neo4j 1.6 released - dzone.com/6S4K
The Neo4j Heroku Challenge - http://neo4j-challenge.herokuapp.com/
On Tue, Feb 14, 2012 at 10:33 PM, Paul A. Jackson wrote:
> Just started using the batch inserter and I think I am missing a basic
> concept.
>
> This code snippet using Neo 1.5 returns a zero-length map. I would expect it
> to have a single property (MyKey).
>
> String storeDir = "./neodb";
> deleteDirectory(new File(storeDir));
> BatchInserter batchInserter = new BatchInserterImpl(storeDir);
> GraphDatabaseService graph = batchInserter.getGraphDbService();
> Transaction transaction = graph.beginTx();
> Node node = graph.createNode();
> long id = node.getId();
> node.setProperty("MyKey", "MyValue");
> transaction.success();
> transaction.finish();
> Map properties = batchInserter.getNodeProperties(id); //
> properties is empty
>
> I added the Transaction stuff for testing, but was expecting that to not be
> necessary as well.
>
> Thanks,
>
> Paul Jackson, Principal Software Engineer
> Pitney Bowes Software
> 4200 Parliament Place | Suite 600 | Lanham, MD 20706-1844 USA
> O: 301.918.0850 | M: 703.862.0120 | www.pb.com
> [email protected]
>
> Every connection is a new opportunityT
>
>
>
> Please consider the environment before printing or forwarding this email. If
> you do print this email, please recycle the paper.
>
> This email message may contain confidential, proprietary and/or privileged
> information. It is intended only for the use of the intended recipient(s). If
> you have received it in error, please immediately advise the sender by reply
> email and then delete this email message. Any disclosure, copying,
> distribution or use of the information contained in this email message to or
> by anyone other than the intended recipient is strictly prohibited. Any views
> expressed in this message are those of the individual sender, except where
> the sender specifically states them to be the views of the Company.
>
>
> ___
> NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register
> and consider posting at https://groups.google.com/forum/#!forum/neo4j
>
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
___
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register
and consider posting at https://groups.google.com/forum/#!forum/neo4j
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

