Re: [Neo4j] Onlineback up Error on 1.3M02

2011-02-14 Thread Mattias Persson
2011/2/14 Brendan Cheng 

> Thanks for the advice but I still get an exception
>
> I added "enable_online_backup = true"  to neo4j-server.properties
> but still getting
>
> run:
> Tue Feb 15 01:30:58 CST 2011: Client connected to localhost:6362
> Tue Feb 15 01:30:58 CST 2011: Opened a new channel to localhost/
> 127.0.0.1:6362
> 2011/2/15 01:31:18 itags.Sync.SyncData main
> : null
> org.neo4j.com.ComException: org.neo4j.com.ComException:
> org.jboss.netty.handler.queue.BlockingReadTimeoutException
> at org.neo4j.com.Client.sendRequest(Client.java:183)
>at
> org.neo4j.com.backup.BackupClient.fullBackup(BackupClient.java:42)
>at org.neo4j.com.backup.OnlineBackup.full(OnlineBackup.java:67)
> at itags.Sync.SyncData.fullThenIncremental(SyncData.java:46)
>at itags.Sync.SyncData.main(SyncData.java:233)
> Caused by: org.neo4j.com.ComException:
> org.jboss.netty.handler.queue.BlockingReadTimeoutException
>at
> org.neo4j.com.DechunkingChannelBuffer.readNext(DechunkingChannelBuffer.java:61)
>at org.neo4j.com.Client$2.readNext(Client.java:155)
> at
> org.neo4j.com.DechunkingChannelBuffer.readNextChunk(DechunkingChannelBuffer.java:79)
>at
> org.neo4j.com.DechunkingChannelBuffer.(DechunkingChannelBuffer.java:50)
>at org.neo4j.com.Client$2.(Client.java:151)
>at org.neo4j.com.Client.sendRequest(Client.java:150)
>... 4 more
> Caused by: org.jboss.netty.handler.queue.BlockingReadTimeoutException
>at
> org.jboss.netty.handler.queue.BlockingReadHandler.readEvent(BlockingReadHandler.java:236)
>at
> org.jboss.netty.handler.queue.BlockingReadHandler.read(BlockingReadHandler.java:167)
>at
> org.neo4j.com.DechunkingChannelBuffer.readNext(DechunkingChannelBuffer.java:57)
>... 9 more
>
> any idea?
>

Hmm, not really... I just downloaded 1.3.M02 package, edited
conf/neo4j.properties file and added:

   enable_online_backup = true

Then called:

   ./bin/neo4j start

I then wrote a class using the classpath from the unpacked 1.3.M02 package
containing:

   public class Backup
   {
   public static void main( String[] args )
   {
   OnlineBackup.from( "localhost" ).full( "myBackup" ).close();
   }
   }

And it worked. Have you done exactly like me?

Best,
Mattias


>
> thanks in advance
>
> Brendan
>
> Date: Mon, 14 Feb 2011 10:13:16 +0100
> From: Mattias Persson 
> Subject: Re: [Neo4j] Onlineback up Error on 1.3M02
> To: Neo4j user discussions 
> Message-ID:
>   
> Content-Type: text/plain; charset=UTF-8
>
> The Neo4j server is registered at port 7474, but the backup server isn't...
> you usually don't need to specify port so that the default can be used.
> What
> you'll have to do is:
>
> * Add "enable_online_backup = true" to your neo4j configuration file and
> restart the server (if that wasn't the case).
> * Use OnlineBackup.from( "localhost" );
>
> and it should work (just tried it).
>
> 2011/2/14 Brendan Cheng 
>
> > Hi,
> >
> > I was trying to test the online backup process.  I received a
> > ComException saying "Channel has been closed".
> >
> > Here is my code which is copied from your Testbackup with a small
> > modification:
> >
> >   private String serverPath = "localhost";
> >   private String backupPath = "target/var/backuedup-serverdb";
> >
> >   public void fullThenIncremental() throws Exception
> >   {
> >   ServerInterface server = startServer();
> >   OnlineBackup backup = OnlineBackup.from( "localhost",7474 );
> >   backup.full( backupPath );
> >   shutdownServer( server );
> >
> >   DbRepresentation furtherRepresentation = addMoreData();
> >   server = startServer();
> >   backup.incremental( backupPath );
> >   assertEquals( furtherRepresentation, DbRepresentation.of(
> > backupPath ) );
> >   shutdownServer( server );
> >   }
> >
> > and the error message is:
> >
> > run:
> > Mon Feb 14 13:37:54 CST 2011: Client connected to localhost:7474
> > Mon Feb 14 13:37:54 CST 2011: Opened a new channel to localhost/
> > 127.0.0.1:7474
> > 2011/2/14 01:37:54 itags.Sync.SyncData main
> > : null
> > org.neo4j.com.ComException: org.neo4j.com.ComException: Channel has been
> > closed
> >   at org.neo4j.com.Client.sendRequest(Client.java:183)
> >   at
> org.neo4j.com.backup.BackupClient.fullBackup(BackupClient.java:42)
> >   at org.neo4j.com.backup.OnlineBackup.full(OnlineBackup.java:67)
> >   at itags.Sync.SyncData.fullThenIncremental(SyncData.java:45)
> >   at itags.Sync.SyncData.main(SyncData.java:232)
> > Caused by: org.neo4j.com.ComException: Channel has been closed
> >   at org.neo4j.com.Client$2.readNext(Client.java:159)
> >   at
> >
> org.neo4j.com.DechunkingChannelBuffer.readNextChunk(DechunkingChannelBuffer.java:79)
> >   at
> >
> org.neo4j.com.DechunkingChannelBuffer.(DechunkingChannelBuffer.java:50)
> >   at org.neo4j.com.Client$2.(Client.java:151)
> >   at org.neo4j.com.Client.sendRequest(C

Re: [Neo4j] Does BatchInserter auto-commit before shutting down?

2011-02-14 Thread Mattias Persson
It looks to me that you're inserting stuff into an index as well,
http://wiki.neo4j.org/content/Index_Framework#Batch_insertion right? If you
do that you'll have to call shutdown on that BatchInserterIndexProvider on
conjunction with shutting down the BatchInserter.

2011/2/14 Pablo Pareja 

> Yeah, that's what I thought, I just wanted to confirm it.
> Thanks
>
> Pablo
>
> On Mon, Feb 14, 2011 at 4:57 PM, Tobias Ivarsson <
> tobias.ivars...@neotechnology.com> wrote:
>
> > BatchInserter.shutdown() is synchronous, it has to be, otherwise it
> > wouldn't
> > be safe at all.
> > After shutdown() has returned it guarantees that all store files have
> been
> > written, and are in a consistent state.
> >
> > -t
> >
> > On Mon, Feb 14, 2011 at 4:01 PM, Pablo Pareja  wrote:
> >
> > > Great, thanks for the information.
> > > Just out of curiosity then, are calls to BatchInserter.shutdown() sync
> or
> > > asynchronous ?
> > > I mean, does the program flow stops in that call till every operation
> the
> > > shutdown implies has been
> > > performed?
> > > Cheers,
> > >
> > > Pablo
> > >
> > > On Mon, Feb 14, 2011 at 3:30 PM, Tobias Ivarsson <
> > > tobias.ivars...@neotechnology.com> wrote:
> > >
> > > > The batch inserter will write data to disk as needed. The memory
> mapped
> > > > regions are used to speed up writes, so that the API level writes can
> > be
> > > > done to the memory mapped regions which can then be written in large
> > > > sequential chunks to disk.
> > > >
> > > > You do not have to shut down the batch inserter for this to happen,
> it
> > is
> > > > taken care of automatically.
> > > >
> > > > Cheers,
> > > > Tobias
> > > >
> > > > On Mon, Feb 14, 2011 at 10:53 AM, Pablo Pareja 
> > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I was wondering whether once the memory-mapping configuration for
> > > > > BatchInserter is full *(for example*
> > > > > *in the case of  neostore.relationshipstore.db.mapped_memory) *the
> > > class
> > > > > would auto-commit these changes
> > > > > to disk or it would just throw an exception.
> > > > > In the latter case, what would the options be?
> > > > >
> > > > > In my case I have to insert a huge amount of data that cannot be
> > > > allocated
> > > > > in RAM.
> > > > > First I thought the BatchInserter would deal with this kind of
> > > situation,
> > > > > however I keep getting exceptions whenever the
> > > > > program reaches the point where *(I guess) *memory mapping
> > > configuration
> > > > is
> > > > > not enough.
> > > > >
> > > > > Since I cannot use more RAM than what I have, I thought, ok so I
> will
> > > > > shutdown both inserter and index service and
> > > > > create them again each time the program have already inserted a
> > decent
> > > > > amount of data.
> > > > > Then, don't know why but after a couple of tests, at some point the
> > > > program
> > > > > always halts throwing a really weird exception
> > > > > saying something about a index file that exists but cannot be
> > accessed
> > > in
> > > > > the merge process ?!?
> > > > >
> > > > > I guess I'd be doing something wrong but cannot figure out what it
> > is.
> > > > > Thanks in advance
> > > > >
> > > > > --
> > > > > Pablo Pareja Tobes
> > > > > LinkedInhttp://www.linkedin.com/in/pabloparejatobes
> > > > > Twitter   http://www.twitter.com/pablopareja
> > > > >
> > > > > http://www.ohnosequences.com
> > > > > ___
> > > > > Neo4j mailing list
> > > > > User@lists.neo4j.org
> > > > > https://lists.neo4j.org/mailman/listinfo/user
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Tobias Ivarsson 
> > > > Hacker, Neo Technology
> > > > www.neotechnology.com
> > > > Cellphone: +46 706 534857
> > > > ___
> > > > Neo4j mailing list
> > > > User@lists.neo4j.org
> > > > https://lists.neo4j.org/mailman/listinfo/user
> > > >
> > >
> > >
> > >
> > > --
> > > Pablo Pareja Tobes
> > > LinkedInhttp://www.linkedin.com/in/pabloparejatobes
> > > Twitter   http://www.twitter.com/pablopareja
> > >
> > > http://www.ohnosequences.com
> > > ___
> > > Neo4j mailing list
> > > User@lists.neo4j.org
> > > https://lists.neo4j.org/mailman/listinfo/user
> > >
> >
> >
> >
> > --
> > Tobias Ivarsson 
> > Hacker, Neo Technology
> > www.neotechnology.com
> > Cellphone: +46 706 534857
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
>
>
>
> --
> Pablo Pareja Tobes
> LinkedInhttp://www.linkedin.com/in/pabloparejatobes
> Twitter   http://www.twitter.com/pablopareja
>
> http://www.ohnosequences.com
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
__

Re: [Neo4j] Unmanged extensions

2011-02-14 Thread Peter Neubauer
Piotr,
what is the code for your extensions, and what does the neo4j.log-wrapper say?

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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Mon, Feb 14, 2011 at 2:57 PM, Piotr Pejas  wrote:
> Hi,
> I am trying to deploy unmanged extensions into neo4j server with a little 
> result.
> I've followed this tutorial: 
> http://components.neo4j.org/neo4j-examples/snapshot/server-rest-api.html
>
> snippet from my wrapper.log:
>
> INFO: Scanning for root resource and provider classes in the packages:
>  com.example.graph
> INFO: Root resource classes found:
>  class com.example.graph.Update
>  class com.example.graph.HelloWorldResource
>
> and in my neo4j-server.properties I have added this line:
> org.neo4j.server.thirdparty_jaxrs_classes=com.example.graph=/example
>
> and a outcome is 404, for both resources HelloWorldResource and Update
>
> As in example I am using server in version: Version: 1.3-SNAPSHOT
> and I compile my code against neo4j-server 0.6-SNAPSHOT, jar placed in 
> plugins no additional dependencies.
>
> Thank you in advance for any help.
>
> Best Regards
> Piotr Pejas
>
> ___
> 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] Traversal Question

2011-02-14 Thread Peter Neubauer
Hi John,
see the following example on something that should roughly work as you
want. Notice that I only check for the existence of "relProp" on REL3,
you can of course check for a value, but I didn't have a good example.

This gives you the paths:

(1)--[REL1,3]-->(2)--[REL2,4]-->(3)--[REL3,5]-->(4)--[REL4,6]-->(5)
(1)--[REL1,7]-->(6)--[REL3,8]-->(7)--[REL4,10]-->(8)--[REL2,12]-->(9)

Which is what you want - paths of length exactly 4, with unordered
REL1, REL2, REL3, REL4 and a constraint on REL3?

/peter


package org.neo4j.examples.orderedpath;

import static org.neo4j.graphdb.DynamicRelationshipType.withName;

import java.util.ArrayList;

import org.junit.BeforeClass;
import org.junit.Test;
import org.neo4j.graphdb.Direction;
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.Path;
import org.neo4j.graphdb.Relationship;
import org.neo4j.graphdb.RelationshipType;
import org.neo4j.graphdb.Transaction;
import org.neo4j.graphdb.traversal.Evaluation;
import org.neo4j.graphdb.traversal.Evaluator;
import org.neo4j.graphdb.traversal.TraversalDescription;
import org.neo4j.graphdb.traversal.Traverser;
import org.neo4j.kernel.EmbeddedGraphDatabase;
import org.neo4j.kernel.Traversal;

public class NonOrderedPathTest
{
private static EmbeddedGraphDatabase db;
private static RelationshipType REL1 = withName( "REL1" ),
REL2 = withName( "REL2" ), REL3 = withName( "REL3" ),
REL4 = withName( "REL4" ), REL8 = withName( "REL8" ),
REL9 = withName( "REL9" ), REL10 = withName( "REL10" );

@BeforeClass
public static void createTheGraph()
{
db = new EmbeddedGraphDatabase( "target/db" );
Transaction tx = db.beginTx();
// START SNIPPET: createGraph
Node A = db.createNode();
Node B = db.createNode();
Node C = db.createNode();
Node D = db.createNode();
Node E = db.createNode();
Node P = db.createNode();
Node Q = db.createNode();
Node R = db.createNode();
Node S = db.createNode();
Node T = db.createNode();
Node U = db.createNode();
Node X = db.createNode();
Node Y = db.createNode();
Node Z = db.createNode();
A.createRelationshipTo( X, REL1 );
X.createRelationshipTo( Y, REL2 );
Y.createRelationshipTo( Z, REL8 );
A.createRelationshipTo( B, REL1 );
B.createRelationshipTo( C, REL2 );
Relationship rel3 = C.createRelationshipTo( D, REL3 );
rel3.setProperty( "relProp", 123 );
D.createRelationshipTo( E, REL4 );
A.createRelationshipTo( P, REL1 );
Relationship rel33 = P.createRelationshipTo( Q, REL3 );
rel33.setProperty( "relProp", 123 );
Q.createRelationshipTo( R, REL9 );
Q.createRelationshipTo( R, REL4 );
R.createRelationshipTo( E, REL10 );
R.createRelationshipTo( S, REL2 );
S.createRelationshipTo( T, REL9 );
T.createRelationshipTo( U, REL8 );

tx.success();
tx.finish();
}

@Test
public void testPath()
{
TraversalDescription td = Traversal.description().expand(
Traversal.expanderForTypes( REL1, Direction.OUTGOING, REL2,
Direction.OUTGOING, REL3, Direction.OUTGOING, REL4,
Direction.OUTGOING ) ).evaluator( new Evaluator()
{

public Evaluation evaluate( Path path )
{
if ( path.length() == 0 )
{
return Evaluation.EXCLUDE_AND_CONTINUE;
}
ArrayList relTypes = new ArrayList();
for(Relationship rel : path.relationships()) {
String relname = rel.getType().name();
if(relname.equals( REL3.name() )) {
if(rel.hasProperty( "relProp" )) {
} else {
return Evaluation.EXCLUDE_AND_PRUNE;
}
}
if(!relTypes.contains( relname )) {
relTypes.add( relname );
} else {
return Evaluation.EXCLUDE_AND_PRUNE;
}
}
return
path.length()==4?Evaluation.INCLUDE_AND_CONTINUE:Evaluation.EXCLUDE_AND_CONTINUE;
}
} );
Traverser t = td.traverse( db.getNodeById( 1 ) );
for ( Path path : t )
{
System.out.println( path );
}

}
}


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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Mon, Feb 14, 2011 at 6:34 PM, John Howard  wrote:
> Thanks Peter & Craig.
>
> There are n

[Neo4j] Exception when calling to optimize() method

2011-02-14 Thread Pablo Pareja
I just got an exception when calling to

indexService.optimize();

java.io.IOException: background merge hit exception: _u6:c10863150
_u7:c2->_u7 into _u8 [optimize] [mergeDocStores]
neo4j.index.lucene.LuceneIndexBatchInserterImpl.optimize(LuceneIndexBatchInserterImpl.java:273)

any ideas?

I'm calling the optimize() method once per  ~ 30.000 indexations, is it that
too much/few ?
are you supposed to call this method always between an indexation and a
query on that index?

Cheers,

Pablo

-- 
Pablo Pareja Tobes
LinkedInhttp://www.linkedin.com/in/pabloparejatobes
Twitter   http://www.twitter.com/pablopareja

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


[Neo4j] Neo4j and Microsoft Azure

2011-02-14 Thread Peter Neubauer
Hi all Graphytes,
there has been a lot of interest in Neo4j fro the Microsoft side of
things, so Magnus Mårtensson and me did write-up o how to get a first
version of a Neo4j Server hosted on Microsoft Azure. Enjoy, and as
always feel free to feedback to the community!

http://blog.neo4j.org/2011/02/announcing-neo4j-on-windows-azure.html

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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Graph pattern matching component

2011-02-14 Thread Saikat Kanjilal

Hi Andreas,I've seen the code in the source repository, however I'm not sure 
(at least yet) that its going to be helpful for my use case.  What I am looking 
to do is that I have a set of nodes that occur with certain ordering and 
contain relationships based on some transportation metadata 
(trainpath/walkingpath etc).  I would like to do some pattern matching by 
selecting these nodes with their orderings (i.e. a potential subgraph) out of 
my data set which can be millions of nodes.  Is there a way to do this without 
using loops or using the Traverser API.   I was wondering if sparql and RDF 
could help with this.  See example below:

DataSet: Million nodes with a property called nodetype of 
"trainstop","foodstop","pointofinterest","attraction"Query:  Find all paths 
with a nodetype of trainstop occuring before a nodetype of "pointofinterest" 
occuring before a nodetype of "attraction"Data Returned:  A set of paths


Some insight into this would be much appreciated.Best Regards

> From: andreas.kolleg...@neotechnology.com
> Date: Mon, 14 Feb 2011 15:28:57 +0100
> To: user@lists.neo4j.org
> Subject: Re: [Neo4j] Graph pattern matching component
> 
> Hey Saikat,
> 
> The component site has some example code: 
> http://components.neo4j.org/neo4j-graph-matching/
> 
> Is there something specific you have in mind?
> 
> -Andreas
> 
> On Feb 11, 2011, at 6:48 PM, Saikat Kanjilal wrote:
> 
> > 
> > Hi Everyone,I am reading up on email threads and documentation pertaining 
> > to the pattern matching component and am considering using it to advance 
> > the next set of features for the code.  I was wondering if someone has some 
> > examples that they can put on github or document on the wiki for this 
> > component.  I am trying to perform some complex pattern matching operations 
> > and it would help a  lot to see the different API's in use.
> > Best Regards  
> > ___
> > 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] Unmanged extensions

2011-02-14 Thread Peter Neubauer
Piotr,
the finding seems to work. Maybe we can sort that out over Skype? Do
you have the code for your extension somewhere?

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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Mon, Feb 14, 2011 at 2:57 PM, Piotr Pejas  wrote:
> Hi,
> I am trying to deploy unmanged extensions into neo4j server with a little 
> result.
> I've followed this tutorial: 
> http://components.neo4j.org/neo4j-examples/snapshot/server-rest-api.html
>
> snippet from my wrapper.log:
>
> INFO: Scanning for root resource and provider classes in the packages:
>  com.example.graph
> INFO: Root resource classes found:
>  class com.example.graph.Update
>  class com.example.graph.HelloWorldResource
>
> and in my neo4j-server.properties I have added this line:
> org.neo4j.server.thirdparty_jaxrs_classes=com.example.graph=/example
>
> and a outcome is 404, for both resources HelloWorldResource and Update
>
> As in example I am using server in version: Version: 1.3-SNAPSHOT
> and I compile my code against neo4j-server 0.6-SNAPSHOT, jar placed in 
> plugins no additional dependencies.
>
> Thank you in advance for any help.
>
> Best Regards
> Piotr Pejas
>
> ___
> 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] Onlineback up Error on 1.3M02

2011-02-14 Thread Brendan Cheng
Thanks for the advice but I still get an exception

I added "enable_online_backup = true"  to neo4j-server.properties
but still getting

run:
Tue Feb 15 01:30:58 CST 2011: Client connected to localhost:6362
Tue Feb 15 01:30:58 CST 2011: Opened a new channel to localhost/127.0.0.1:6362
2011/2/15 01:31:18 itags.Sync.SyncData main
: null
org.neo4j.com.ComException: org.neo4j.com.ComException:
org.jboss.netty.handler.queue.BlockingReadTimeoutException
at org.neo4j.com.Client.sendRequest(Client.java:183)
at org.neo4j.com.backup.BackupClient.fullBackup(BackupClient.java:42)
at org.neo4j.com.backup.OnlineBackup.full(OnlineBackup.java:67)
at itags.Sync.SyncData.fullThenIncremental(SyncData.java:46)
at itags.Sync.SyncData.main(SyncData.java:233)
Caused by: org.neo4j.com.ComException:
org.jboss.netty.handler.queue.BlockingReadTimeoutException
at 
org.neo4j.com.DechunkingChannelBuffer.readNext(DechunkingChannelBuffer.java:61)
at org.neo4j.com.Client$2.readNext(Client.java:155)
at 
org.neo4j.com.DechunkingChannelBuffer.readNextChunk(DechunkingChannelBuffer.java:79)
at 
org.neo4j.com.DechunkingChannelBuffer.(DechunkingChannelBuffer.java:50)
at org.neo4j.com.Client$2.(Client.java:151)
at org.neo4j.com.Client.sendRequest(Client.java:150)
... 4 more
Caused by: org.jboss.netty.handler.queue.BlockingReadTimeoutException
at 
org.jboss.netty.handler.queue.BlockingReadHandler.readEvent(BlockingReadHandler.java:236)
at 
org.jboss.netty.handler.queue.BlockingReadHandler.read(BlockingReadHandler.java:167)
at 
org.neo4j.com.DechunkingChannelBuffer.readNext(DechunkingChannelBuffer.java:57)
... 9 more

any idea?

thanks in advance

Brendan

Date: Mon, 14 Feb 2011 10:13:16 +0100
From: Mattias Persson 
Subject: Re: [Neo4j] Onlineback up Error on 1.3M02
To: Neo4j user discussions 
Message-ID:
   
Content-Type: text/plain; charset=UTF-8

The Neo4j server is registered at port 7474, but the backup server isn't...
you usually don't need to specify port so that the default can be used. What
you'll have to do is:

* Add "enable_online_backup = true" to your neo4j configuration file and
restart the server (if that wasn't the case).
* Use OnlineBackup.from( "localhost" );

and it should work (just tried it).

2011/2/14 Brendan Cheng 

> Hi,
>
> I was trying to test the online backup process.  I received a
> ComException saying "Channel has been closed".
>
> Here is my code which is copied from your Testbackup with a small
> modification:
>
>   private String serverPath = "localhost";
>   private String backupPath = "target/var/backuedup-serverdb";
>
>   public void fullThenIncremental() throws Exception
>   {
>   ServerInterface server = startServer();
>   OnlineBackup backup = OnlineBackup.from( "localhost",7474 );
>   backup.full( backupPath );
>   shutdownServer( server );
>
>   DbRepresentation furtherRepresentation = addMoreData();
>   server = startServer();
>   backup.incremental( backupPath );
>   assertEquals( furtherRepresentation, DbRepresentation.of(
> backupPath ) );
>   shutdownServer( server );
>   }
>
> and the error message is:
>
> run:
> Mon Feb 14 13:37:54 CST 2011: Client connected to localhost:7474
> Mon Feb 14 13:37:54 CST 2011: Opened a new channel to localhost/
> 127.0.0.1:7474
> 2011/2/14 01:37:54 itags.Sync.SyncData main
> : null
> org.neo4j.com.ComException: org.neo4j.com.ComException: Channel has been
> closed
>   at org.neo4j.com.Client.sendRequest(Client.java:183)
>   at org.neo4j.com.backup.BackupClient.fullBackup(BackupClient.java:42)
>   at org.neo4j.com.backup.OnlineBackup.full(OnlineBackup.java:67)
>   at itags.Sync.SyncData.fullThenIncremental(SyncData.java:45)
>   at itags.Sync.SyncData.main(SyncData.java:232)
> Caused by: org.neo4j.com.ComException: Channel has been closed
>   at org.neo4j.com.Client$2.readNext(Client.java:159)
>   at
> org.neo4j.com.DechunkingChannelBuffer.readNextChunk(DechunkingChannelBuffer.java:79)
>   at
> org.neo4j.com.DechunkingChannelBuffer.(DechunkingChannelBuffer.java:50)
>   at org.neo4j.com.Client$2.(Client.java:151)
>   at org.neo4j.com.Client.sendRequest(Client.java:150)
>   ... 4 more
>
> I have my db server started as window service.
>
> Also, I want to know if we need the process "startServer()" if the db
> server has been started.
>
> Regards,
>
> Brendan
> ___
> 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] Traversal Question

2011-02-14 Thread John Howard
Thanks Peter & Craig.

There are no such constraints, that is, relationship types can reoccur if a
path satisfies the input criteria.
For ex: If there was another path in our graph example, say,
   REL1REL3 REL4   REL2  REL9   REL8
  A -> P -> Q ---> R -> S
-->T--->U

we would like to see 2 paths, viz,  A ->B->C->D-> E and  A ->P->Q->R-> S

I tried with the map suggestion, the prune logic doesn't seem to fit with
the existing evaluators.
Again, my understanding of the prune evaluators may be wrong.
Appreciate your help.

Thank you.


On Mon, Feb 14, 2011 at 5:22 AM, Peter Neubauer <
peter.neuba...@neotechnology.com> wrote:

> John,
> In your example, are there any constraints on that of the four
> relationship types, every one need to be exactly one time in the path,
> or is it just any of these?
>
> Instead of using a List like in the previous example, you can the use
> a Map to tick the visited relationship types and check the property
> when you get to REL3? I can do it for you in neo4j-examples again if
> you give me some more details :)
>
> Cheers,
>
> /peter neubauer
>
> GTalk:  neubauer.peter
> Skype   peter.neubauer
> Phone   +46 704 106975 <+46704106975>
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter  http://twitter.com/peterneubauer
>
> http://www.neo4j.org   - Your high performance graph database.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
>
>  On Sun, Feb 13, 2011 at 10:16 AM, John Howard 
> wrote:
> > Thanks Peter. That was very useful.
> >
> > I am trying to get the path A ->B->C->D-> E in the below graph, with the
> > following inputs
> > Start Node: A,
> > Relationships: REL1, REL4, REL2 (that is, order is not known)
> > Relationship Property: relProp= "abc" in REL3
> >
> > I was not able to define an evaluator which takes the combination of
> > relationship types(without regard to order) and relationship properties
> to
> > return the desired path.
> > Can it be achievable in the current traversal framework?
> >
> >  REL1  REL2REL8
> >  A -> X -> Y ---> Z
> >
> >   REL1REL2 REL3REL4
> >  A -> B -> C ---> D -> E
> >
> >   REL1REL3 REL9   REL10
> >  A -> P -> Q ---> R -> E
> >
> >
> > As always, appreciate your guidance.
> >
> >
> >
> > ===
> > John,
> > if the order of the relationships doesn't matter, you could do
> > something like this with the Traversal API (holding an ordered Path to
> > test against in your Evaluator):
> >
> >public void testPath()
> >{
> >final ArrayList orderedPath = new
> > ArrayList();
> >orderedPath.add( withName( "REL1" ) );
> >orderedPath.add( withName( "REL2" ) );
> >orderedPath.add( withName( "REL3" ) );
> >orderedPath.add( withName( "REL4" ) );
> >
> >TraversalDescription td = Traversal.description().evaluator(
> >new Evaluator()
> >{
> >
> >public Evaluation evaluate( Path path )
> >{
> >if ( path.length() == 0 )
> >{
> >return Evaluation.EXCLUDE_AND_CONTINUE;
> >}
> >String  currentName=
> > path.lastRelationship().getType().name();
> >String relationshipType = orderedPath.get(
> > path.length() - 1 ).name();
> >if ( path.length() == orderedPath.size() )
> >{
> >if ( currentName.equals(
> >relationshipType ) )
> >{
> >return Evaluation.INCLUDE_AND_PRUNE;
> >}
> >else
> >{
> >return Evaluation.EXCLUDE_AND_PRUNE;
> >}
> >}
> >else
> >{
> >if ( currentName.equals(
> >relationshipType ) )
> >{
> >return Evaluation.EXCLUDE_AND_CONTINUE;
> >}
> >else
> >{
> >return Evaluation.EXCLUDE_AND_PRUNE;
> >}
> >}
> >}
> >} );
> >Traverser t = td.traverse( getNodeWithName( "A" ) );
> >for ( Path path : t )
> >{
> >System.out.println(path);
> >}
> >
> >}
> >
> > I am attaching the classes for 

Re: [Neo4j] Does BatchInserter auto-commit before shutting down?

2011-02-14 Thread Pablo Pareja
Yeah, that's what I thought, I just wanted to confirm it.
Thanks

Pablo

On Mon, Feb 14, 2011 at 4:57 PM, Tobias Ivarsson <
tobias.ivars...@neotechnology.com> wrote:

> BatchInserter.shutdown() is synchronous, it has to be, otherwise it
> wouldn't
> be safe at all.
> After shutdown() has returned it guarantees that all store files have been
> written, and are in a consistent state.
>
> -t
>
> On Mon, Feb 14, 2011 at 4:01 PM, Pablo Pareja  wrote:
>
> > Great, thanks for the information.
> > Just out of curiosity then, are calls to BatchInserter.shutdown() sync or
> > asynchronous ?
> > I mean, does the program flow stops in that call till every operation the
> > shutdown implies has been
> > performed?
> > Cheers,
> >
> > Pablo
> >
> > On Mon, Feb 14, 2011 at 3:30 PM, Tobias Ivarsson <
> > tobias.ivars...@neotechnology.com> wrote:
> >
> > > The batch inserter will write data to disk as needed. The memory mapped
> > > regions are used to speed up writes, so that the API level writes can
> be
> > > done to the memory mapped regions which can then be written in large
> > > sequential chunks to disk.
> > >
> > > You do not have to shut down the batch inserter for this to happen, it
> is
> > > taken care of automatically.
> > >
> > > Cheers,
> > > Tobias
> > >
> > > On Mon, Feb 14, 2011 at 10:53 AM, Pablo Pareja 
> wrote:
> > >
> > > > Hi,
> > > >
> > > > I was wondering whether once the memory-mapping configuration for
> > > > BatchInserter is full *(for example*
> > > > *in the case of  neostore.relationshipstore.db.mapped_memory) *the
> > class
> > > > would auto-commit these changes
> > > > to disk or it would just throw an exception.
> > > > In the latter case, what would the options be?
> > > >
> > > > In my case I have to insert a huge amount of data that cannot be
> > > allocated
> > > > in RAM.
> > > > First I thought the BatchInserter would deal with this kind of
> > situation,
> > > > however I keep getting exceptions whenever the
> > > > program reaches the point where *(I guess) *memory mapping
> > configuration
> > > is
> > > > not enough.
> > > >
> > > > Since I cannot use more RAM than what I have, I thought, ok so I will
> > > > shutdown both inserter and index service and
> > > > create them again each time the program have already inserted a
> decent
> > > > amount of data.
> > > > Then, don't know why but after a couple of tests, at some point the
> > > program
> > > > always halts throwing a really weird exception
> > > > saying something about a index file that exists but cannot be
> accessed
> > in
> > > > the merge process ?!?
> > > >
> > > > I guess I'd be doing something wrong but cannot figure out what it
> is.
> > > > Thanks in advance
> > > >
> > > > --
> > > > Pablo Pareja Tobes
> > > > LinkedInhttp://www.linkedin.com/in/pabloparejatobes
> > > > Twitter   http://www.twitter.com/pablopareja
> > > >
> > > > http://www.ohnosequences.com
> > > > ___
> > > > Neo4j mailing list
> > > > User@lists.neo4j.org
> > > > https://lists.neo4j.org/mailman/listinfo/user
> > > >
> > >
> > >
> > >
> > > --
> > > Tobias Ivarsson 
> > > Hacker, Neo Technology
> > > www.neotechnology.com
> > > Cellphone: +46 706 534857
> > > ___
> > > Neo4j mailing list
> > > User@lists.neo4j.org
> > > https://lists.neo4j.org/mailman/listinfo/user
> > >
> >
> >
> >
> > --
> > Pablo Pareja Tobes
> > LinkedInhttp://www.linkedin.com/in/pabloparejatobes
> > Twitter   http://www.twitter.com/pablopareja
> >
> > http://www.ohnosequences.com
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
>
>
>
> --
> Tobias Ivarsson 
> Hacker, Neo Technology
> www.neotechnology.com
> Cellphone: +46 706 534857
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Pablo Pareja Tobes
LinkedInhttp://www.linkedin.com/in/pabloparejatobes
Twitter   http://www.twitter.com/pablopareja

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


Re: [Neo4j] POJO best practice?

2011-02-14 Thread David Montag
Hi Massimo,

You can also check out our integration with Spring Data:
http://www.springsource.org/spring-data  If you scroll down you can find
links to the docs and the github repo.

This approach uses a simple POJO model with annotations, like JPA. It
minimizes boilerplate code, and gives you a lot of stuff for free. There is
also rudimentary cross-store support, for building applications that span
across both a JPA datasource and Neo4j. Please let us know if you have any
questions.

David

On Mon, Feb 14, 2011 at 6:56 AM, Massimo Lusetti  wrote:

> Hi all,
>  In almost all applications/examples/doc/wiki I've seen on neo4j.org
> the domain is based on POJO and this is somewhat usual but here I see
> you suggesting doing interface for POJO.
>
> Having an Actor interface implemented by an ActorImpl classes which is
> a POJO plus a reference to the "underlying node".
>
> First why having an interface declaring a POJO just for
> getters/setters method, isn't this boilerplate code?
> Second since you do that, why not exposing the "underlying node" as a
> getter so you can just use Actor and never had to cast it to
> ActorImpl?
>
> Am I missing something?
>
> Cheers
> --
> Massimo
> http://meridio.blogspot.com
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
David Montag
Neo Technology, www.neotechnology.com
Cell: 650.556.4411
david.mon...@neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Does BatchInserter auto-commit before shutting down?

2011-02-14 Thread Tobias Ivarsson
BatchInserter.shutdown() is synchronous, it has to be, otherwise it wouldn't
be safe at all.
After shutdown() has returned it guarantees that all store files have been
written, and are in a consistent state.

-t

On Mon, Feb 14, 2011 at 4:01 PM, Pablo Pareja  wrote:

> Great, thanks for the information.
> Just out of curiosity then, are calls to BatchInserter.shutdown() sync or
> asynchronous ?
> I mean, does the program flow stops in that call till every operation the
> shutdown implies has been
> performed?
> Cheers,
>
> Pablo
>
> On Mon, Feb 14, 2011 at 3:30 PM, Tobias Ivarsson <
> tobias.ivars...@neotechnology.com> wrote:
>
> > The batch inserter will write data to disk as needed. The memory mapped
> > regions are used to speed up writes, so that the API level writes can be
> > done to the memory mapped regions which can then be written in large
> > sequential chunks to disk.
> >
> > You do not have to shut down the batch inserter for this to happen, it is
> > taken care of automatically.
> >
> > Cheers,
> > Tobias
> >
> > On Mon, Feb 14, 2011 at 10:53 AM, Pablo Pareja  wrote:
> >
> > > Hi,
> > >
> > > I was wondering whether once the memory-mapping configuration for
> > > BatchInserter is full *(for example*
> > > *in the case of  neostore.relationshipstore.db.mapped_memory) *the
> class
> > > would auto-commit these changes
> > > to disk or it would just throw an exception.
> > > In the latter case, what would the options be?
> > >
> > > In my case I have to insert a huge amount of data that cannot be
> > allocated
> > > in RAM.
> > > First I thought the BatchInserter would deal with this kind of
> situation,
> > > however I keep getting exceptions whenever the
> > > program reaches the point where *(I guess) *memory mapping
> configuration
> > is
> > > not enough.
> > >
> > > Since I cannot use more RAM than what I have, I thought, ok so I will
> > > shutdown both inserter and index service and
> > > create them again each time the program have already inserted a decent
> > > amount of data.
> > > Then, don't know why but after a couple of tests, at some point the
> > program
> > > always halts throwing a really weird exception
> > > saying something about a index file that exists but cannot be accessed
> in
> > > the merge process ?!?
> > >
> > > I guess I'd be doing something wrong but cannot figure out what it is.
> > > Thanks in advance
> > >
> > > --
> > > Pablo Pareja Tobes
> > > LinkedInhttp://www.linkedin.com/in/pabloparejatobes
> > > Twitter   http://www.twitter.com/pablopareja
> > >
> > > http://www.ohnosequences.com
> > > ___
> > > Neo4j mailing list
> > > User@lists.neo4j.org
> > > https://lists.neo4j.org/mailman/listinfo/user
> > >
> >
> >
> >
> > --
> > Tobias Ivarsson 
> > Hacker, Neo Technology
> > www.neotechnology.com
> > Cellphone: +46 706 534857
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
>
>
>
> --
> Pablo Pareja Tobes
> LinkedInhttp://www.linkedin.com/in/pabloparejatobes
> Twitter   http://www.twitter.com/pablopareja
>
> http://www.ohnosequences.com
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Tobias Ivarsson 
Hacker, Neo Technology
www.neotechnology.com
Cellphone: +46 706 534857
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] about relationship

2011-02-14 Thread Craig Taverner
I thought he was asking 'if I have the two nodes, how do I get the edge?'.
In that case iterate over all relationships from the one node using
nodeA.getRelationships()
and
test the end node to see if it is nodeB.

On Mon, Feb 14, 2011 at 10:18 AM, Mattias Persson  wrote:

> You mean in the most efficient way? Currently you'll have to go with a
> relationship index if you have many edges and would like to do a fast
> lookup
> for a relationship between two nodes. You can index relationships just as
> you do nodes:
>
>  RelationshipIndex index = graphDb.index().forRelationships(
> "my-relationships" );
>  index.add( myRelationship, "myKey", "myValue" );
>  ...
>  // Either if you query for a specific property:
>  index.get( "myKey", "myValue", startNode, endNode );
>  // Or if you just query using the nodes
>  index.get( null, null, startNode, endNode );
>
> The other way is to loop relationships from one node and see if the
> otherNode of those relationships matches. Might be slower though
>
> Best,
> Mattias
>
> 2011/2/10 Jose Angel Inda Herrera 
>
> >
> > hello list,
> > How to get an edge in the graph (in this case a relationship) having the
> > two nodes of this relationship,
> >
> > thank beforhand
> > ___
> > 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
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] POJO best practice?

2011-02-14 Thread Rick Bullotta
FYI, we don't follow that pattern on our application.  In our domain model,
we use a base class that includes the node getter/setter and some other
common properties/services, and all domain objects extend that class.
Separately, we have a persistence layer that manages persistence of
POJO/domain objects into and out of Neo (as well as into and out of XML and
JSON).  We have also chosen to implement the persistence layer in a
multi-pass design, due to the dependencies that can occur when multiple
objects need to be persisted, but there are relationships between them (and
therefore they all must have been initially persisted prior to defining
relationships between them).   A similar process occurs when a domain object
is deleted (de-persisted) - a two-pass process of deleting relationships and
then the node itself.

We have found that there are many challenges in assuming "atomic
persistence" (e.g. a single call can persist an object) in an environment
where relationships exist between entities, and have had to do quite a bit
of work to ensure that everything gets saved in the correct order when
multiple domain objects are created/updated.

Rick



-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On
Behalf Of Massimo Lusetti
Sent: Monday, February 14, 2011 9:56 AM
To: Neo4j user discussions
Subject: [Neo4j] POJO best practice?

Hi all,
  In almost all applications/examples/doc/wiki I've seen on neo4j.org
the domain is based on POJO and this is somewhat usual but here I see
you suggesting doing interface for POJO.

Having an Actor interface implemented by an ActorImpl classes which is
a POJO plus a reference to the "underlying node".

First why having an interface declaring a POJO just for
getters/setters method, isn't this boilerplate code?
Second since you do that, why not exposing the "underlying node" as a
getter so you can just use Actor and never had to cast it to
ActorImpl?

Am I missing something?

Cheers
-- 
Massimo
http://meridio.blogspot.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] Does BatchInserter auto-commit before shutting down?

2011-02-14 Thread Pablo Pareja
Great, thanks for the information.
Just out of curiosity then, are calls to BatchInserter.shutdown() sync or
asynchronous ?
I mean, does the program flow stops in that call till every operation the
shutdown implies has been
performed?
Cheers,

Pablo

On Mon, Feb 14, 2011 at 3:30 PM, Tobias Ivarsson <
tobias.ivars...@neotechnology.com> wrote:

> The batch inserter will write data to disk as needed. The memory mapped
> regions are used to speed up writes, so that the API level writes can be
> done to the memory mapped regions which can then be written in large
> sequential chunks to disk.
>
> You do not have to shut down the batch inserter for this to happen, it is
> taken care of automatically.
>
> Cheers,
> Tobias
>
> On Mon, Feb 14, 2011 at 10:53 AM, Pablo Pareja  wrote:
>
> > Hi,
> >
> > I was wondering whether once the memory-mapping configuration for
> > BatchInserter is full *(for example*
> > *in the case of  neostore.relationshipstore.db.mapped_memory) *the class
> > would auto-commit these changes
> > to disk or it would just throw an exception.
> > In the latter case, what would the options be?
> >
> > In my case I have to insert a huge amount of data that cannot be
> allocated
> > in RAM.
> > First I thought the BatchInserter would deal with this kind of situation,
> > however I keep getting exceptions whenever the
> > program reaches the point where *(I guess) *memory mapping configuration
> is
> > not enough.
> >
> > Since I cannot use more RAM than what I have, I thought, ok so I will
> > shutdown both inserter and index service and
> > create them again each time the program have already inserted a decent
> > amount of data.
> > Then, don't know why but after a couple of tests, at some point the
> program
> > always halts throwing a really weird exception
> > saying something about a index file that exists but cannot be accessed in
> > the merge process ?!?
> >
> > I guess I'd be doing something wrong but cannot figure out what it is.
> > Thanks in advance
> >
> > --
> > Pablo Pareja Tobes
> > LinkedInhttp://www.linkedin.com/in/pabloparejatobes
> > Twitter   http://www.twitter.com/pablopareja
> >
> > http://www.ohnosequences.com
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
>
>
>
> --
> Tobias Ivarsson 
> Hacker, Neo Technology
> www.neotechnology.com
> Cellphone: +46 706 534857
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Pablo Pareja Tobes
LinkedInhttp://www.linkedin.com/in/pabloparejatobes
Twitter   http://www.twitter.com/pablopareja

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


[Neo4j] POJO best practice?

2011-02-14 Thread Massimo Lusetti
Hi all,
  In almost all applications/examples/doc/wiki I've seen on neo4j.org
the domain is based on POJO and this is somewhat usual but here I see
you suggesting doing interface for POJO.

Having an Actor interface implemented by an ActorImpl classes which is
a POJO plus a reference to the "underlying node".

First why having an interface declaring a POJO just for
getters/setters method, isn't this boilerplate code?
Second since you do that, why not exposing the "underlying node" as a
getter so you can just use Actor and never had to cast it to
ActorImpl?

Am I missing something?

Cheers
-- 
Massimo
http://meridio.blogspot.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Does BatchInserter auto-commit before shutting down?

2011-02-14 Thread Tobias Ivarsson
The batch inserter will write data to disk as needed. The memory mapped
regions are used to speed up writes, so that the API level writes can be
done to the memory mapped regions which can then be written in large
sequential chunks to disk.

You do not have to shut down the batch inserter for this to happen, it is
taken care of automatically.

Cheers,
Tobias

On Mon, Feb 14, 2011 at 10:53 AM, Pablo Pareja  wrote:

> Hi,
>
> I was wondering whether once the memory-mapping configuration for
> BatchInserter is full *(for example*
> *in the case of  neostore.relationshipstore.db.mapped_memory) *the class
> would auto-commit these changes
> to disk or it would just throw an exception.
> In the latter case, what would the options be?
>
> In my case I have to insert a huge amount of data that cannot be allocated
> in RAM.
> First I thought the BatchInserter would deal with this kind of situation,
> however I keep getting exceptions whenever the
> program reaches the point where *(I guess) *memory mapping configuration is
> not enough.
>
> Since I cannot use more RAM than what I have, I thought, ok so I will
> shutdown both inserter and index service and
> create them again each time the program have already inserted a decent
> amount of data.
> Then, don't know why but after a couple of tests, at some point the program
> always halts throwing a really weird exception
> saying something about a index file that exists but cannot be accessed in
> the merge process ?!?
>
> I guess I'd be doing something wrong but cannot figure out what it is.
> Thanks in advance
>
> --
> Pablo Pareja Tobes
> LinkedInhttp://www.linkedin.com/in/pabloparejatobes
> Twitter   http://www.twitter.com/pablopareja
>
> http://www.ohnosequences.com
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Tobias Ivarsson 
Hacker, Neo Technology
www.neotechnology.com
Cellphone: +46 706 534857
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Graph pattern matching component

2011-02-14 Thread Andreas Kollegger
Hey Saikat,

The component site has some example code: 
http://components.neo4j.org/neo4j-graph-matching/

Is there something specific you have in mind?

-Andreas

On Feb 11, 2011, at 6:48 PM, Saikat Kanjilal wrote:

> 
> Hi Everyone,I am reading up on email threads and documentation pertaining to 
> the pattern matching component and am considering using it to advance the 
> next set of features for the code.  I was wondering if someone has some 
> examples that they can put on github or document on the wiki for this 
> component.  I am trying to perform some complex pattern matching operations 
> and it would help a  lot to see the different API's in use.
> Best Regards
> ___
> 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] Unmanged extensions

2011-02-14 Thread Piotr Pejas
Hi,
I am trying to deploy unmanged extensions into neo4j server with a little 
result.
I've followed this tutorial: 
http://components.neo4j.org/neo4j-examples/snapshot/server-rest-api.html

snippet from my wrapper.log:

INFO: Scanning for root resource and provider classes in the packages:
  com.example.graph
INFO: Root resource classes found:
  class com.example.graph.Update
  class com.example.graph.HelloWorldResource

and in my neo4j-server.properties I have added this line:
org.neo4j.server.thirdparty_jaxrs_classes=com.example.graph=/example

and a outcome is 404, for both resources HelloWorldResource and Update

As in example I am using server in version: Version: 1.3-SNAPSHOT
and I compile my code against neo4j-server 0.6-SNAPSHOT, jar placed in plugins 
no additional dependencies.

Thank you in advance for any help. 

Best Regards
Piotr Pejas

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


Re: [Neo4j] Traversal Question

2011-02-14 Thread Craig Taverner
Sounds to me like the pruning is done based on the existence of property
'abc' at depth 3, and returning only nodes deeper than depth 3.

On Mon, Feb 14, 2011 at 11:22 AM, Peter Neubauer <
peter.neuba...@neotechnology.com> wrote:

> John,
> In your example, are there any constraints on that of the four
> relationship types, every one need to be exactly one time in the path,
> or is it just any of these?
>
> Instead of using a List like in the previous example, you can the use
> a Map to tick the visited relationship types and check the property
> when you get to REL3? I can do it for you in neo4j-examples again if
> you give me some more details :)
>
> 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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
>
> On Sun, Feb 13, 2011 at 10:16 AM, John Howard 
> wrote:
> > Thanks Peter. That was very useful.
> >
> > I am trying to get the path A ->B->C->D-> E in the below graph, with the
> > following inputs
> > Start Node: A,
> > Relationships: REL1, REL4, REL2 (that is, order is not known)
> > Relationship Property: relProp= "abc" in REL3
> >
> > I was not able to define an evaluator which takes the combination of
> > relationship types(without regard to order) and relationship properties
> to
> > return the desired path.
> > Can it be achievable in the current traversal framework?
> >
> >  REL1  REL2REL8
> >  A -> X -> Y ---> Z
> >
> >   REL1REL2 REL3REL4
> >  A -> B -> C ---> D -> E
> >
> >   REL1REL3 REL9   REL10
> >  A -> P -> Q ---> R -> E
> >
> >
> > As always, appreciate your guidance.
> >
> >
> >
> > ===
> > John,
> > if the order of the relationships doesn't matter, you could do
> > something like this with the Traversal API (holding an ordered Path to
> > test against in your Evaluator):
> >
> >public void testPath()
> >{
> >final ArrayList orderedPath = new
> > ArrayList();
> >orderedPath.add( withName( "REL1" ) );
> >orderedPath.add( withName( "REL2" ) );
> >orderedPath.add( withName( "REL3" ) );
> >orderedPath.add( withName( "REL4" ) );
> >
> >TraversalDescription td = Traversal.description().evaluator(
> >new Evaluator()
> >{
> >
> >public Evaluation evaluate( Path path )
> >{
> >if ( path.length() == 0 )
> >{
> >return Evaluation.EXCLUDE_AND_CONTINUE;
> >}
> >String  currentName=
> > path.lastRelationship().getType().name();
> >String relationshipType = orderedPath.get(
> > path.length() - 1 ).name();
> >if ( path.length() == orderedPath.size() )
> >{
> >if ( currentName.equals(
> >relationshipType ) )
> >{
> >return Evaluation.INCLUDE_AND_PRUNE;
> >}
> >else
> >{
> >return Evaluation.EXCLUDE_AND_PRUNE;
> >}
> >}
> >else
> >{
> >if ( currentName.equals(
> >relationshipType ) )
> >{
> >return Evaluation.EXCLUDE_AND_CONTINUE;
> >}
> >else
> >{
> >return Evaluation.EXCLUDE_AND_PRUNE;
> >}
> >}
> >}
> >} );
> >Traverser t = td.traverse( getNodeWithName( "A" ) );
> >for ( Path path : t )
> >{
> >System.out.println(path);
> >}
> >
> >}
> >
> > I am attaching the classes for your reference, so you have full code.
> >
> > Also, you could try JRuby, Gremlin or other along the same lines. But
> > this is a basic Java example in creating an ordered Path information
> > and checking against it during the traversal. You can add in more
> > stuff of course ...
> >
> > Cheers,
> >
> > /peter neubauer
> >
> > GTalk:  neubauer.peter
> > Skype   peter.neubauer
> > Phone   +46 704 106975
> > LinkedIn   http://www.linkedin.com/in/neubauer
> > Twitter  http://t

Re: [Neo4j] Traversal Question

2011-02-14 Thread Peter Neubauer
John,
In your example, are there any constraints on that of the four
relationship types, every one need to be exactly one time in the path,
or is it just any of these?

Instead of using a List like in the previous example, you can the use
a Map to tick the visited relationship types and check the property
when you get to REL3? I can do it for you in neo4j-examples again if
you give me some more details :)

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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Sun, Feb 13, 2011 at 10:16 AM, John Howard  wrote:
> Thanks Peter. That was very useful.
>
> I am trying to get the path A ->B->C->D-> E in the below graph, with the
> following inputs
> Start Node: A,
> Relationships: REL1, REL4, REL2 (that is, order is not known)
> Relationship Property: relProp= "abc" in REL3
>
> I was not able to define an evaluator which takes the combination of
> relationship types(without regard to order) and relationship properties to
> return the desired path.
> Can it be achievable in the current traversal framework?
>
>      REL1          REL2        REL8
>  A -> X -> Y ---> Z
>
>       REL1        REL2         REL3        REL4
>  A -> B -> C ---> D -> E
>
>       REL1        REL3         REL9       REL10
>  A -> P -> Q ---> R -> E
>
>
> As always, appreciate your guidance.
>
>
>
> ===
> John,
> if the order of the relationships doesn't matter, you could do
> something like this with the Traversal API (holding an ordered Path to
> test against in your Evaluator):
>
>    public void testPath()
>    {
>        final ArrayList orderedPath = new
> ArrayList();
>        orderedPath.add( withName( "REL1" ) );
>        orderedPath.add( withName( "REL2" ) );
>        orderedPath.add( withName( "REL3" ) );
>        orderedPath.add( withName( "REL4" ) );
>
>        TraversalDescription td = Traversal.description().evaluator(
>                new Evaluator()
>                {
>
>                    public Evaluation evaluate( Path path )
>                    {
>                        if ( path.length() == 0 )
>                        {
>                            return Evaluation.EXCLUDE_AND_CONTINUE;
>                        }
>                        String  currentName=
> path.lastRelationship().getType().name();
>                        String relationshipType = orderedPath.get(
> path.length() - 1 ).name();
>                        if ( path.length() == orderedPath.size() )
>                        {
>                            if ( currentName.equals(
>                                    relationshipType ) )
>                            {
>                                return Evaluation.INCLUDE_AND_PRUNE;
>                            }
>                            else
>                            {
>                                return Evaluation.EXCLUDE_AND_PRUNE;
>                            }
>                        }
>                        else
>                        {
>                            if ( currentName.equals(
>                                    relationshipType ) )
>                            {
>                                return Evaluation.EXCLUDE_AND_CONTINUE;
>                            }
>                            else
>                            {
>                                return Evaluation.EXCLUDE_AND_PRUNE;
>                            }
>                        }
>                    }
>                } );
>        Traverser t = td.traverse( getNodeWithName( "A" ) );
>        for ( Path path : t )
>        {
>            System.out.println(path);
>        }
>
>    }
>
> I am attaching the classes for your reference, so you have full code.
>
> Also, you could try JRuby, Gremlin or other along the same lines. But
> this is a basic Java example in creating an ordered Path information
> and checking against it during the traversal. You can add in more
> stuff of course ...
>
> 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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
>
> On Tue, Jan 25, 2011 at 10:59 PM, John Howard 
> wrote:
>> Hello,
>>
>> We are trying to use neo4j graph database in one of our applications.
>> I think we hit a roadblock with traversal framework. It could be due to
> our
>> limited knowledge of neo4j framework.
>>
>> Here is what we are trying to accom

[Neo4j] Does BatchInserter auto-commit before shutting down?

2011-02-14 Thread Pablo Pareja
Hi,

I was wondering whether once the memory-mapping configuration for
BatchInserter is full *(for example*
*in the case of  neostore.relationshipstore.db.mapped_memory) *the class
would auto-commit these changes
to disk or it would just throw an exception.
In the latter case, what would the options be?

In my case I have to insert a huge amount of data that cannot be allocated
in RAM.
First I thought the BatchInserter would deal with this kind of situation,
however I keep getting exceptions whenever the
program reaches the point where *(I guess) *memory mapping configuration is
not enough.

Since I cannot use more RAM than what I have, I thought, ok so I will
shutdown both inserter and index service and
create them again each time the program have already inserted a decent
amount of data.
Then, don't know why but after a couple of tests, at some point the program
always halts throwing a really weird exception
saying something about a index file that exists but cannot be accessed in
the merge process ?!?

I guess I'd be doing something wrong but cannot figure out what it is.
Thanks in advance

-- 
Pablo Pareja Tobes
LinkedInhttp://www.linkedin.com/in/pabloparejatobes
Twitter   http://www.twitter.com/pablopareja

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


Re: [Neo4j] Help with exception using BatchInserter

2011-02-14 Thread Pablo Pareja
Ups... I thought memory mapping was using the Java heap space.
Thanks

Pablo

On Mon, Feb 14, 2011 at 10:06 AM, Tobias Ivarsson <
tobias.ivars...@neotechnology.com> wrote:

> Your problem is likely related to the fact that 10G+10G+10G+10G + 63G >
> 64G.
>
> Memory mapping uses memory outside of the Java heap. All memory you use,
> memory mapping plus Java heap must fit in the available RAM.
>
> Cheers,
> Tobias
>
> On Thu, Feb 10, 2011 at 10:42 PM, Pablo Pareja  wrote:
>
> > Hi all,
> > I keep getting this exception and don't know what the reason could be:
> >
> > Unable to write record[244986398] @[32583190934]
> >
> >
> org.neo4j.kernel.impl.nioneo.store.AbstractPersistenceWindow.writeOut(AbstractPersistenceWindow.java:112)
> >
> >
> org.neo4j.kernel.impl.nioneo.store.AbstractPersistenceWindow.force(AbstractPersistenceWindow.java:124)
> >
> >
> org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.flushAll(PersistenceWindowPool.java:251)
> >
> >
> org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.close(PersistenceWindowPool.java:224)
> >
> >
> org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:614)
> >
> >
> org.neo4j.kernel.impl.nioneo.store.PropertyStore.closeStorage(PropertyStore.java:101)
> >
> >
> org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:611)
> >
> org.neo4j.kernel.impl.nioneo.store.NeoStore.closeStorage(NeoStore.java:115)
> >
> >
> org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:611)
> >
> >
> org.neo4j.kernel.impl.batchinsert.BatchInserterImpl.shutdown(BatchInserterImpl.java:351)
> >
> > I'm using a 65G RAM machine and the java process is launched with -Xmx63G
> > the conf values I pass to the batch inserter are the following:
> >
> > neostore.nodestore.db.mapped_memory=10G
> > neostore.relationshipstore.db.mapped_memory=10G
> > neostore.propertystore.db.mapped_memory=10G
> > neostore.propertystore.db.strings.mapped_memory=10G
> > neostore.propertystore.db.arrays.mapped_memory=0M
> >
> > Besides, there were still 50G free space in the disk when this exception
> > was
> > thrown
> >
> > I'd really appreciate any help,
> > Cheers
> >
> > --
> > Pablo Pareja Tobes
> > LinkedInhttp://www.linkedin.com/in/pabloparejatobes
> > Twitter   http://www.twitter.com/pablopareja
> >
> > http://www.ohnosequences.com
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
>
>
>
> --
> Tobias Ivarsson 
> Hacker, Neo Technology
> www.neotechnology.com
> Cellphone: +46 706 534857
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Pablo Pareja Tobes
LinkedInhttp://www.linkedin.com/in/pabloparejatobes
Twitter   http://www.twitter.com/pablopareja

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


Re: [Neo4j] about relationship

2011-02-14 Thread Mattias Persson
You mean in the most efficient way? Currently you'll have to go with a
relationship index if you have many edges and would like to do a fast lookup
for a relationship between two nodes. You can index relationships just as
you do nodes:

  RelationshipIndex index = graphDb.index().forRelationships(
"my-relationships" );
  index.add( myRelationship, "myKey", "myValue" );
  ...
  // Either if you query for a specific property:
  index.get( "myKey", "myValue", startNode, endNode );
  // Or if you just query using the nodes
  index.get( null, null, startNode, endNode );

The other way is to loop relationships from one node and see if the
otherNode of those relationships matches. Might be slower though

Best,
Mattias

2011/2/10 Jose Angel Inda Herrera 

>
> hello list,
> How to get an edge in the graph (in this case a relationship) having the
> two nodes of this relationship,
>
> thank beforhand
> ___
> 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] Onlineback up Error on 1.3M02

2011-02-14 Thread Mattias Persson
The Neo4j server is registered at port 7474, but the backup server isn't...
you usually don't need to specify port so that the default can be used. What
you'll have to do is:

* Add "enable_online_backup = true" to your neo4j configuration file and
restart the server (if that wasn't the case).
* Use OnlineBackup.from( "localhost" );

and it should work (just tried it).

2011/2/14 Brendan Cheng 

> Hi,
>
> I was trying to test the online backup process.  I received a
> ComException saying "Channel has been closed".
>
> Here is my code which is copied from your Testbackup with a small
> modification:
>
>   private String serverPath = "localhost";
>   private String backupPath = "target/var/backuedup-serverdb";
>
>   public void fullThenIncremental() throws Exception
>   {
>   ServerInterface server = startServer();
>   OnlineBackup backup = OnlineBackup.from( "localhost",7474 );
>   backup.full( backupPath );
>   shutdownServer( server );
>
>   DbRepresentation furtherRepresentation = addMoreData();
>   server = startServer();
>   backup.incremental( backupPath );
>   assertEquals( furtherRepresentation, DbRepresentation.of(
> backupPath ) );
>   shutdownServer( server );
>   }
>
> and the error message is:
>
> run:
> Mon Feb 14 13:37:54 CST 2011: Client connected to localhost:7474
> Mon Feb 14 13:37:54 CST 2011: Opened a new channel to localhost/
> 127.0.0.1:7474
> 2011/2/14 01:37:54 itags.Sync.SyncData main
> : null
> org.neo4j.com.ComException: org.neo4j.com.ComException: Channel has been
> closed
>   at org.neo4j.com.Client.sendRequest(Client.java:183)
>   at org.neo4j.com.backup.BackupClient.fullBackup(BackupClient.java:42)
>   at org.neo4j.com.backup.OnlineBackup.full(OnlineBackup.java:67)
>   at itags.Sync.SyncData.fullThenIncremental(SyncData.java:45)
>   at itags.Sync.SyncData.main(SyncData.java:232)
> Caused by: org.neo4j.com.ComException: Channel has been closed
>   at org.neo4j.com.Client$2.readNext(Client.java:159)
>   at
> org.neo4j.com.DechunkingChannelBuffer.readNextChunk(DechunkingChannelBuffer.java:79)
>   at
> org.neo4j.com.DechunkingChannelBuffer.(DechunkingChannelBuffer.java:50)
>   at org.neo4j.com.Client$2.(Client.java:151)
>   at org.neo4j.com.Client.sendRequest(Client.java:150)
>   ... 4 more
>
> I have my db server started as window service.
>
> Also, I want to know if we need the process "startServer()" if the db
> server has been started.
>
> Regards,
>
> Brendan
> ___
> 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] Does the index commit with the transaction?

2011-02-14 Thread Tobias Ivarsson
That is correct. The lucene indexes in Neo4j are tied to the same
transaction life cycle.

On Sun, Feb 13, 2011 at 6:18 PM, Massimo Lusetti  wrote:

> Hi all,
>  Does the inner Lucene index commit toghether with the Transaction
> success()/finish() cycle?
>
> I mean if I start a Transaction and do like
> http://wiki.neo4j.org/content/Transactions#Big_transactions I suppose
> I'm guarantee the Lucene index is synched to disk as soon as the
> Transaction finish(), right?
>
> Cheers
> --
> Massimo
> http://meridio.blogspot.com
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Tobias Ivarsson 
Hacker, Neo Technology
www.neotechnology.com
Cellphone: +46 706 534857
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Does the index commit with the transaction?

2011-02-14 Thread Chris Gioran
On 02/13/2011 07:18 PM, Massimo Lusetti wrote:
> Hi all,
>Does the inner Lucene index commit toghether with the Transaction
> success()/finish() cycle?
>
> I mean if I start a Transaction and do like
> http://wiki.neo4j.org/content/Transactions#Big_transactions I suppose
> I'm guarantee the Lucene index is synched to disk as soon as the
> Transaction finish(), right?

Hi Massimo,

your understanding is correct. The lucene index is exposed as a 
XAResource that participates in the global transaction that is started 
with graphDb.beginTx() and committed on successful tx.finish(). The 
commit (or rollback) happens through a 2PC which ensures that it is 
treated as an atomic operation.

The info on Big Transactions is essentially just a workaround for 
avoiding running out of memory, so the principle as I outlined it above 
still holds.

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


Re: [Neo4j] Help with exception using BatchInserter

2011-02-14 Thread Tobias Ivarsson
Your problem is likely related to the fact that 10G+10G+10G+10G + 63G > 64G.

Memory mapping uses memory outside of the Java heap. All memory you use,
memory mapping plus Java heap must fit in the available RAM.

Cheers,
Tobias

On Thu, Feb 10, 2011 at 10:42 PM, Pablo Pareja  wrote:

> Hi all,
> I keep getting this exception and don't know what the reason could be:
>
> Unable to write record[244986398] @[32583190934]
>
> org.neo4j.kernel.impl.nioneo.store.AbstractPersistenceWindow.writeOut(AbstractPersistenceWindow.java:112)
>
> org.neo4j.kernel.impl.nioneo.store.AbstractPersistenceWindow.force(AbstractPersistenceWindow.java:124)
>
> org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.flushAll(PersistenceWindowPool.java:251)
>
> org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.close(PersistenceWindowPool.java:224)
>
> org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:614)
>
> org.neo4j.kernel.impl.nioneo.store.PropertyStore.closeStorage(PropertyStore.java:101)
>
> org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:611)
> org.neo4j.kernel.impl.nioneo.store.NeoStore.closeStorage(NeoStore.java:115)
>
> org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:611)
>
> org.neo4j.kernel.impl.batchinsert.BatchInserterImpl.shutdown(BatchInserterImpl.java:351)
>
> I'm using a 65G RAM machine and the java process is launched with -Xmx63G
> the conf values I pass to the batch inserter are the following:
>
> neostore.nodestore.db.mapped_memory=10G
> neostore.relationshipstore.db.mapped_memory=10G
> neostore.propertystore.db.mapped_memory=10G
> neostore.propertystore.db.strings.mapped_memory=10G
> neostore.propertystore.db.arrays.mapped_memory=0M
>
> Besides, there were still 50G free space in the disk when this exception
> was
> thrown
>
> I'd really appreciate any help,
> Cheers
>
> --
> Pablo Pareja Tobes
> LinkedInhttp://www.linkedin.com/in/pabloparejatobes
> Twitter   http://www.twitter.com/pablopareja
>
> http://www.ohnosequences.com
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Tobias Ivarsson 
Hacker, Neo Technology
www.neotechnology.com
Cellphone: +46 706 534857
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Traversing by Relationship property

2011-02-14 Thread Mattias Persson
2011/2/14 Michael Hunger 

> it is a js syntax error
>
> you have to escape the quotes
>
> like \'to\'
>

I just tried that... \" works better, instead of \'  like this:

curl -X POST -H Accept:application/json -H Content-Type:application/json -d
'{  "order" : "depth first",  "uniqueness" : "node", "return filter" :
{"language" : "javascript", "body" : "position.length() > 0 &&
position.lastRelationship().getProperty(\"to\",0) == 1" }, "max depth" : 1
}' http://localhost:7474/db/data/node/40/traverse/node


> Michael
>
> Sent from my iBrick4
>
>
> Am 10.02.2011 um 22:29 schrieb mike_t :
>
> >
> > Thanks Mattias and Michael for your answers!
> >
> > I tried it with the following request for relationship property "to".
> >
> > curl -X POST -H Accept:application/json -H Content-Type:application/json
> -d
> > '{  "order" : "depth first",  "uniqueness" : "node", "return filter" : {
> > "language" : "javascript", "body" : "position.length() > 0 &&
> > position.lastRelationship().getProperty('to',0) == 1" }, "max depth" : 1
> }'
> > http://localhost:7474/db/data/node/40/traverse/node
> >
> > All my relationships have the property "to" but i got  an exception that
> > "to"is not defined:
> >
> >
> > 
> > 
> > 
> > Error 500 javax.script.ScriptException:
> > sun.org.mozilla.javascript.EcmaError: ReferenceError: "to" is not
> defined.
> > (#1) in  at line number
> > 1
> > 
> > HTTP ERROR 500
> > Problem accessing /db/data/node/40/traverse/node. Reason:
> > javax.script.ScriptException:
> sun.org.mozilla.javascript.EcmaError:
> > ReferenceError: "to" is not defined. (#1) in
> >  at line number 1Caused
> > by:org.neo4j.server.rest.domain.EvaluationException:
> > javax.script.ScriptException: sun.org.mozilla.javascript.EcmaError:
> > ReferenceError: "to" is not defined. (#1) in
> >  at line number 1
> >at
> >
> org.neo4j.server.rest.domain.EvaluatorFactory$CompiledScriptExecutor.eval(EvaluatorFactory.java:184)
> >at
> >
> org.neo4j.server.rest.domain.EvaluatorFactory$ScriptedReturnEvaluator.accept(EvaluatorFactory.java:256)
> >at
> >
> org.neo4j.server.rest.domain.EvaluatorFactory$ScriptedReturnEvaluator.accept(EvaluatorFactory.java:246)
> >at
> >
> org.neo4j.kernel.impl.traversal.TraversalDescriptionImpl$WrappedFilter.evaluate(TraversalDescriptionImpl.java:255)
> >at
> >
> org.neo4j.kernel.impl.traversal.MultiEvaluator.evaluate(MultiEvaluator.java:42)
> >at
> >
> org.neo4j.kernel.impl.traversal.TraversalBranchImpl.initialize(TraversalBranchImpl.java:88)
> >at
> >
> org.neo4j.kernel.impl.traversal.TraversalBranchImpl.next(TraversalBranchImpl.java:107)
> >at
> >
> org.neo4j.kernel.impl.traversal.StartNodeTraversalBranch.next(StartNodeTraversalBranch.java:51)
> >at
> >
> org.neo4j.kernel.PreorderDepthFirstSelector.next(PreorderDepthFirstSelector.java:49)
> >at
> >
> org.neo4j.kernel.impl.traversal.TraverserImpl$TraverserIterator.fetchNextOrNull(TraverserImpl.java:128)
> >at
> >
> org.neo4j.kernel.impl.traversal.TraverserImpl$TraverserIterator.fetchNextOrNull(TraverserImpl.java:95)
> >at
> >
> org.neo4j.helpers.collection.PrefetchingIterator.hasNext(PrefetchingIterator.java:56)
> >at
> >
> org.neo4j.server.rest.web.DatabaseActions.traverse(DatabaseActions.java:744)
> >at
> >
> org.neo4j.server.rest.web.RestfulGraphDatabase.traverse(RestfulGraphDatabase.java:674)
> >at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
> >at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >at java.lang.reflect.Method.invoke(Method.java:616)
> >at
> >
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:187)
> >at
> >
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70)
> >at
> >
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279)
> >at
> >
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
> >at
> >
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86)
> >at
> >
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
> >at
> >
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74)
> >at
> >
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1357)
> >at
> >
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1289)
> >at
> >
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicatio

[Neo4j] Onlineback​up Error on 1.3M02

2011-02-14 Thread Brendan Cheng
Hi,

I was trying to test the online backup process.  I received a
ComException saying "Channel has been closed".

Here is my code which is copied from your Testbackup with a small modification:

   private String serverPath = "localhost";
   private String backupPath = "target/var/backuedup-serverdb";

   public void fullThenIncremental() throws Exception
   {
   ServerInterface server = startServer();
   OnlineBackup backup = OnlineBackup.from( "localhost",7474 );
   backup.full( backupPath );
   shutdownServer( server );

   DbRepresentation furtherRepresentation = addMoreData();
   server = startServer();
   backup.incremental( backupPath );
   assertEquals( furtherRepresentation, DbRepresentation.of(
backupPath ) );
   shutdownServer( server );
   }

and the error message is:

run:
Mon Feb 14 13:37:54 CST 2011: Client connected to localhost:7474
Mon Feb 14 13:37:54 CST 2011: Opened a new channel to localhost/127.0.0.1:7474
2011/2/14 01:37:54 itags.Sync.SyncData main
: null
org.neo4j.com.ComException: org.neo4j.com.ComException: Channel has been closed
   at org.neo4j.com.Client.sendRequest(Client.java:183)
   at org.neo4j.com.backup.BackupClient.fullBackup(BackupClient.java:42)
   at org.neo4j.com.backup.OnlineBackup.full(OnlineBackup.java:67)
   at itags.Sync.SyncData.fullThenIncremental(SyncData.java:45)
   at itags.Sync.SyncData.main(SyncData.java:232)
Caused by: org.neo4j.com.ComException: Channel has been closed
   at org.neo4j.com.Client$2.readNext(Client.java:159)
   at 
org.neo4j.com.DechunkingChannelBuffer.readNextChunk(DechunkingChannelBuffer.java:79)
   at 
org.neo4j.com.DechunkingChannelBuffer.(DechunkingChannelBuffer.java:50)
   at org.neo4j.com.Client$2.(Client.java:151)
   at org.neo4j.com.Client.sendRequest(Client.java:150)
   ... 4 more

I have my db server started as window service.

Also, I want to know if we need the process "startServer()" if the db
server has been started.

Regards,

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


Re: [Neo4j] Traversal Question

2011-02-14 Thread John Howard
Thanks Peter. That was very useful.

I am trying to get the path A ->B->C->D-> E in the below graph, with the
following inputs
Start Node: A,
Relationships: REL1, REL4, REL2 (that is, order is not known)
Relationship Property: relProp= "abc" in REL3

I was not able to define an evaluator which takes the combination of
relationship types(without regard to order) and relationship properties to
return the desired path.
Can it be achievable in the current traversal framework?

  REL1  REL2REL8
  A -> X -> Y ---> Z

   REL1REL2 REL3REL4
  A -> B -> C ---> D -> E

   REL1REL3 REL9   REL10
  A -> P -> Q ---> R -> E


As always, appreciate your guidance.



===
John,
if the order of the relationships doesn't matter, you could do
something like this with the Traversal API (holding an ordered Path to
test against in your Evaluator):

public void testPath()
{
final ArrayList orderedPath = new
ArrayList();
orderedPath.add( withName( "REL1" ) );
orderedPath.add( withName( "REL2" ) );
orderedPath.add( withName( "REL3" ) );
orderedPath.add( withName( "REL4" ) );

TraversalDescription td = Traversal.description().evaluator(
new Evaluator()
{

public Evaluation evaluate( Path path )
{
if ( path.length() == 0 )
{
return Evaluation.EXCLUDE_AND_CONTINUE;
}
String  currentName=
path.lastRelationship().getType().name();
String relationshipType = orderedPath.get(
path.length() - 1 ).name();
if ( path.length() == orderedPath.size() )
{
if ( currentName.equals(
relationshipType ) )
{
return Evaluation.INCLUDE_AND_PRUNE;
}
else
{
return Evaluation.EXCLUDE_AND_PRUNE;
}
}
else
{
if ( currentName.equals(
relationshipType ) )
{
return Evaluation.EXCLUDE_AND_CONTINUE;
}
else
{
return Evaluation.EXCLUDE_AND_PRUNE;
}
}
}
} );
Traverser t = td.traverse( getNodeWithName( "A" ) );
for ( Path path : t )
{
System.out.println(path);
}

}

I am attaching the classes for your reference, so you have full code.

Also, you could try JRuby, Gremlin or other along the same lines. But
this is a basic Java example in creating an ordered Path information
and checking against it during the traversal. You can add in more
stuff of course ...

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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Tue, Jan 25, 2011 at 10:59 PM, John Howard 
wrote:
> Hello,
>
> We are trying to use neo4j graph database in one of our applications.
> I think we hit a roadblock with traversal framework. It could be due to
our
> limited knowledge of neo4j framework.
>
> Here is what we are trying to accomplish:
> We need to get a path(from the graph below) from the nodes A to E through
> relations REL1, REL2, REL3 & REL4.
> All we know before the traversal is: Node A, REL1, REL2, REL3,
> REL4..(sometime we even know the end node E)
> So how can we get the path A to E? I can't seem to achieve it using
> evaluator and/or relationships in TraversalDescription. It always returns
me
> nodes X, P,Q since they have one my relationships(REL1, REL3).
>
>
>  REL1REL2REL8
>  A -> X -> Y ---> Z
>
>   REL1  REL2REL3REL4
>  A -> B -> C ---> D -> E
>
>   REL1   REL3 REL9   REL10
>  A -> P -> Q ---> R -> E
>
>
> Nodes: A, B, C, D,E,X,Y,Z,P,Q,R,
> Relations: REL1REL10
>
>
> Thank you for your help.
>
> John
> ___
> Neo4j mailing list
> User at lists.neo4j.org
> https://lists.neo4

Re: [Neo4j] Brainstorming ideas - 2. REST API (Versioning, Declarative API documentation (DSL))

2011-02-14 Thread Craig Taverner
Wow! No wonder no-one replied to this. It was a post with real weight :-)

Anyway, I personally like what I'm hearing. Everything sounds good on first
read. But I can't help suspecting that things are not as simpleI think we
should  as that. For example, I suspect that your ideas of enabling
versioning in the rest API allow for multiple versions running as separate
versions on the same database, in different contexts? Sounds useful, but
does smack a little of 'dll-hell'. Perhaps it is only about knowing where to
draw the line.

For the declarative syntax, I'm a DSL fan, and so love the idea. I did this
once 12 years ago where the spec was written in word (gasp!), and 'compiled'
by a perl script into C, C++ and Java versions of the libraries supporting a
binary protocol. It worked great. But in retrospect we found only one
version (java) ever got used, and finally the whole thing was shut down and
replaced by only the java code. So I guess the moral of the story is let the
initial version exist for a little while before building the generalization,
so we are sure what we want.

I also reviewed Martins book, but only once :-)
(and I tend to limit my DSL's to internal DSL's in Ruby)

On Sun, Feb 6, 2011 at 10:27 PM, Michael Hunger <
michael.hun...@neotechnology.com> wrote:

> Hi there,
>
> this weekend I was away from a computer so I spent some time brainstorming
> things. I would be interested in any feedback on those thoughts and would
> like to broaden the audience beyond the devteam.
>
> 1) An idea for versioning the rest API (when using URI based versioning
> schemes like /db/data/v1/node):
>
> We could modularize the server, so that it's components like the REST API,
> webadmin, monitoring etc. are deployed just as separate jax-rs plugins in a
> web-container (just declare those in the web-xml).
> Using the versioned jars of the REST api (i.e. rest-api-1.2.jar,
> rest-api-1.3.M01.jar) we could (with a restricted classloader) bind their
> jax-rs servlets to the context according to the version URI path (i.e.
> /db/data/v1).
> Then one could decide which jars to publish at a certain server and so also
> declare which versions of the API to support.
>
> 2) Declarative / Programmatic API documentation (REST API DSL)
>
> I'm in the progress of finishing the java-rest-driver for the Neo4j server
> API. (https://github.com/jexp/neo4j-java-rest-binding). (I you want to try
> it out, it works so far as a drop-in replacement for the embedded
> GraphDatabaseService).
> I'm currently running instances of the imdb app and of the neo4j-spatial
> geoserver addon on top of that.
>
> While working on this driver and also while looking at Max' neography I
> noticed that you have the strong coupling to the REST API (in terms of URI's
> and request/response formats) and at the same time this dependency is string
> based and distributed through the whole driver codebase. (Yes I know that is
> a part of the driver design that has to be improved).
>
> So what I though of was the following, please don't flame me but correct
> me/point me to better ways if I'm totally wrong here.
>
> I'm not very aware of existing was to declaratively describe a REST API in
> terms of its URIs and formats (json).
> What I think would be very nice is a declarative, type-safe, refactoring
> aware way to describe the REST API as it is provided by the Neo4j-Server.
> This declarative description (using a nice, compact DSL) could be used to
> automate the representation generation in the server and also provide the
> correct URI-Patterns for jersey. On the client side I could use this
> executable description to either generate a facade that my driver binds to
> (and won't compile anymore when the facade is changed due to a changed DSL
> description). I could also easily generate a test-harness that frees me of
> the need of running a neo4j-rest server as it could use the DSL for
> generating appropriate responses to the URI-calls behind the facade.
> This description can also be used to generate the Neo4j-REST API
> documentation that is currently contained in the wiki and has to be changed
> manually for API changes. It would also contain the version of the API it
> describes so that multiple versions can be checked/generated/coded against.
>
> Sorry I'm a bit biased here. Too much DSL stuff in the last years that has
> proven very helpful and powerful (and also too many rounds of reviewing
> Martins DSL book :)
>
> WDYT?
>
> Michael
> ___
> 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] Does the index commit with the transaction?

2011-02-14 Thread Massimo Lusetti
Hi all,
  Does the inner Lucene index commit toghether with the Transaction
success()/finish() cycle?

I mean if I start a Transaction and do like
http://wiki.neo4j.org/content/Transactions#Big_transactions I suppose
I'm guarantee the Lucene index is synched to disk as soon as the
Transaction finish(), right?

Cheers
-- 
Massimo
http://meridio.blogspot.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Neo4j 1.3.M02 - Moving Day

2011-02-14 Thread Andreas Kollegger
Moving Day, well alright it's been a moving two-weeks. But now the move and 
cleanups of the last two weeks are presented in a new release -- Neo4j 1.3 
Milestone 2 -- the growing light of Abisko Lampa. Which I'm sure is bringing 
the warmth of Springtime. 

Anyway, with the upgrade to 1.3.M02 you'll find:

* performance improvements in Kernel
* cleaned up Webadmin
* a new backup library
* upgraded Gremlin in the console
* a new communications package

Read about it here: 
http://blog.neo4j.org/2011/02/neo4j-13-abisko-lampa-m02-moving-day.html
Get it here: http://neo4j.org/download
Try it out: wherever you are

And of course talk about it everywhere, and give us feedback here. 

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


[Neo4j] ping

2011-02-14 Thread Andreas Kollegger
just a test
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Traversing by Relationship property

2011-02-14 Thread Michael Hunger
it is a js syntax error

you have to escape the quotes

like \'to\'

Michael

Sent from my iBrick4


Am 10.02.2011 um 22:29 schrieb mike_t :

> 
> Thanks Mattias and Michael for your answers!
> 
> I tried it with the following request for relationship property "to".
> 
> curl -X POST -H Accept:application/json -H Content-Type:application/json -d
> '{  "order" : "depth first",  "uniqueness" : "node", "return filter" : {
> "language" : "javascript", "body" : "position.length() > 0 &&
> position.lastRelationship().getProperty('to',0) == 1" }, "max depth" : 1 }'
> http://localhost:7474/db/data/node/40/traverse/node
> 
> All my relationships have the property "to" but i got  an exception that
> "to"is not defined:
> 
> 
> 
> 
> 
> Error 500 javax.script.ScriptException:
> sun.org.mozilla.javascript.EcmaError: ReferenceError: "to" is not defined.
> (#1) in  at line number
> 1
> 
> HTTP ERROR 500
> Problem accessing /db/data/node/40/traverse/node. Reason:
> javax.script.ScriptException: sun.org.mozilla.javascript.EcmaError:
> ReferenceError: "to" is not defined. (#1) in
>  at line number 1Caused
> by:org.neo4j.server.rest.domain.EvaluationException:
> javax.script.ScriptException: sun.org.mozilla.javascript.EcmaError:
> ReferenceError: "to" is not defined. (#1) in
>  at line number 1
>at
> org.neo4j.server.rest.domain.EvaluatorFactory$CompiledScriptExecutor.eval(EvaluatorFactory.java:184)
>at
> org.neo4j.server.rest.domain.EvaluatorFactory$ScriptedReturnEvaluator.accept(EvaluatorFactory.java:256)
>at
> org.neo4j.server.rest.domain.EvaluatorFactory$ScriptedReturnEvaluator.accept(EvaluatorFactory.java:246)
>at
> org.neo4j.kernel.impl.traversal.TraversalDescriptionImpl$WrappedFilter.evaluate(TraversalDescriptionImpl.java:255)
>at
> org.neo4j.kernel.impl.traversal.MultiEvaluator.evaluate(MultiEvaluator.java:42)
>at
> org.neo4j.kernel.impl.traversal.TraversalBranchImpl.initialize(TraversalBranchImpl.java:88)
>at
> org.neo4j.kernel.impl.traversal.TraversalBranchImpl.next(TraversalBranchImpl.java:107)
>at
> org.neo4j.kernel.impl.traversal.StartNodeTraversalBranch.next(StartNodeTraversalBranch.java:51)
>at
> org.neo4j.kernel.PreorderDepthFirstSelector.next(PreorderDepthFirstSelector.java:49)
>at
> org.neo4j.kernel.impl.traversal.TraverserImpl$TraverserIterator.fetchNextOrNull(TraverserImpl.java:128)
>at
> org.neo4j.kernel.impl.traversal.TraverserImpl$TraverserIterator.fetchNextOrNull(TraverserImpl.java:95)
>at
> org.neo4j.helpers.collection.PrefetchingIterator.hasNext(PrefetchingIterator.java:56)
>at
> org.neo4j.server.rest.web.DatabaseActions.traverse(DatabaseActions.java:744)
>at
> org.neo4j.server.rest.web.RestfulGraphDatabase.traverse(RestfulGraphDatabase.java:674)
>at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
>at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>at java.lang.reflect.Method.invoke(Method.java:616)
>at
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:187)
>at
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70)
>at
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279)
>at
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
>at
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86)
>at
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
>at
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74)
>at
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1357)
>at
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1289)
>at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1239)
>at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
>at
> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)
>at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:497)
>at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:684)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
>at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:

Re: [Neo4j] Help us make Neo4j better at handling YOUR data

2011-02-14 Thread Massimo Lusetti
On Thu, Feb 10, 2011 at 12:08 PM, Tobias Ivarsson
 wrote:

> This tool does not gather statistics for string arrays, since they are not
> affected by the proposed patch.
>
> The tool still runs, but if there are no String properties, output will be
> pretty boring
>
> Cheers,
> Tobias

Fine, I'm building a partial replica of our base using Strings where
possible and let you know the results as soon as finished.


Cheers
-- 
Massimo
http://meridio.blogspot.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Graph pattern matching component

2011-02-14 Thread Saikat Kanjilal

Hi Everyone,I am reading up on email threads and documentation pertaining to 
the pattern matching component and am considering using it to advance the next 
set of features for the code.  I was wondering if someone has some examples 
that they can put on github or document on the wiki for this component.  I am 
trying to perform some complex pattern matching operations and it would help a  
lot to see the different API's in use.
Best Regards  
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Traversing by Relationship property

2011-02-14 Thread mike_t

Thanks Mattias and Michael for your answers!

I tried it with the following request for relationship property "to".

curl -X POST -H Accept:application/json -H Content-Type:application/json -d
'{  "order" : "depth first",  "uniqueness" : "node", "return filter" : {
"language" : "javascript", "body" : "position.length() > 0 &&
position.lastRelationship().getProperty('to',0) == 1" }, "max depth" : 1 }'
http://localhost:7474/db/data/node/40/traverse/node

All my relationships have the property "to" but i got  an exception that
"to"is not defined:





Error 500 javax.script.ScriptException:
sun.org.mozilla.javascript.EcmaError: ReferenceError: "to" is not defined.
(#1) in  at line number
1

HTTP ERROR 500
Problem accessing /db/data/node/40/traverse/node. Reason:
javax.script.ScriptException: sun.org.mozilla.javascript.EcmaError:
ReferenceError: "to" is not defined. (#1) in
 at line number 1Caused
by:org.neo4j.server.rest.domain.EvaluationException:
javax.script.ScriptException: sun.org.mozilla.javascript.EcmaError:
ReferenceError: "to" is not defined. (#1) in
 at line number 1
at
org.neo4j.server.rest.domain.EvaluatorFactory$CompiledScriptExecutor.eval(EvaluatorFactory.java:184)
at
org.neo4j.server.rest.domain.EvaluatorFactory$ScriptedReturnEvaluator.accept(EvaluatorFactory.java:256)
at
org.neo4j.server.rest.domain.EvaluatorFactory$ScriptedReturnEvaluator.accept(EvaluatorFactory.java:246)
at
org.neo4j.kernel.impl.traversal.TraversalDescriptionImpl$WrappedFilter.evaluate(TraversalDescriptionImpl.java:255)
at
org.neo4j.kernel.impl.traversal.MultiEvaluator.evaluate(MultiEvaluator.java:42)
at
org.neo4j.kernel.impl.traversal.TraversalBranchImpl.initialize(TraversalBranchImpl.java:88)
at
org.neo4j.kernel.impl.traversal.TraversalBranchImpl.next(TraversalBranchImpl.java:107)
at
org.neo4j.kernel.impl.traversal.StartNodeTraversalBranch.next(StartNodeTraversalBranch.java:51)
at
org.neo4j.kernel.PreorderDepthFirstSelector.next(PreorderDepthFirstSelector.java:49)
at
org.neo4j.kernel.impl.traversal.TraverserImpl$TraverserIterator.fetchNextOrNull(TraverserImpl.java:128)
at
org.neo4j.kernel.impl.traversal.TraverserImpl$TraverserIterator.fetchNextOrNull(TraverserImpl.java:95)
at
org.neo4j.helpers.collection.PrefetchingIterator.hasNext(PrefetchingIterator.java:56)
at
org.neo4j.server.rest.web.DatabaseActions.traverse(DatabaseActions.java:744)
at
org.neo4j.server.rest.web.RestfulGraphDatabase.traverse(RestfulGraphDatabase.java:674)
at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:187)
at
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70)
at
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
at
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
at
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1357)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1289)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1239)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
at
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:497)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:684)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
org.mortbay.jetty.handler.Ha

[Neo4j] about relationship

2011-02-14 Thread Jose Angel Inda Herrera

hello list,
How to get an edge in the graph (in this case a relationship) having the two 
nodes of this relationship,

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


[Neo4j] about relationship

2011-02-14 Thread Jose Angel Inda Herrera

hello list,
How to get an edge in the graph (in this case a relationship) having the two 
nodes of this relationship,

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


[Neo4j] Help with exception using BatchInserter

2011-02-14 Thread Pablo Pareja
Hi all,
I keep getting this exception and don't know what the reason could be:

Unable to write record[244986398] @[32583190934]
org.neo4j.kernel.impl.nioneo.store.AbstractPersistenceWindow.writeOut(AbstractPersistenceWindow.java:112)
org.neo4j.kernel.impl.nioneo.store.AbstractPersistenceWindow.force(AbstractPersistenceWindow.java:124)
org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.flushAll(PersistenceWindowPool.java:251)
org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.close(PersistenceWindowPool.java:224)
org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:614)
org.neo4j.kernel.impl.nioneo.store.PropertyStore.closeStorage(PropertyStore.java:101)
org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:611)
org.neo4j.kernel.impl.nioneo.store.NeoStore.closeStorage(NeoStore.java:115)
org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:611)
org.neo4j.kernel.impl.batchinsert.BatchInserterImpl.shutdown(BatchInserterImpl.java:351)

I'm using a 65G RAM machine and the java process is launched with -Xmx63G
the conf values I pass to the batch inserter are the following:

neostore.nodestore.db.mapped_memory=10G
neostore.relationshipstore.db.mapped_memory=10G
neostore.propertystore.db.mapped_memory=10G
neostore.propertystore.db.strings.mapped_memory=10G
neostore.propertystore.db.arrays.mapped_memory=0M

Besides, there were still 50G free space in the disk when this exception was
thrown

I'd really appreciate any help,
Cheers

-- 
Pablo Pareja Tobes
LinkedInhttp://www.linkedin.com/in/pabloparejatobes
Twitter   http://www.twitter.com/pablopareja

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