Re: [Neo4j] Open Data Sets?

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

Cheers M

mobile mail please excuse brevity and typos

Am 29.09.2011 um 07:17 schrieb Peter Neubauer 
:

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


Re: [Neo4j] Open Data Sets?

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

/peter

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


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

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

On Wed, Sep 28, 2011 at 11:50 PM, tt6  wrote:

>
> Hello,
> I have stored triples into the Neo4J embedded db, now I want to see the
> graph or data in the db. How can I do it?
>
> Thanks,
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/See-the-graph-in-the-Neo4j-embedded-db-tp3377246p3377246.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


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

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

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

Regards

2011/9/28 andrew ton 

>
>
> Hi noppanit,
>
> Thank you for your quick reply! I have checked
> http://wiki.neo4j.org/content/Neoclipse#Configuration about Neoclipse.
> Where can I find Neoclipse? The donwload page just show neo4j packages. I
> am using neo4j-community-1.5.M01 as REST server. In eclipse I use neo4j API
> to store data into embedded database.
>
> I really appreciate your help if you can give me clear information. Thank
> you!
>
> Regards,
>
>
> 
> From: noppanit 
> To: user@lists.neo4j.org
> Sent: Wednesday, September 28, 2011 1:33 PM
> Subject: Re: [Neo4j] See the graph in the Neo4J embedded db
>
> You could use neoclipse to see it.
>
> Sent from my BlackBerry® wireless device
>
> -Original Message-
> From: "tt6 [via Neo4j Community Discussions]" <
> ml-node+s438527n3377257...@n3.nabble.com>
> Date: Wed, 28 Sep 2011 13:23:29
> To: noppanit
> Subject: [Neo4j] See the graph in the Neo4J embedded db
>
>
>
>
>
> Hello,
> I have stored triples into the Neo4J embedded db, now I want to see the
> graph or data in the db. How can I do it?
>
> Thanks,
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
>
> ___
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-See-the-graph-in-the-Neo4J-embedded-db-tp3377257p3377257.html
> To start a new topic under Neo4j Community Discussions, email
> ml-node+s438527n438527...@n3.nabble.com
> To unsubscribe from Neo4j Community Discussions, visit
> http://neo4j-community-discussions.438527.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=438527&code=bm9wcGFuaXQuY0BnbWFpbC5jb218NDM4NTI3fDExOTIzNzAyNjk=
>
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-See-the-graph-in-the-Neo4J-embedded-db-tp3377257p3377301.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



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


Re: [Neo4j] REST, Transactions and Uniqueness

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

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

I have an extension with the following signature:

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

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

http> get /db/data/ext/IndexAdder/graphdb/add_unique_node
==> 500 Internal Server Error
==> 
==> 
==> 
==> Error 500 INTERNAL_SERVER_ERROR
==> 
==> HTTP ERROR 500
==> Problem accessing
/db/data/ext/IndexAdder/graphdb/add_unique_node. Reason:
==> INTERNAL_SERVER_ERRORCaused
by:java.lang.NullPointerException
==> at 
org.neo4j.server.rest.repr.ExtensionPointRepresentation$ParameterRepresentation.serialize(ExtensionPointRepresentation.java:110)
==> at org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:40)
==> at 
org.neo4j.server.rest.repr.ListSerializer.addMapping(ListSerializer.java:56)
==> at 
org.neo4j.server.rest.repr.MappingRepresentation.addTo(MappingRepresentation.java:52)
==> at 
org.neo4j.server.rest.repr.ListRepresentation.serialize(ListRepresentation.java:60)
==> at org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:73)
==> at 
org.neo4j.server.rest.repr.MappingSerializer.putList(MappingSerializer.java:61)
==> at 
org.neo4j.server.rest.repr.ListRepresentation.putTo(ListRepresentation.java:73)
==> at 
org.neo4j.server.rest.repr.ObjectRepresentation$PropertyGetter.putTo(ObjectRepresentation.java:132)
==> at 
org.neo4j.server.rest.repr.ObjectRepresentation.serialize(ObjectRepresentation.java:143)
==> at 
org.neo4j.server.rest.repr.MappingRepresentation.serialize(MappingRepresentation.java:42)
==> at org.neo4j.server.rest.repr.OutputFormat.format(OutputFormat.java:123)
==> at 
org.neo4j.server.rest.repr.OutputFormat.response(OutputFormat.java:100)
==> at org.neo4j.server.rest.repr.OutputFormat.ok(OutputFormat.java:48)
==> at 
org.neo4j.server.rest.web.ExtensionService.getGraphDatabaseExtensionDescription(ExtensionService.java:148)
... snip ...

-Tony


On Wed, Sep 28, 2011 at 2:45 PM, Tony Wooster  wrote:
> Peter,
>
> Thanks for replying. That's great to hear (the last I heard was just
> that it wasn't going to make it into 1.5), elsewhere on the forums. I
> know there's an issue tracking uniqueness in indices somewhere -- I
> think on GitHub already.
>
> In the meantime, you mentioned that maps are available as parameters
> to extensions. Could you provide an example of how to use this? No
> matter what I try, I'm getting errors like:
>
> WARNING: Failed to load plugin [ServerPlugin[IndexAdder]]: Unsupported
> parameter type: java.util.Map
>
> ... or ...
>
> WARNING: Failed to load plugin [ServerPlugin[IndexAdder]]: Unsupported
> parameter type: java.util.Map
>
> ... or ...
>
> WARNING: Failed to load plugin [ServerPlugin[IndexAdder]]: Unsupported
> parameter type: interface java.util.Map
>
> Like I said previously, I'm not too hot on Java, but having spent a
> lot of time reading the source code and a bit on java reflection, I
> can't quite figure out how to specify Map types in the parameter list
> to my extension. My attempts of:
>
>    public Node addUniqueNode(
>                @Source GraphDatabaseService graphDb,
>                @Description( "Map of indexName : bodyKeys to search." )
>                    @Parameter( name = "indices" )
> Map indices )
>
> or, similarly:
>
>                    @Parameter( name = "indices" ) Map indices )
>
> or,
>
>                    @Parameter( name = "indices" ) Map indices )
>
> All failed. I just can't see how to wheedle at Map through
> parameterExtractor in PluginPointFactoryImpl.java. Any ideas here?
>
> Thanks much,
>
> -Tony
>
>
> On Wed, Sep 28, 2011 at 2:10 PM, Peter Neubauer
>  wrote:
>> Linan,
>> It's high prio in the backlog for 1.6, so this WILL be taken care of. I
>> believe there is also an issue on this on Github? If not, please raise one
>> to track progress for the community. Thanks!
>>
>> /peter
>>
>> Sent from my phone.
>> On Sep 28, 2011 10:02 PM, "Linan Wang"  wrote:
>>> Peter,
>>> I feel uniqueness has been a recurring theme in neo4j applications,
>>> especially when it's used heavily on algorithms traversing existing
>>> data. it would be great if it's supported in kernel level:
>>>
>>> interface NodeUniquenessConstraint
>>> {
>>> public Node getNode();
>>> public void setupNode(Node newNode);
>>> }
>>>
>>> public Node getOrCreateNode(NodeUniquenessConstraint constraint)
>>> {
>>> // Preparation, acquires lock, etc.
>>> Node n 

Re: [Neo4j] REST, Transactions and Uniqueness

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

On Wed, Sep 28, 2011 at 10:10 PM, Peter Neubauer
 wrote:
> Linan,
> It's high prio in the backlog for 1.6, so this WILL be taken care of. I
> believe there is also an issue on this on Github? If not, please raise one
> to track progress for the community. Thanks!
>
> /peter
>
> Sent from my phone.
> On Sep 28, 2011 10:02 PM, "Linan Wang"  wrote:
>> Peter,
>> I feel uniqueness has been a recurring theme in neo4j applications,
>> especially when it's used heavily on algorithms traversing existing
>> data. it would be great if it's supported in kernel level:
>>
>> interface NodeUniquenessConstraint
>> {
>> public Node getNode();
>> public void setupNode(Node newNode);
>> }
>>
>> public Node getOrCreateNode(NodeUniquenessConstraint constraint)
>> {
>> // Preparation, acquires lock, etc.
>> Node n = constraint.getNode();
>> if(n == null)
>> {
>> n = createNode();
>> constraint.setupNode(n);
>> }
>> ...
>> return n;
>> }
>>
>> or, there is something similar already implemented?
>>
>> On Tue, Sep 27, 2011 at 9:38 PM, Peter Neubauer
>>  wrote:
>>> Guys,
>>> Maps are now supported as parameters, look at the Gremlin plugin för
>>> reference in the docs. Will add that for parameters to the cypher plugin
>>> too.
>>>
>>> Thanks for chipping in!
>>>
>>> /peter
>>>
>>> Sent from my phone.
>>> On Sep 27, 2011 8:12 PM, "Tony Wooster"  wrote:
 Hi Linan,

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

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

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

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

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

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

 Thanks for the response!

 -T

 On Thu, Sep 22, 2011 at 4:57 PM, Linan Wang  wrote:
>
> Hi,
> i had the issue few days ago and thanks to McKinley I got a workable
> solution. i think the best way to do is through unmanaged extension.
> the overhead of multiple REST calls could make the matter more
> complex.
>
> here is part of my ObjectFactory class. in my situation it's an
> external id needs to be uniq. feel free to correct my codes :) the
> performance is not ideal though. on my imac I got around 50 insertions
> per sec. the bottle neck is not memory.
>
>        public T get(long externalId)
>        {
>                // try asynchronized read first;
>                Index idx = getDefaultNodeIndex();
>
>                IndexHits h = idx.get(IDX_KEY_EXTERNAL_ID,
>>> externalId);
>                Node n = h.getSingle();
>                h.close();
>
>                if(n != null)
>                        return wrap(n);
>
>                // if not found, try synchronized version;
>                return null;
>        }
>
>        public T getOrCreate(long externalId)
>        {
>
>                T ret = get( externalId );
>                if(ret != null)
>                        return ret;
>
>                // if not found, try synchronized version;
>

Re: [Neo4j] Neo4J support Android platform??

2011-09-28 Thread tt6

Hi noppanit,

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

Thanks

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


Re: [Neo4j] Neo4J support Android platform??

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

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


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

2011-09-28 Thread andrew ton


Hi noppanit,

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

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

Regards,



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

You could use neoclipse to see it. 

Sent from my BlackBerry® wireless device

-Original Message-
From: "tt6 [via Neo4j Community Discussions]" 

Date: Wed, 28 Sep 2011 13:23:29 
To: noppanit
Subject: [Neo4j] See the graph in the Neo4J embedded db





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

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


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


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


[Neo4j] Open Data Sets?

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

Thanks,

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


[Neo4j] Neo4J support Android platform??

2011-09-28 Thread andrew ton


Hello,

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

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


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

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

2011/9/28 René Pickhardt 

> I used the current stable release and the problem did not arise anymore but
> I got new problems.
>
> for many nodes even though (according to the data set they should have
> relations) the
> function  (n.hasRelationship(DynamicRelationshipType.withName( "UPDATE" ),
> Direction.BOTH)) does not stop. It just seems to jump into an endless loop
> ;(
>
> I don't think I made a mistake in the code for the batch inserter but i
> just
> attached it. My insertion contains of two steps:
>
> first I create many node in the graph and store them also in an index:
> batchArticle. I do not query agains the index to check if a node with this
> key already existed. But my keys are unique.
>
> private void AddBatchNode(String key, String title){
> Map properties = new HashMap();
>
> properties.put( "key", key );
> properties.put( "title", title );
>  properties.put( "timestamp", "1" );
> long node = inserter.createNode( properties );
>
> properties = MapUtil.map( "key", key );
> batchArticle.add( node, properties );
>  }
>
> then I attach many updates (also nodes encoded via timestamp) to every node
> and connect them via a relationship.
>
> private void BatchUpdate(String timestamp, String key) {
> if (batchArticle.get("key", key).getSingle()!=null){
>  long node = batchArticle.get("key", key).getSingle();
> Map properties = new HashMap();
>  properties.put( "timestamp", timestamp );
>  long ci = inserter.createNode( properties );
>
> inserter.createRelationship( node, ci, DynamicRelationshipType.withName(
> "UPDATE" ),null);
> }
>  }
>
> the last step (i did not implement this) is to connect the nodes from the
> first steps via friendship relations. But I wanted to do some testing
> first...
>
> anyone knows of this problem?
>
> 2011/9/28 Rick Bullotta 
>
> > Hi, René.
> >
> > I recognized your error almost immediately, since we encountered it in an
> > early 1.4 beta. ;-)
> >
> > I think you'll have a good result if you can switch to the 1.4.1 release!
> >
> > Best,
> >
> > Rick
> >
> > -Original Message-
> > From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
> > On Behalf Of René Pickhardt
> > Sent: Wednesday, September 28, 2011 10:29 AM
> > To: Neo4j user discussions
> > Subject: Re: [Neo4j] InvalidRecordException: Record[1983624] not in
> > useRecord[1983624] not in use
> >
> > Hey guys,
> >
> > I don't know "how" I found the old milestone. I was downloading it once I
> > started using neo4j.
> >
> > I will just migrate to the current stable version and tell you afterwards
> > if
> > I still have problems. by your comments I guess the problem will be
> solved.
> > Thanks so far!
> >
> > best regards René
> >
> > 2011/9/28 Mattias Persson 
> >
> > > I'm curious to know how you found that old milestone also :) you picked
> > the
> > > one out of extremely few having some kind of data problems.
> > >
> > > Den onsdagen den 28:e september 2011 skrev Chris Gioran<
> > > chris.gio...@neotechnology.com>:
> > > > Hi Rene,
> > > >
> > > > According to git log, 1,4.M04 was tagged 10/06/2011, while the fix
> for
> > > > a bug in the BatchInserterImpl that caused corrupted stores which
> gave
> > > > the message you are seeing is
> > > >
> > > >
> > >
> > >
> >
> https://github.com/neo4j/community/commit/71fbe4ac1174fad16a7bb154c9f78d3f1b377248
> > > >
> > > > which has a date of 04/07/2011.
> > > >
> > > > This makes 1.4.M06 the earliest release to use that does not have
> this
> > > > issue or, even better, go for 1.4.1 which is the latest stable
> > > > release. Since you are comfortable using milestones, 1.5.M01 might be
> > > > of interest to you.
> > > >
> > > > http://neo4j.org/download has the links that you need.
> > > >
> > > > hope that helped,
> > > > CG
> > > >
> > > > 2011/9/28 René Pickhardt :
> > > >> Neo1.4.M04 community edition no self build.
> > > >>
> > > >> 2011/9/28 Mattias Persson 
> > > >>
> > > >>> Which version of neo4j did you use to import your data, was it a
> > > >>> downloadable package, from maven or building yourself from a
> branch?
> > > >>>
> > > >>> 2011/9/28 René Pickhardt 
> > > >>>
> > > >>> > hey everyone
> > > >>> >
> > > >>> > I got a strange error message that a record is not in use if I
> call
> > > >>> > hasRelationship() function even though I checked against null
> > before!
> > > My
> > > >>> > real purpose was to start the traverser but it exited with the
> same
> > > error
> > > >>> > message. That is why I put the n.hasRelationship which also would
> > not
> > > >>> work.
> > > >>> >
> > > >>> > I imported a graph with 50 mio. nodes and about the same size of
> > > >>> > relationships. (though I am about to import more relationships
> > later
> > > on)
> > > >>> I
> > > >>> > put 2 mio. nodes in 

Re: [Neo4j] REST, Transactions and Uniqueness

2011-09-28 Thread Tony Wooster
Peter,

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

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

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

... or ...

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

... or ...

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

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

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

or, similarly:

@Parameter( name = "indices" ) Map indices )

or,

@Parameter( name = "indices" ) Map indices )

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

Thanks much,

-Tony


On Wed, Sep 28, 2011 at 2:10 PM, Peter Neubauer
 wrote:
> Linan,
> It's high prio in the backlog for 1.6, so this WILL be taken care of. I
> believe there is also an issue on this on Github? If not, please raise one
> to track progress for the community. Thanks!
>
> /peter
>
> Sent from my phone.
> On Sep 28, 2011 10:02 PM, "Linan Wang"  wrote:
>> Peter,
>> I feel uniqueness has been a recurring theme in neo4j applications,
>> especially when it's used heavily on algorithms traversing existing
>> data. it would be great if it's supported in kernel level:
>>
>> interface NodeUniquenessConstraint
>> {
>> public Node getNode();
>> public void setupNode(Node newNode);
>> }
>>
>> public Node getOrCreateNode(NodeUniquenessConstraint constraint)
>> {
>> // Preparation, acquires lock, etc.
>> Node n = constraint.getNode();
>> if(n == null)
>> {
>> n = createNode();
>> constraint.setupNode(n);
>> }
>> ...
>> return n;
>> }
>>
>> or, there is something similar already implemented?
>>
>> On Tue, Sep 27, 2011 at 9:38 PM, Peter Neubauer
>>  wrote:
>>> Guys,
>>> Maps are now supported as parameters, look at the Gremlin plugin för
>>> reference in the docs. Will add that for parameters to the cypher plugin
>>> too.
>>>
>>> Thanks for chipping in!
>>>
>>> /peter
>>>
>>> Sent from my phone.
>>> On Sep 27, 2011 8:12 PM, "Tony Wooster"  wrote:
 Hi Linan,

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

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

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

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

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

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

 Thanks for the response!

 -T

 On Thu, Sep 22, 201

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

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

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

there's you can "see" your graph.

2011/9/28 noppanit 

> You could use neoclipse to see it.
>
> Sent from my BlackBerry® wireless device
>
> -Original Message-
> From: "tt6 [via Neo4j Community Discussions]" <
> ml-node+s438527n3377257...@n3.nabble.com>
> Date: Wed, 28 Sep 2011 13:23:29
> To: noppanit
> Subject: [Neo4j] See the graph in the Neo4J embedded db
>
>
>
>
>
> Hello,
> I have stored triples into the Neo4J embedded db, now I want to see the
> graph or data in the db. How can I do it?
>
> Thanks,
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
>
> ___
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-See-the-graph-in-the-Neo4J-embedded-db-tp3377257p3377257.html
> To start a new topic under Neo4j Community Discussions, email
> ml-node+s438527n438527...@n3.nabble.com
> To unsubscribe from Neo4j Community Discussions, visit
> http://neo4j-community-discussions.438527.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=438527&code=bm9wcGFuaXQuY0BnbWFpbC5jb218NDM4NTI3fDExOTIzNzAyNjk=
>
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-See-the-graph-in-the-Neo4J-embedded-db-tp3377257p3377301.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



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


Re: [Neo4j] REST, Transactions and Uniqueness

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

/peter

Sent from my phone.
On Sep 28, 2011 10:02 PM, "Linan Wang"  wrote:
> Peter,
> I feel uniqueness has been a recurring theme in neo4j applications,
> especially when it's used heavily on algorithms traversing existing
> data. it would be great if it's supported in kernel level:
>
> interface NodeUniquenessConstraint
> {
> public Node getNode();
> public void setupNode(Node newNode);
> }
>
> public Node getOrCreateNode(NodeUniquenessConstraint constraint)
> {
> // Preparation, acquires lock, etc.
> Node n = constraint.getNode();
> if(n == null)
> {
> n = createNode();
> constraint.setupNode(n);
> }
> ...
> return n;
> }
>
> or, there is something similar already implemented?
>
> On Tue, Sep 27, 2011 at 9:38 PM, Peter Neubauer
>  wrote:
>> Guys,
>> Maps are now supported as parameters, look at the Gremlin plugin för
>> reference in the docs. Will add that for parameters to the cypher plugin
>> too.
>>
>> Thanks for chipping in!
>>
>> /peter
>>
>> Sent from my phone.
>> On Sep 27, 2011 8:12 PM, "Tony Wooster"  wrote:
>>> Hi Linan,
>>>
>>> That's essentially what I implemented, but the logic just became that
>>> much more tortured when going over REST. Like I said, less of a Java
>>> programmer. The implementation I came up with on the REST side (hacky
>>> though it may be) was this:
>>>
>>> @Description( "An extension to help maintain unique relationships" )
>>> public class IndexTester extends ServerPlugin
>>> {
>>> @Name( "error_if_in_node_index" )
>>> @Description( "Will return a 4xx error if a key/value pair is found
in
>> "+
>>>   "a given index. Also errors if the index doesn't
>> exist.")
>>> @PluginTarget( GraphDatabaseService.class )
>>> public Boolean errorIfInNodeIndex(
>>> @Source GraphDatabaseService graphDb,
>>> @Description( "Name of the index to earch." )
>>> @Parameter( name = "indexName" ) String indexName,
>>> @Description( "Name of key to search." )
>>> @Parameter( name = "key" ) String key,
>>> @Description( "Value to search for." )
>>> @Parameter( name = "value" ) String value )
>>> throws BadInputException
>>> {
>>>
>>> if ( !graphDb.index().existsForNodes( indexName ) )
>>> throw new BadInputException("Index doesn't exist", new
>>> NotFoundException());
>>>
>>> Index index = graphDb.index().forNodes( indexName );
>>>
>>> if (index.get(key, value).size() > 0)
>>> throw new BadInputException("Key/value pair found in
index");
>>> return null;
>>> }
>>> }
>>>
>>> I'm still not entirely certain that this is the appropriate way to go;
>>> probably a better solution would be a more general "add node with
>>> unique, indexed fields" command that's slightly more functional than
>>> this batch-operation-quirks based hack. As an aside -- does anyone
>>> know when/if lists of maps for parameters will be implemented for REST
>>> plugins?
>>>
>>> Thanks for the response!
>>>
>>> -T
>>>
>>> On Thu, Sep 22, 2011 at 4:57 PM, Linan Wang  wrote:

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

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

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

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

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

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

public T getOrCreate(long externalId)
{

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

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

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

I

Re: [Neo4j] Forward slashes in index values

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

/peter

Sent from my phone.
On Sep 28, 2011 10:33 PM, "jadell"  wrote:
> Thanks for the heads up, Jim. On a tangentially related note, I filed this
> request: https://github.com/neo4j/community/issues/35
>
> Basically, in the future, it would be useful to have a way to determine
the
> server version via REST so the various clients can account for differences
> in the protocol like this.
>
> Thanks!
>
> -- Josh Adell
>
> --
> View this message in context:
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Forward-slashes-in-index-values-tp3347515p3377304.html
> Sent from the Neo4j Community Discussions mailing list archive at
Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


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

2011-09-28 Thread Michael Hunger
Marko forgot to point out that the Neo4j-Server comes with installed plugins
for Cypher  (http://docs.neo4j.org/chunked/snapshot/cypher-plugin.html)
and Gremlin (http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html)

Cypher's pattern matching is inspired by SPARQL so you might like it. 
(http://docs.neo4j.org/chunked/snapshot/cypher-query-lang.html)

Michael

Am 28.09.2011 um 22:44 schrieb Marko Rodriguez:

> Hey,
> 
>> After adding nodes and relationships into Neo4J REST server using REST API. 
>> How do I read data from the database using SPARQL? Does the database support 
>> SPARQL?
> 
> Neo4j is not an RDF database in its raw form. Its data model is a bit more 
> complicated than RDF and as such, is not amenable to SPARQL which assumes 
> only an edge-labeled graph. However, with that said, the pattern matching 
> functionality of Cypher is somewhat analogous to SPARQL so you might find 
> solace in that. Moreover, you can also use Gremlin for pattern matching, 
> though it doesn't have the same look-and-feel as SPARQL (see 
> https://github.com/tinkerpop/gremlin/wiki/SPARQL-vs.-Gremlin ).
> 
> Next. If you actually have used GraphSail (via Blueprints) to model your data 
> as an RDF graph in Neo4j, then you can access it via Sesame SPARQL engine --- 
> however, as it stands, not via the Neo4j REST server without rolling your own 
> extension. If you are so inclined, you can either use Rexster 
> (http://rexster.tinkerpop.com) and its SPARQL "kibble" or steal the code in 
> Rexster's SPARQL kibble and make it work for Neo4j Server (shouldn't be more 
> than an a few hours work).
> 
>   see http://rexster-kibbles.tinkerpop.com/
>   
> https://github.com/tinkerpop/rexster-kibbles/tree/master/sparql-kibble
> 
> Hope that is clear,
> Marko.
> 
> http://markorodriguez.com
> 
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user

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


[Neo4j] Execute SPARQL on Neo4J REST database?

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

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


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

2011-09-28 Thread Marko Rodriguez
Hey,

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

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

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

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

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

Hope that is clear,
Marko.

http://markorodriguez.com

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


[Neo4j] Neo4J Rest server support SPARQL??

2011-09-28 Thread andrew ton


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

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


Re: [Neo4j] Forward slashes in index values

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

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

Thanks!

-- Josh Adell

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


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

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

Sent from my BlackBerry® wireless device

-Original Message-
From: "tt6 [via Neo4j Community Discussions]" 

Date: Wed, 28 Sep 2011 13:23:29 
To: noppanit
Subject: [Neo4j] See the graph in the Neo4J embedded db





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

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


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


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


[Neo4j] See the graph in the Neo4J embedded db

2011-09-28 Thread andrew ton


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

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


[Neo4j] See the graph in the Neo4j embedded db

2011-09-28 Thread tt6

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

Thanks,

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


[Neo4j] See the graph in the Neo4j embedded db

2011-09-28 Thread tt6
Hello,

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

Thanks,

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


Re: [Neo4j] REST, Transactions and Uniqueness

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

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

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

or, there is something similar already implemented?

On Tue, Sep 27, 2011 at 9:38 PM, Peter Neubauer
 wrote:
> Guys,
> Maps are now supported as parameters, look at the Gremlin plugin för
> reference in the docs. Will add that for parameters to the cypher plugin
> too.
>
> Thanks for chipping in!
>
> /peter
>
> Sent from my phone.
> On Sep 27, 2011 8:12 PM, "Tony Wooster"  wrote:
>> Hi Linan,
>>
>> That's essentially what I implemented, but the logic just became that
>> much more tortured when going over REST. Like I said, less of a Java
>> programmer. The implementation I came up with on the REST side (hacky
>> though it may be) was this:
>>
>> @Description( "An extension to help maintain unique relationships" )
>> public class IndexTester extends ServerPlugin
>> {
>>     @Name( "error_if_in_node_index" )
>>     @Description( "Will return a 4xx error if a key/value pair is found in
> "+
>>                   "a given index. Also errors if the index doesn't
> exist.")
>>     @PluginTarget( GraphDatabaseService.class )
>>     public Boolean errorIfInNodeIndex(
>>                 @Source GraphDatabaseService graphDb,
>>                 @Description( "Name of the index to earch." )
>>                     @Parameter( name = "indexName" ) String indexName,
>>                 @Description( "Name of key to search." )
>>                     @Parameter( name = "key" ) String key,
>>                 @Description( "Value to search for." )
>>                     @Parameter( name = "value" ) String value )
>>             throws BadInputException
>>     {
>>
>>         if ( !graphDb.index().existsForNodes( indexName ) )
>>             throw new BadInputException("Index doesn't exist", new
>> NotFoundException());
>>
>>         Index index = graphDb.index().forNodes( indexName );
>>
>>         if (index.get(key, value).size() > 0)
>>             throw new BadInputException("Key/value pair found in index");
>>         return null;
>>     }
>> }
>>
>> I'm still not entirely certain that this is the appropriate way to go;
>> probably a better solution would be a more general "add node with
>> unique, indexed fields" command that's slightly more functional than
>> this batch-operation-quirks based hack. As an aside -- does anyone
>> know when/if lists of maps for parameters will be implemented for REST
>> plugins?
>>
>> Thanks for the response!
>>
>> -T
>>
>> On Thu, Sep 22, 2011 at 4:57 PM, Linan Wang  wrote:
>>>
>>> Hi,
>>> i had the issue few days ago and thanks to McKinley I got a workable
>>> solution. i think the best way to do is through unmanaged extension.
>>> the overhead of multiple REST calls could make the matter more
>>> complex.
>>>
>>> here is part of my ObjectFactory class. in my situation it's an
>>> external id needs to be uniq. feel free to correct my codes :) the
>>> performance is not ideal though. on my imac I got around 50 insertions
>>> per sec. the bottle neck is not memory.
>>>
>>>        public T get(long externalId)
>>>        {
>>>                // try asynchronized read first;
>>>                Index idx = getDefaultNodeIndex();
>>>
>>>                IndexHits h = idx.get(IDX_KEY_EXTERNAL_ID,
> externalId);
>>>                Node n = h.getSingle();
>>>                h.close();
>>>
>>>                if(n != null)
>>>                        return wrap(n);
>>>
>>>                // if not found, try synchronized version;
>>>                return null;
>>>        }
>>>
>>>        public T getOrCreate(long externalId)
>>>        {
>>>
>>>                T ret = get( externalId );
>>>                if(ret != null)
>>>                        return ret;
>>>
>>>                // if not found, try synchronized version;
>>>                return synchronizedGetOrCreate(externalId);
>>>        }
>>>
>>>        private synchronized T synchronizedGetOrCreate(long externalId)
>>>        {
>>>                // Just in case!
>>>                T ret = get( externalId );
>>>                if(ret != null)
>>>                        return ret;
>>>
>>>                Index idx = getDefaultNodeIndex();
>>>                Node n = null;
>>>
>>>                Transaction tx = db.beginTx();
>>>
>>>                try{
>>>                        n = db.createNode();
>>>
>>>                        // set property
>>>                        n.setProperty(AbstractObject.EXTERNAL_ID_KEY,
> externalId);
>>>
>>>                        // add to default index;
>>>               

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

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

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

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

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

private void AddBatchNode(String key, String title){
Map properties = new HashMap();

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

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

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

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

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

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

anyone knows of this problem?

2011/9/28 Rick Bullotta 

> Hi, René.
>
> I recognized your error almost immediately, since we encountered it in an
> early 1.4 beta. ;-)
>
> I think you'll have a good result if you can switch to the 1.4.1 release!
>
> Best,
>
> Rick
>
> -Original Message-
> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
> On Behalf Of René Pickhardt
> Sent: Wednesday, September 28, 2011 10:29 AM
> To: Neo4j user discussions
> Subject: Re: [Neo4j] InvalidRecordException: Record[1983624] not in
> useRecord[1983624] not in use
>
> Hey guys,
>
> I don't know "how" I found the old milestone. I was downloading it once I
> started using neo4j.
>
> I will just migrate to the current stable version and tell you afterwards
> if
> I still have problems. by your comments I guess the problem will be solved.
> Thanks so far!
>
> best regards René
>
> 2011/9/28 Mattias Persson 
>
> > I'm curious to know how you found that old milestone also :) you picked
> the
> > one out of extremely few having some kind of data problems.
> >
> > Den onsdagen den 28:e september 2011 skrev Chris Gioran<
> > chris.gio...@neotechnology.com>:
> > > Hi Rene,
> > >
> > > According to git log, 1,4.M04 was tagged 10/06/2011, while the fix for
> > > a bug in the BatchInserterImpl that caused corrupted stores which gave
> > > the message you are seeing is
> > >
> > >
> >
> >
> https://github.com/neo4j/community/commit/71fbe4ac1174fad16a7bb154c9f78d3f1b377248
> > >
> > > which has a date of 04/07/2011.
> > >
> > > This makes 1.4.M06 the earliest release to use that does not have this
> > > issue or, even better, go for 1.4.1 which is the latest stable
> > > release. Since you are comfortable using milestones, 1.5.M01 might be
> > > of interest to you.
> > >
> > > http://neo4j.org/download has the links that you need.
> > >
> > > hope that helped,
> > > CG
> > >
> > > 2011/9/28 René Pickhardt :
> > >> Neo1.4.M04 community edition no self build.
> > >>
> > >> 2011/9/28 Mattias Persson 
> > >>
> > >>> Which version of neo4j did you use to import your data, was it a
> > >>> downloadable package, from maven or building yourself from a branch?
> > >>>
> > >>> 2011/9/28 René Pickhardt 
> > >>>
> > >>> > hey everyone
> > >>> >
> > >>> > I got a strange error message that a record is not in use if I call
> > >>> > hasRelationship() function even though I checked against null
> before!
> > My
> > >>> > real purpose was to start the traverser but it exited with the same
> > error
> > >>> > message. That is why I put the n.hasRelationship which also would
> not
> > >>> work.
> > >>> >
> > >>> > I imported a graph with 50 mio. nodes and about the same size of
> > >>> > relationships. (though I am about to import more relationships
> later
> > on)
> > >>> I
> > >>> > put 2 mio. nodes in a lucence index called article.
> > >>> >
> > >>> > the counting variable t has the value 2385 (so the first 2385 calls
> > work
> > >>> > fine) if I skip this node the same problem accoures again at t =
> > 3239.
> > >>> >
> > >>> > maybe it is usefull to say that I inserted the graph using the
> batch
> > >>> > inserter.
> > >>> >
> > >>> > IndexHits res = article.get("key", values[0]);
> > >>> > if (res!=null){
> > >>> > Node n = res.getSingle();
> > >>> >  if (n!=null){
> > >>> > if (n.hasRelationship(DynamicRelationshipType.withNam

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

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

Thanks so much,

Michael

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

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

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


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

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

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

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

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

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

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

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


Should I be including some other config?

Thanks, 

Toby.


On 28/09/2011 15:53, "Michael Hunger" 
wrote:

>Could you also share the property files of the 3 vm's ?
>
>Thanks
>
>Michael
>
>Am 28.09.2011 um 15:59 schrieb Toby O'Rourke:
>
>> Hi,
>> 
>> I'm trying to do a POC using neo4j and spring-data-graph. I have
>>configured 3 VMs running zookeeper and deployed a simple webapp to
>>tomcat on each instance. I've run into a bit of a problem with
>>replication though. I can only see data being replicated when I restart
>>each tomcat instance ­ which is obviously no good.
>> 
>> I have the following in my application context:
>> 
>>>class="org.neo4j.kernel.HighlyAvailableGraphDatabase"
>>destroy-method="shutdown"
>>  scope="singleton">
>>
>>
>>
>>
>>
>>>value="${zookeeper.servers}" />
>>
>>
>>
>>
>>
>> 
>> I am starting "zoo1" first so that it becomes the master. Server.id is
>>allocated at runtime from a system property set on each machine
>>­Dserver.id=x in the tomcat startup script. From what I understand the
>>pull_interval=1 setting means that data should be synchronized once per
>>second, yet I am only seeing it happen when the servers are bounced. Am
>>I missing something?
>> 
>> Thanks,
>> 
>> Toby.
>> 
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>
>___
>Neo4j mailing list
>User@lists.neo4j.org
>https://lists.neo4j.org/mailman/listinfo/user

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


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

2011-09-28 Thread Marko Rodriguez
Hey,

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

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

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

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

HTH,
Marko.

http://markorodriguez.com

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

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

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


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

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

Thanks

Michael

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

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

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


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

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

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

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

Best,

Rick

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

Hey guys,

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

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

best regards René

2011/9/28 Mattias Persson 

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

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

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

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

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

best regards René

2011/9/28 Mattias Persson 

> I'm curious to know how you found that old milestone also :) you picked the
> one out of extremely few having some kind of data problems.
>
> Den onsdagen den 28:e september 2011 skrev Chris Gioran<
> chris.gio...@neotechnology.com>:
> > Hi Rene,
> >
> > According to git log, 1,4.M04 was tagged 10/06/2011, while the fix for
> > a bug in the BatchInserterImpl that caused corrupted stores which gave
> > the message you are seeing is
> >
> >
>
> https://github.com/neo4j/community/commit/71fbe4ac1174fad16a7bb154c9f78d3f1b377248
> >
> > which has a date of 04/07/2011.
> >
> > This makes 1.4.M06 the earliest release to use that does not have this
> > issue or, even better, go for 1.4.1 which is the latest stable
> > release. Since you are comfortable using milestones, 1.5.M01 might be
> > of interest to you.
> >
> > http://neo4j.org/download has the links that you need.
> >
> > hope that helped,
> > CG
> >
> > 2011/9/28 René Pickhardt :
> >> Neo1.4.M04 community edition no self build.
> >>
> >> 2011/9/28 Mattias Persson 
> >>
> >>> Which version of neo4j did you use to import your data, was it a
> >>> downloadable package, from maven or building yourself from a branch?
> >>>
> >>> 2011/9/28 René Pickhardt 
> >>>
> >>> > hey everyone
> >>> >
> >>> > I got a strange error message that a record is not in use if I call
> >>> > hasRelationship() function even though I checked against null before!
> My
> >>> > real purpose was to start the traverser but it exited with the same
> error
> >>> > message. That is why I put the n.hasRelationship which also would not
> >>> work.
> >>> >
> >>> > I imported a graph with 50 mio. nodes and about the same size of
> >>> > relationships. (though I am about to import more relationships later
> on)
> >>> I
> >>> > put 2 mio. nodes in a lucence index called article.
> >>> >
> >>> > the counting variable t has the value 2385 (so the first 2385 calls
> work
> >>> > fine) if I skip this node the same problem accoures again at t =
> 3239.
> >>> >
> >>> > maybe it is usefull to say that I inserted the graph using the batch
> >>> > inserter.
> >>> >
> >>> > IndexHits res = article.get("key", values[0]);
> >>> > if (res!=null){
> >>> > Node n = res.getSingle();
> >>> >  if (n!=null){
> >>> > if (n.hasRelationship(DynamicRelationshipType.withName( "UPDATE" ),
> >>> > Direction.BOTH)){
> >>> >  //n.traverse(Order.BREADTH_FIRST,StopEvaluator.DEPTH_ONE,
> >>> >
> ReturnableEvaluator.ALL_BUT_START_NODE,DynamicRelationshipType.withName(
> >>> > "UPDATE" ) );
> >>> >  t++;
> >>> > }
> >>> > }
> >>> >
> >>> > callstack:
> >>> >
> >>> > org.neo4j.kernel.impl.nioneo.store.InvalidRecordException:
> >>> Record[1983624]
> >>> > not in useRecord[1983624] not in use
> >>> >
> >>> > at
> >>> >
> >>> >
> >>>
>
> org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.java:230)
> >>> >  at
> >>> >
> >>> >
> >>>
>
> org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:337)
> >>> > at
> >>> >
> >>> >
> >>>
>
> org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:114)
> >>> >  at
> >>> >
> >>> >
> >>>
>
> org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:97)
> >>> > at
> >>> >
> >>> >
> >>>
>
> org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:108)
> >>> >  at
> >>> >
> >>> >
> >>>
>
> org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:603)
> >>> > at
> >>> >
> >>>
> org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:351)
> >>> >  at
> >>> >
> >>> >
> >>>
>
> org.neo4j.kernel.impl.core.NodeImpl.loadInitialRelationships(NodeImpl.java:318)
> >>> > at
> >>> >
> >>> >
> >>>
>
> org.neo4j.kernel.impl.core.NodeImpl.ensureRelationshipMapNotNull(NodeImpl.java:305)
> >>> >  at
> >>> >
> >>> >
> >>>
>
> org.neo4j.kernel.impl.core.NodeImpl.getAllRelationshipsOfType(NodeImpl.java:156)
> >>> > at
> >>> org.neo4j.kernel.impl.core.NodeImpl.getRelationships(NodeImpl.java:236)
> >>> >  at
> >>> org.neo4j.kernel.impl.core.NodeImpl.hasRelationship(NodeImpl.java:576)
> >>> > at
> >>>
> org.neo4j.kernel.impl.core.NodeProxy.hasRelationship(NodeProxy.java:109)
> >>> >  at IndexEvaluation.GenerateStreams(IndexEvaluation.java:124)
> >>> > at IndexEvaluation.(IndexEvaluation.java:98)
> >>> >  at EntryPoint.main(EntryPoint.
>
> --
> Mattias Persson, [matt...@neotechnology.com]
> Hacker, Neo Technology
> www.neotechnology.com
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
--
mobile: +49 (

Re: [Neo4j] threads on embeddedGraphDb

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

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

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

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

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

>
> GTalk:  neubauer.peter
> Skype   peter.neubauer
> Phone   +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter  http://twitter.com/peterneubauer
>
> http://www.neo4j.org   - Your high performance graph database.
> http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
>
> On Wed, Sep 28, 2011 at 2:26 PM, st.pa  wrote:
>>
>> hi,
>>
>> while i was not trying to use threads, everything went fine. now i need
>> concurrent java threads to access the same (embedded?) graph database.
>> neo4j-manual.pdf for 1.4.1 says in section 1.1.2. that i should use
>> HighlyAvailableGraphDatabase, which is no longer there in 1.5.1 as it
>> seems. i have not looked into server and rest api yet, so is there a way
>> to do a threaded app with say a queue thread and n worker threads inside
>> the jvm that all do their own transactions on the same database
>> location? the following exception is what i got for assigning the queue
>> thread's embedded db to the worker threads, i guess.
>>
>> Exception in thread "Thread-6" java.lang.RuntimeException:
>> java.nio.channels.ClosedByInterruptException
>> at
>> org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:603)
>> at
>> org.neo4j.index.impl.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:486)
>> at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:248)
>> at
>> org.neo4j.index.impl.lucene.LuceneIndex$RelationshipIndex.get(LuceneIndex.java:480)
>> at de.stp.DatabaseNeo4j.removeUrlQueue(DatabaseNeo4j.java:777)
>> at de.stp.util.BufferNeo4j.next(BufferNeo4j.java:194)
>> at de.stp.RoboNeo4j.nächsterSchritt(RoboNeo4j.java:452)
>> at de.stp.RoboNeo4j.run(RoboNeo4j.java:436)
>> at java.lang.Thread.run(Thread.java:619)
>> Caused by: java.nio.channels.ClosedByInterruptException
>> at
>> java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:184)
>> at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:772)
>> at
>> org.apache.lucene.store.MMapDirectory$MMapIndexInput.(MMapDirectory.java:225)
>> at
>> org.apache.lucene.store.MMapDirectory$MMapIndexInput.(MMapDirectory.java:217)
>> at org.apache.lucene.store.MMapDirectory.openInput(MMapDirectory.java:209)
>> at
>> org.apache.lucene.index.CompoundFileReader.(CompoundFileReader.java:66)
>> at
>> org.apache.lucene.index.CompoundFileReader.(CompoundFileReader.java:55)
>> at org.apache.lucene.index.IndexWriter.getFieldInfos(IndexWriter.java:1193)
>> at
>> org.apache.lucene.index.IndexWriter.getCurrentFieldInfos(IndexWriter.java:1213)
>> at org.apache.lucene.index.IndexWriter.(IndexWriter.java:1149)
>> at
>> org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:590)
>> ... 8 more
>>
>> Thx for any ideas.
>> ciao, st.p.
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>

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


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

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

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

I have the following in my application context:














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

Thanks,

Toby.

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


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

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

Den onsdagen den 28:e september 2011 skrev Chris Gioran<
chris.gio...@neotechnology.com>:
> Hi Rene,
>
> According to git log, 1,4.M04 was tagged 10/06/2011, while the fix for
> a bug in the BatchInserterImpl that caused corrupted stores which gave
> the message you are seeing is
>
>
https://github.com/neo4j/community/commit/71fbe4ac1174fad16a7bb154c9f78d3f1b377248
>
> which has a date of 04/07/2011.
>
> This makes 1.4.M06 the earliest release to use that does not have this
> issue or, even better, go for 1.4.1 which is the latest stable
> release. Since you are comfortable using milestones, 1.5.M01 might be
> of interest to you.
>
> http://neo4j.org/download has the links that you need.
>
> hope that helped,
> CG
>
> 2011/9/28 René Pickhardt :
>> Neo1.4.M04 community edition no self build.
>>
>> 2011/9/28 Mattias Persson 
>>
>>> Which version of neo4j did you use to import your data, was it a
>>> downloadable package, from maven or building yourself from a branch?
>>>
>>> 2011/9/28 René Pickhardt 
>>>
>>> > hey everyone
>>> >
>>> > I got a strange error message that a record is not in use if I call
>>> > hasRelationship() function even though I checked against null before!
My
>>> > real purpose was to start the traverser but it exited with the same
error
>>> > message. That is why I put the n.hasRelationship which also would not
>>> work.
>>> >
>>> > I imported a graph with 50 mio. nodes and about the same size of
>>> > relationships. (though I am about to import more relationships later
on)
>>> I
>>> > put 2 mio. nodes in a lucence index called article.
>>> >
>>> > the counting variable t has the value 2385 (so the first 2385 calls
work
>>> > fine) if I skip this node the same problem accoures again at t = 3239.
>>> >
>>> > maybe it is usefull to say that I inserted the graph using the batch
>>> > inserter.
>>> >
>>> > IndexHits res = article.get("key", values[0]);
>>> > if (res!=null){
>>> > Node n = res.getSingle();
>>> >  if (n!=null){
>>> > if (n.hasRelationship(DynamicRelationshipType.withName( "UPDATE" ),
>>> > Direction.BOTH)){
>>> >  //n.traverse(Order.BREADTH_FIRST,StopEvaluator.DEPTH_ONE,
>>> >
ReturnableEvaluator.ALL_BUT_START_NODE,DynamicRelationshipType.withName(
>>> > "UPDATE" ) );
>>> >  t++;
>>> > }
>>> > }
>>> >
>>> > callstack:
>>> >
>>> > org.neo4j.kernel.impl.nioneo.store.InvalidRecordException:
>>> Record[1983624]
>>> > not in useRecord[1983624] not in use
>>> >
>>> > at
>>> >
>>> >
>>>
org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.java:230)
>>> >  at
>>> >
>>> >
>>>
org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:337)
>>> > at
>>> >
>>> >
>>>
org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:114)
>>> >  at
>>> >
>>> >
>>>
org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:97)
>>> > at
>>> >
>>> >
>>>
org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:108)
>>> >  at
>>> >
>>> >
>>>
org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:603)
>>> > at
>>> >
>>>
org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:351)
>>> >  at
>>> >
>>> >
>>>
org.neo4j.kernel.impl.core.NodeImpl.loadInitialRelationships(NodeImpl.java:318)
>>> > at
>>> >
>>> >
>>>
org.neo4j.kernel.impl.core.NodeImpl.ensureRelationshipMapNotNull(NodeImpl.java:305)
>>> >  at
>>> >
>>> >
>>>
org.neo4j.kernel.impl.core.NodeImpl.getAllRelationshipsOfType(NodeImpl.java:156)
>>> > at
>>> org.neo4j.kernel.impl.core.NodeImpl.getRelationships(NodeImpl.java:236)
>>> >  at
>>> org.neo4j.kernel.impl.core.NodeImpl.hasRelationship(NodeImpl.java:576)
>>> > at
>>> org.neo4j.kernel.impl.core.NodeProxy.hasRelationship(NodeProxy.java:109)
>>> >  at IndexEvaluation.GenerateStreams(IndexEvaluation.java:124)
>>> > at IndexEvaluation.(IndexEvaluation.java:98)
>>> >  at EntryPoint.main(EntryPoint.

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


Re: [Neo4j] Forward slashes in index values

2011-09-28 Thread Jim Webber
Hi Tatham,

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

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

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

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

Jim

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


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

2011-09-28 Thread Chris Gioran
Hi Rene,

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

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

which has a date of 04/07/2011.

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

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

hope that helped,
CG

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


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

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

On Sep 28, 2011, at 9:03 AM, "René Pickhardt"  
wrote:

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


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

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

2011/9/28 Mattias Persson 

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



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

Skype: +49 (0)6131 / 4958926

Skype: rene.pickhardt

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


Re: [Neo4j] Concerning getting all nodes after a traversal

2011-09-28 Thread Mattias Persson
Traversing the entire graph doesn't scale, of course. You want to traverse
from a some starting point in the graph and out to nodes/relationships in
its vicinity (one or many hops away). That is always fast irregardless of
the size of the entire graph, that's the power of the graph model. If you
give more information about what you're trying to solve it would be easier
to try to answer and help you out.

Best,
Mattias

2011/9/28 Michael Hunger 

> Dan about how many nodes as traversal result are we talking here?
>
> You said you have one type of relationship. How many relationships do you
> have per node pointing to other nodes (outgoing) and incoming (min, max, avg
> or distribution) ?
>
> How many steps does your traversal go?
>
> And what is the usecase behind it? So that we can understand your graph
> model and the operations you'd like to perform.
>
> Perhaps you could also share (privately) a graph generator that would
> create a graph as yours. Then we could run some performance tests of our
> own.
>
> Cheers
>
> Michael
>
> Am 27.09.2011 um 23:17 schrieb Daniel Morozoff:
>
> > Hi Michael,
> >
> > Sure we may move it to the mailing list.
> >
> > We have single nodes connected with one type of relationship. We are
> running cold cache but using an indexing mechanism to find start node (which
> we have only one). We also implemented a stop evaluator running on a depth
> protocol and it is working - so I believe we are traversing the exact amount
> we need.
> >
> > Does neo4j support loading an entire db into memory btw?
> >
> > The reason I asked of blackray, is b/c we need the capability to receive
> close to instantaneous responses on a web query. So we will need to run the
> calculation the back end before exposing it to the front end.
> >
> > Regards,
> >
> > Dan
> >
> >
> >
> >
> > On Tue, Sep 27, 2011 at 1:39 PM, Michael Hunger <
> michael.hun...@neotechnology.com> wrote:
> > Can we take this to the mailing list ?
> >
> > After all what is your usecase?
> >
> > What is the structure of your graph, what your starting nodes, etc.
> > Do you have cold or hot caches.
> >
> > I think probably the traverser is not limiting to the right set and
> traverses too much of the graph.
> >
> > Cheers
> >
> > Michael
> >
> > Am 27.09.2011 um 20:41 schrieb Peter Neubauer:
> >
> >> Daniel,
> >> I think Michael has been testing some with these setups...
> >>
> >> /peter
> >>
> >> Sent from my phone.
> >>
> >> On Sep 27, 2011 6:21 PM, "Daniel Morozoff" 
> wrote:
> >> > Hi Peter,
> >> >
> >> > Thanks for your response. Makes total sense! Can you recommend any in
> memory
> >> > DBs like blackray that work well with neo4j and java?
> >> >
> >> > Thanks,
> >> >
> >> > Dan
> >> >
> >> > On Tue, Sep 27, 2011 at 12:26 AM, Peter Neubauer <
> >> > peter.neuba...@neotechnology.com> wrote:
> >> >
> >> >> Daniel,
> >> >> remember that the traversals are lazy, so nothing is traversed until
> >> >> you actually iterate. Is that explaining the difference? Also, try
> >> >> running the code several times, and the caches and the JVM will help
> >> >> to bring times down compared to cold runs.
> >> >>
> >> >> HTH,
> >> >>
> >> >> Cheers,
> >> >>
> >> >> /peter neubauer
> >> >>
> >> >> GTalk: neubauer.peter
> >> >> Skype peter.neubauer
> >> >> Phone +46 704 106975
> >> >> LinkedIn http://www.linkedin.com/in/neubauer
> >> >> Twitter http://twitter.com/peterneubauer
> >> >>
> >> >> http://www.neo4j.org - Your high performance graph database.
> >> >> http://startupbootcamp.org/ - Öresund - Innovation happens HERE.
> >> >> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing
> party.
> >> >>
> >> >>
> >> >>
> >> >> On Mon, Sep 26, 2011 at 9:54 PM,  wrote:
> >> >> > Hi Peter,
> >> >> >
> >> >> > I know you are one of the admins for the forums and I was wondering
> if
> >> >> you could assist me with my question. I posted it already on the
> forum, but
> >> >> have not received a response.
> >> >> >
> >> >> > My question pertains to running the getAllNodes() method on a
> Traverser
> >> >> object. It takes drastically longer to get all nodes than to traverse
> them.
> >> >> >
> >> >> > I assumed it was a indexing issue and decompiled the kernel lib
> file, but
> >> >> could not find where the indexing was occurring (as it was not in the
> >> >> Traverser class).
> >> >> >
> >> >> > Could you give me some input, as we are attempting to optimize our
> >> >> algorithms, but 95% of the speed comes from this one method.
> >> >> >
> >> >> > Here is a copy of my post:
> >> >> >
> >> >> > For your reference the size of the DB is ~6.8 Gb
> >> >> > 
> >> >> >
> >> >> > long startTime = System.currentTimeMillis();
> >> >> > Traverser treeTraverser = root.traverse(
> >> >> > Traverser.Order.BREADTH_FIRST,
> >> >> > operator.getStopEvaluator(),
> >> >> > ReturnableEvaluator.ALL,
> >> >> > relationshipType,
> >> >> > Direction.OUTGOING);
> >> >> >
> >> >> > long endTime = System.c

Re: [Neo4j] threads on embeddedGraphDb

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

2011/9/28 st.pa 

>
> hi,
>
> while i was not trying to use threads, everything went fine. now i need
> concurrent java threads to access the same (embedded?) graph database.
> neo4j-manual.pdf for 1.4.1 says in section 1.1.2. that i should use
> HighlyAvailableGraphDatabase, which is no longer there in 1.5.1 as it
> seems. i have not looked into server and rest api yet, so is there a way
> to do a threaded app with say a queue thread and n worker threads inside
> the jvm that all do their own transactions on the same database
> location? the following exception is what i got for assigning the queue
> thread's embedded db to the worker threads, i guess.
>
> Exception in thread "Thread-6" java.lang.RuntimeException:
> java.nio.channels.ClosedByInterruptException
> at
>
> org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:603)
> at
>
> org.neo4j.index.impl.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:486)
> at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:248)
> at
>
> org.neo4j.index.impl.lucene.LuceneIndex$RelationshipIndex.get(LuceneIndex.java:480)
> at de.stp.DatabaseNeo4j.removeUrlQueue(DatabaseNeo4j.java:777)
> at de.stp.util.BufferNeo4j.next(BufferNeo4j.java:194)
> at de.stp.RoboNeo4j.nächsterSchritt(RoboNeo4j.java:452)
> at de.stp.RoboNeo4j.run(RoboNeo4j.java:436)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: java.nio.channels.ClosedByInterruptException
> at
>
> java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:184)
> at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:772)
> at
>
> org.apache.lucene.store.MMapDirectory$MMapIndexInput.(MMapDirectory.java:225)
> at
>
> org.apache.lucene.store.MMapDirectory$MMapIndexInput.(MMapDirectory.java:217)
> at org.apache.lucene.store.MMapDirectory.openInput(MMapDirectory.java:209)
> at
>
> org.apache.lucene.index.CompoundFileReader.(CompoundFileReader.java:66)
> at
>
> org.apache.lucene.index.CompoundFileReader.(CompoundFileReader.java:55)
> at org.apache.lucene.index.IndexWriter.getFieldInfos(IndexWriter.java:1193)
> at
>
> org.apache.lucene.index.IndexWriter.getCurrentFieldInfos(IndexWriter.java:1213)
> at org.apache.lucene.index.IndexWriter.(IndexWriter.java:1149)
> at
>
> org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:590)
>... 8 more
>
> Thx for any ideas.
> ciao, st.p.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



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


Re: [Neo4j] threads on embeddedGraphDb

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

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

Cheers,

/peter neubauer

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

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



On Wed, Sep 28, 2011 at 2:26 PM, st.pa  wrote:
>
> hi,
>
> while i was not trying to use threads, everything went fine. now i need
> concurrent java threads to access the same (embedded?) graph database.
> neo4j-manual.pdf for 1.4.1 says in section 1.1.2. that i should use
> HighlyAvailableGraphDatabase, which is no longer there in 1.5.1 as it
> seems. i have not looked into server and rest api yet, so is there a way
> to do a threaded app with say a queue thread and n worker threads inside
> the jvm that all do their own transactions on the same database
> location? the following exception is what i got for assigning the queue
> thread's embedded db to the worker threads, i guess.
>
> Exception in thread "Thread-6" java.lang.RuntimeException:
> java.nio.channels.ClosedByInterruptException
> at
> org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:603)
> at
> org.neo4j.index.impl.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:486)
> at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:248)
> at
> org.neo4j.index.impl.lucene.LuceneIndex$RelationshipIndex.get(LuceneIndex.java:480)
> at de.stp.DatabaseNeo4j.removeUrlQueue(DatabaseNeo4j.java:777)
> at de.stp.util.BufferNeo4j.next(BufferNeo4j.java:194)
> at de.stp.RoboNeo4j.nächsterSchritt(RoboNeo4j.java:452)
> at de.stp.RoboNeo4j.run(RoboNeo4j.java:436)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: java.nio.channels.ClosedByInterruptException
> at
> java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:184)
> at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:772)
> at
> org.apache.lucene.store.MMapDirectory$MMapIndexInput.(MMapDirectory.java:225)
> at
> org.apache.lucene.store.MMapDirectory$MMapIndexInput.(MMapDirectory.java:217)
> at org.apache.lucene.store.MMapDirectory.openInput(MMapDirectory.java:209)
> at
> org.apache.lucene.index.CompoundFileReader.(CompoundFileReader.java:66)
> at
> org.apache.lucene.index.CompoundFileReader.(CompoundFileReader.java:55)
> at org.apache.lucene.index.IndexWriter.getFieldInfos(IndexWriter.java:1193)
> at
> org.apache.lucene.index.IndexWriter.getCurrentFieldInfos(IndexWriter.java:1213)
> at org.apache.lucene.index.IndexWriter.(IndexWriter.java:1149)
> at
> org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:590)
>        ... 8 more
>
> Thx for any ideas.
> ciao, st.p.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] RBAC implementation using neo4j

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

-Dharmendra.

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

> Dharmendra,
> does something like
>
> http://docs.neo4j.org/chunked/snapshot/examples-acl-structures-in-graphs.html
> point you in the right direction?
>
> Cheers,
>
> /peter neubauer
>
> GTalk:  neubauer.peter
> Skype   peter.neubauer
> Phone   +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter  http://twitter.com/peterneubauer
>
> http://www.neo4j.org   - Your high performance graph database.
> http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
>
> On Wed, Sep 28, 2011 at 11:57 AM, Dharmendra Kumar
>  wrote:
> > Hi All,
> >
> > Was little curious if there is already any RBAC implementation using
> neo4j?
> > Any pointers/links would be really helpful.
> >
> > Regards,
> > Dharmendra.
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] RBAC implementation using neo4j

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

Cheers,

/peter neubauer

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

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



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


[Neo4j] threads on embeddedGraphDb

2011-09-28 Thread st.pa

hi,

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

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

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


Re: [Neo4j] Current Geoserver integration instructions

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

Cheers,

/peter neubauer

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

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



On Wed, Sep 28, 2011 at 11:58 AM, handloomweaver  wrote:
> Hi
>
> Another install question. I was wanting to test Neo4J as a backend for
> Geoserver. The Neo4J Spatial docs at:
> seem a little out of date. They say copy "..the following JAR files into the
> in the GeoServer directory webapps/geoserver/WEB-INF/lib:
>
> json-simple-1.1.jar
> geronimo-jta_1.1_spec-1.1.1.jar
> neo4j-kernel-1.2-1.2.M04.jar
> neo4j-index-1.2-1.2.M04.jar
> neo4j-spatial.jar
>
> These file names have obviously changed, well the bottom three certainly.
> And neo4j-index seems to have been deprecated, 'Changes.txt' says "Excludes
> the neo4j-index component (not used anyhow) to enable HA mode."
>
> Anyway, could someone give me current instructions and filenames and
> locations.
>
> Apologies again for the noobness
>
>
> --
> View this message in context: 
> http://neo4j-community-discussions.438527.n3.nabble.com/Current-Geoserver-integration-instructions-tp3375578p3375578.html
> Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


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

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

2011/9/28 René Pickhardt 

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

2011-09-28 Thread Johan Svensson
On Thu, Sep 22, 2011 at 2:15 PM, st3ven  wrote:
>
> Hi Johan,
>
> I changed the settings as you described, but that changed the speed not
> really significantly.

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

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

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

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

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

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


[Neo4j] Current Geoserver integration instructions

2011-09-28 Thread handloomweaver
Hi

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

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

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

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

Apologies again for the noobness


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


[Neo4j] RBAC implementation using neo4j

2011-09-28 Thread Dharmendra Kumar
Hi All,

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

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


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

2011-09-28 Thread René Pickhardt
hey everyone

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

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

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

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

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

callstack:

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

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

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

Skype: +49 (0)6131 / 4958926

Skype: rene.pickhardt

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


Re: [Neo4j] cypher variable relationships

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

Cheers,

/peter neubauer

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

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



On Wed, Sep 28, 2011 at 10:33 AM, F. De Haes  wrote:
> Hi Michael,
>
> I'm not using the latest snapshot but neo4j-community-1.5.M01, and neither *
> or ^ work there. I thought maybe it was because my relationship contains a
> blank space and thus is within ``. Anyway, it's not a big deal at the
> moment.
>
> Thanks anyway,
> Filip
>
> 2011/9/28 Michael Hunger 
>
>> There was a syntax change in the current snapshot from using the caret ^ to
>> a star *
>>
>> Cheers
>>
>> Michael
>>
>> Am 27.09.2011 um 11:29 schrieb F. De Haes:
>>
>> > Hi all,
>> >
>> > I tried this cypher query both in the console of the stable and in the
>> > milestone release, but it produces the same error:
>> >
>> > start a=(123) match b-[:`Runs on`^1..3]->a return distinct b
>> >
>> > ==> `]' expected but `^' found
>> >
>> > Thanks for your help,
>> >
>> > Filip
>> > ___
>> > Neo4j mailing list
>> > User@lists.neo4j.org
>> > https://lists.neo4j.org/mailman/listinfo/user
>>
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] cypher variable relationships

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

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

Thanks anyway,
Filip

2011/9/28 Michael Hunger 

> There was a syntax change in the current snapshot from using the caret ^ to
> a star *
>
> Cheers
>
> Michael
>
> Am 27.09.2011 um 11:29 schrieb F. De Haes:
>
> > Hi all,
> >
> > I tried this cypher query both in the console of the stable and in the
> > milestone release, but it produces the same error:
> >
> > start a=(123) match b-[:`Runs on`^1..3]->a return distinct b
> >
> > ==> `]' expected but `^' found
> >
> > Thanks for your help,
> >
> > Filip
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] REST API Base URI

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

> Hi Jake,
>
> Thanks for your reply.
>
> Sorry if my previous email was misleading, but I don't absolutely need
> key-based authentication; that just turned out to be the what I first
> thought of. I was trying to figure out what authentication methods were
> supported so that I can evaluate. HTTPS + basic auth with strong passwords
> do sound good to me at this moment. However, at this moment, instead of
> using authentication, I turned out configured security rules on my the
> neo4j
> server to only take connections from my app server so I temporarily don't
> have a problem in the near future. But it's good to know about the
> authentication extension.
>
> By the way, do you have any data about the performance impact of using the
> authentication extension to do basic auth + HTTPS compare to talking to
> neo4j without authentication (both through REST)? If you have such data,
> please let me know. That would be very helpful information.
>

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

/Jake


>
> Thanks,
> Nuo
>
>
>
> On Tue, Sep 27, 2011 at 6:10 AM, Jacob Hansson <
> jacob.hans...@neotechnology.com> wrote:
>
> > As far as I know, the auth plugin currently only supports HTTP BASIC
> > authentication. But it would be interesting to expand it to allow other
> > authentication methods, for instance by allowing pluggable authentication
> > providers.
> >
> > So if I understand your question correctly, yes, it does support
> > authentication beyond just limiting access by IP, but it does not support
> > authentication using keys or certificates.
> >
> > Out of curiosity, what is the driver behind needing key-based
> > authentication? The combination of HTTP BASIC, strong passwords and HTTPS
> > seems like it would supply quite strong security, no?
> >
> > /Jake
> >
> > On Wed, Sep 21, 2011 at 9:16 PM, Nuo Yan  wrote:
> >
> > > Limiting access to certain URIs or IPs is great, but ideally at this
> > moment
> > > I also need something like a key-based authentication so I can send a
> > > private key in the headers from my restclient and neo4j would
> > authenticate
> > > and only take authenticated requests. Does the authentication extension
> > > support key-based authentication? If not, what forms of authentication
> > does
> > > it currently support (user/password, token-based, shared-secret)?
> > >
> > > Thanks,
> > > Nuo
> > >
> > > On Wed, Sep 21, 2011 at 11:24 AM, Peter Neubauer <
> > > peter.neuba...@neotechnology.com> wrote:
> > >
> > > > Nuo,
> > > > Thomas Baum has been working on an authentication extension for Neo4j
> > > > Server, see https://github.com/neo4j/authentication-extension. He
> > > > could help you set it up and test it - it's used in hosting scenarios
> > > > and should do what you want in terms of limiting access to certain
> > > > URIs if that is what you want?
> > > >
> > > > Cheers,
> > > >
> > > > /peter neubauer
> > > >
> > > > GTalk:  neubauer.peter
> > > > Skype   peter.neubauer
> > > > Phone   +46 704 106975
> > > > LinkedIn   http://www.linkedin.com/in/neubauer
> > > > Twitter  http://twitter.com/peterneubauer
> > > >
> > > > http://www.neo4j.org   - Your high performance graph
> > > database.
> > > > http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> > > > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing
> > party.
> > > >
> > > >
> > > >
> > > > On Wed, Sep 21, 2011 at 6:14 PM, Nuo Yan  wrote:
> > > > > For my scenario, I currently only use the LB for request
> > > authentication,
> > > > so
> > > > > that not everyone on the network can access the neo4j server. In my
> > use
> > > > > case, I think making the base uri configurable (including the
> > protocol,
> > > > e.g.
> > > > > https://foobar.com/) is enough.
> > > > >
> > > > > There are a couple other approaches that may also solve my problem.
> > For
> > > > > example, having a configurable option to make the REST APIs return
> > only
> > > > > relative paths in the result. Or, if neo4j could have a built-in
> > > request
> > > > > authentication mechanism for the REST interface, I may be able to
> get
> > > rid
> > > > of
> > > > > the lb completely.
> > > > >
> > > > >
> > > > > On Wed, Sep 21, 2011 at 7:04 AM, Peter Neubauer <
> > > > > peter.neuba...@neotechnology.com> wrote:
> > > > >
> > > > >> Nuo,
> > > > >> right now the server is discovering its own IP upon startup.
> > However,
> > > > >> it sounds reasonable to return configurable base URL. I am just
> > > > >> wondering if that really is enough to support a LB scenario? Do
> you
> > > > >> need more stuff there?
> > > > >>
> > > > >> Cheers,
> > > > >>
> > > > >> /peter neubauer
> > > > >>
> > > > >> GTalk:  neubauer.

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

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

Cheers,

/peter neubauer

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

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



On Sat, Sep 3, 2011 at 12:33 AM, Benjamin Gustafsson
 wrote:
> Just in case there are any graph experts out there that want to exercise
> their brains. (Its quite a while since I studied algorithms and optimization
> regarding graphs. :-)
>
> I'm able to implement a algorithm described in pseudocode (if anyone knows a
> good algorithm for my special case below).
>
> I have the transportation problem and need to find a preferably small (not
> necessarily smallest) set of nodes that transports a certain amount of
> credit/commodity from source node S to sink node T. All edges have a
> capacity stated as a attribute for the edge, this can be read while
> traversing the graph. Transportation cost for commodity/credit in the graph
> is zero. The only cost in this graph problem is computation time to *find a
> set of paths delivering all the commodity*(in my case credit). The path
> lengths chosen are not important.
>
> (This is the standard ripplepay problem, but I didn't like the algorithms
> used by the original ripplepay implementation. It does not scale up to
> millions of users. It is not fast enough.)
>
> http://en.wikipedia.org/wiki/Transportation_network_%28graph_theory%29
>
> And I also need a quick way of analysing if it is possible to send all
> commodity across the network. If the amount commodity to be sent is lower
> than max flow. (lower than min cut). There will initially be clusters with
> very few edges connecting the clusters. If the nodes are in different
> clusters the min cut can be really easy/*quick* to find (if we do it the
> right way).
>
> http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem
>
> Any implementations for neo4j already available regarding my special case?
>
> --
> //Benjamin Gustafsson
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Rebuilding Lucene index

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

Cheers,

/peter neubauer

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

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



On Fri, Sep 23, 2011 at 1:16 AM, Rama Manusama  wrote:
> Hi all,
>
> Would like to confirm that the problem got somewhat solved after it tried to
> perform CheckIndex -fix on every lucene index folder. Unfortunately I could
> not investigate which 'corrupted' index did the tool delete, therefore a
> 'complete' index rebuilding would be a good last option in this case. Anyway
> knowing that such tool exist is already a big step ahead.
>
> Thanks for everything!
> Rama
>
>
>
>
>
>
> On Mon, Sep 19, 2011 at 1:59 AM, Rama Manusama wrote:
>
>> No problem, you could download it here
>> https://docs.google.com/leaf?id=0B4qYoS7piZ7PNDdhNzkzMWEtMWMyYS00MWNmLWI3YzktYjFiZjllMzk0MzA2&hl=en_US
>>
>> Thanks,
>> Rama
>>
>>
>> On Mon, Sep 19, 2011 at 12:32 AM, Michael Hunger <
>> michael.hun...@neotechnology.com> wrote:
>>
>>> Sorry the mailing list eats attachments, can you copy it in the mail or
>>> make it available somewhere?
>>>
>>> Thanks
>>>
>>> Michael
>>>
>>> Am 18.09.2011 um 23:32 schrieb Rama Manusama:
>>>
>>> > True, I reproduced the error again just now, messages.log is attached
>>> >
>>> > Thanks and cheers,
>>> > Rama
>>> >
>>> > On Sun, Sep 18, 2011 at 11:14 PM, Mattias Persson <
>>> matt...@neotechnology.com
>>> >> wrote:
>>> >
>>> >> I'm guessing the important stack trace regarding the loading of the
>>> lucene
>>> >> index provider is found in /messages.log. Could you
>>> go
>>> >> look there?
>>> >>
>>> >> 2011/9/18 Rama Manusama 
>>> >>
>>> >>> Hi Michael,
>>> >>>
>>> >>> Sure, here you go, thanks!
>>> >>>
>>> >>> Sep 18, 2011 9:37:39 PM
>>> org.neo4j.kernel.impl.transaction.TransactionImpl
>>> >>> doBeforeCompletion
>>> >>> WARNING: Caught exception from tx
>>> >>>
>>> >>>
>>> >>
>>> syncronization[org.neo4j.kernel.impl.core.TransactionEventsSyncHook@1531a989
>>> >>> ]
>>> >>> beforeCompletion()
>>> >>> java.lang.RuntimeException: org.jruby.exceptions.RaiseException:
>>> Native
>>> >>> Exception: 'class java.lang.IllegalArgumentException'; Message: No
>>> index
>>> >>> provider 'lucene' found; StackTrace:
>>> java.lang.IllegalArgumentException:
>>> >> No
>>> >>> index provider 'lucene' found
>>> >>>   at
>>> >>>
>>> >>>
>>> >>
>>> org.neo4j.kernel.IndexManagerImpl.getIndexProvider(IndexManagerImpl.java:76)
>>> >>>   at
>>> >>>
>>> >>>
>>> >>
>>> org.neo4j.kernel.IndexManagerImpl.findIndexConfig(IndexManagerImpl.java:116)
>>> >>>   at
>>> >>>
>>> >>>
>>> >>
>>> org.neo4j.kernel.IndexManagerImpl.getOrCreateIndexConfig(IndexManagerImpl.java:178)
>>> >>>   at
>>> >>>
>>> >>>
>>> >>
>>> org.neo4j.kernel.IndexManagerImpl.getOrCreateNodeIndex(IndexManagerImpl.java:267)
>>> >>>   at
>>> >> org.neo4j.kernel.IndexManagerImpl.forNodes(IndexManagerImpl.java:255)
>>> >>>
>>> >>>    at
>>> >>>
>>> >>>
>>> >>
>>> org.neo4j.kernel.impl.core.TransactionEventsSyncHook.beforeCompletion(TransactionEventsSyncHook.java:95)
>>> >>>   at
>>> >>>
>>> >>>
>>> >>
>>> org.neo4j.kernel.impl.transaction.TransactionImpl.doBeforeCompletion(TransactionImpl.java:356)
>>> >>>   at
>>> >>> org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:635)
>>> >>>   at
>>> >>>
>>> >>>
>>> >>
>>> org.neo4j.kernel.impl.transaction.TransactionImpl.commit(TransactionImpl.java:109)
>>> >>>   at
>>> >>>
>>> org.neo4j.kernel.TopLevelTransaction.finish(TopLevelTransaction.java:85)
>>> >>>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> >>>   at
>>> >>>
>>> >>>
>>> >>
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>> >>>   at
>>> >>>
>>> >>>
>>> >>
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>> >>>   at java.lang.reflect.Method.invoke(Method.java:616)
>>> >>>   at
>>> >>>
>>> >>>
>>> >>
>>> org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:508)
>>> >>>   at
>>> org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:368)
>>> >>>   at
>>> >>>
>>> >>>
>>> >>
>>> org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:50)
>>> >>>   at
>>> >>>
>>> >>>
>>> >>
>>> org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:292)
>>> >>>   at
>>> >>>
>>> org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:135)
>>> >>>   at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:63)
>>> >>>   at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
>>> >>>   at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
>>> >>>   at
>>> >>>
>>> >>
>>> org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTIn