Switching to 0.5.0 is creating lots of problem

187 views
Skip to first unread message

ravi kumar

unread,
Aug 27, 2014, 8:06:28 AM8/27/14
to aureliu...@googlegroups.com
I started using Titan 0.5.0,cassandra : 2.0.9, ES 1.2.1 and dependency


<dependency>
   <groupId>com.thinkaurelius.titan</groupId>
   <artifactId>titan-core</artifactId>
   <version>0.5.0</version>
</dependency>
<dependency>
    <groupId>com.thinkaurelius.titan</groupId>
    <artifactId>titan-cassandra</artifactId>
    <version>0.5.0</version>
</dependency>
<dependency>
    <groupId>com.thinkaurelius.titan</groupId>
    <artifactId>titan-all</artifactId>
    <version>0.5.0</version>
</dependency>



 public static void main(String s[])  
 {
     TitanGraph g = TitanFactory.open("titan-0.5.0-hadoop2/conf/titan-cassandra-es.properties");
     g.rollback();
     TitanManagement mgmt = g.getManagementSystem();
     PropertyKey time = mgmt.makePropertyKey("time").dataType(Long.class).make();
     mgmt.commit();
     g.commit();    
     System.out.println("END");
 }
If i run this program it prints "END" but never terminate itself. it keeps running after showing below messages:

0    [main] INFO  org.reflections.Reflections  - Reflections took 5478 ms to scan 233 urls, producing 125 keys and 8318 values
2155 [main] INFO  com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration  - Enabled partitioning
2241 [main] INFO  com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration  - Set default timestamp provider Timestamps[μs]
2251 [main] INFO  com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftStoreManager  - Closed Thrift connection pooler.
2261 [main] INFO  com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration  - Generated unique-instance-id=7f0001015540-manish-Vostro-25201
2275 [main] INFO  com.thinkaurelius.titan.diskstorage.Backend  - Configuring index [search]
2396 [main] INFO  org.elasticsearch.plugins  - [Milan] loaded [], sites []
3159 [main] INFO  com.thinkaurelius.titan.diskstorage.es.ElasticSearchIndex  - Configured remote host: 127.0.0.1 : 9300
4696 [main] INFO  com.thinkaurelius.titan.diskstorage.Backend  - Initiated backend operations thread pool of size 8
9972 [main] INFO  com.thinkaurelius.titan.diskstorage.Backend  - Configuring total store cache size: 166029854
12998 [main] INFO  com.thinkaurelius.titan.diskstorage.log.kcvs.KCVSLog  - Loaded unidentified ReadMarker start time Timepoint[1409140132087000 μs] into com.thinkaurelius.titan.diskstorage.log.kcvs.KCVSLog$MessagePuller@682f63af
END



After terminating this program manualyy if i run this program


 public static void main(String s[])  
 {
     TitanGraph g = TitanFactory.open("titan-0.5.0-hadoop2/conf/titan-cassandra-es.properties");
     g.rollback();
     TitanManagement mgmt = g.getManagementSystem();
     PropertyKey time = mgmt.getPropertyKey("time");
     createIndices(g, mgmt, time);
     mgmt.commit();
     g.commit();    
     System.out.println("END");
 }

    public static void createIndices(TitanGraph g, TitanManagement mgmt, PropertyKey time)
    {
        PropertyKey pkAdsTopVertexProps = mgmt.makePropertyKey("adsTopVertexProps").dataType(String.class).make();
        mgmt.buildIndex("indexAdsTopVertexProps",Vertex.class).addKey(pkAdsTopVertexProps).unique().buildCompositeIndex();
       
        EdgeLabel elUploadedImage = mgmt.makeEdgeLabel(CommonVertexProperty.uploadedImage.toString()).make();
        mgmt.buildEdgeIndex(elUploadedImage,"labelUploadedImage",Direction.OUT,Order.DESC,time);               
       
        Vertex v4 = g.addVertex(null);
        v4.setProperty("adsTopVertexProps", AnantConstants.AdsTopVertexProperty.topSellAdsVertex.toString());     
    }  



it throws :


[exec:exec]
0    [main] INFO  org.reflections.Reflections  - Reflections took 5311 ms to scan 233 urls, producing 125 keys and 8318 values
659  [main] INFO  com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftStoreManager  - Closed Thrift connection pooler.
670  [main] INFO  com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration  - Generated unique-instance-id=7f0001015628-manish-Vostro-25201
684  [main] INFO  com.thinkaurelius.titan.diskstorage.Backend  - Configuring index [search]
815  [main] INFO  org.elasticsearch.plugins  - [Asteroth] loaded [], sites []
1646 [main] INFO  com.thinkaurelius.titan.diskstorage.es.ElasticSearchIndex  - Configured remote host: 127.0.0.1 : 9300
1816 [main] INFO  com.thinkaurelius.titan.diskstorage.Backend  - Initiated backend operations thread pool of size 8
1878 [main] INFO  com.thinkaurelius.titan.diskstorage.Backend  - Configuring total store cache size: 159362432
1994 [main] INFO  com.thinkaurelius.titan.diskstorage.log.kcvs.KCVSLog  - Loaded unidentified ReadMarker start time Timepoint[1409140220249000 μs] into com.thinkaurelius.titan.diskstorage.log.kcvs.KCVSLog$MessagePuller@6f681fbb
4740 [main] ERROR com.thinkaurelius.titan.graphdb.database.StandardTitanGraph  - Could not commit transaction [2] due to storage exception in system-commit
com.thinkaurelius.titan.core.TitanException: Could not execute operation due to backend exception
    at com.thinkaurelius.titan.diskstorage.util.BackendOperation.execute(BackendOperation.java:44)
    at com.thinkaurelius.titan.diskstorage.keycolumnvalue.cache.CacheTransaction.persist(CacheTransaction.java:86)
    at com.thinkaurelius.titan.diskstorage.keycolumnvalue.cache.CacheTransaction.flushInternal(CacheTransaction.java:140)
    at com.thinkaurelius.titan.diskstorage.keycolumnvalue.cache.CacheTransaction.commit(CacheTransaction.java:197)
    at com.thinkaurelius.titan.diskstorage.BackendTransaction.commit(BackendTransaction.java:134)
    at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.commit(StandardTitanGraph.java:599)
    at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx.commit(StandardTitanTx.java:1228)
    at com.thinkaurelius.titan.graphdb.blueprints.TitanBlueprintsGraph.commit(TitanBlueprintsGraph.java:57)
    at com.bulkdata.indices.Main.main(Main.java:43)
Caused by: com.thinkaurelius.titan.diskstorage.locking.PermanentLockingException: Expected value mismatch for KeyColumn [k=0x 16-165-160-114-116- 37- 97-100-115- 84-111-112- 86-101-114-116-101-120- 80-114-111-112-243, c=0x  0]: expected=[] vs actual=[ 12- 80-133] (store=graphindex)
    at com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction.checkSingleExpectedValueUnsafe(ExpectedValueCheckingTransaction.java:272)
    at com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction.access$000(ExpectedValueCheckingTransaction.java:35)
    at com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction$1.call(ExpectedValueCheckingTransaction.java:212)
    at com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction$1.call(ExpectedValueCheckingTransaction.java:209)
    at com.thinkaurelius.titan.diskstorage.util.BackendOperation.executeDirect(BackendOperation.java:56)
    at com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction.checkSingleExpectedValue(ExpectedValueCheckingTransaction.java:209)
    at com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction.checkAllExpectedValues(ExpectedValueCheckingTransaction.java:178)
    at com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction.prepareForMutations(ExpectedValueCheckingTransaction.java:143)
    at com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingStoreManager.mutateMany(ExpectedValueCheckingStoreManager.java:57)
    at com.thinkaurelius.titan.diskstorage.keycolumnvalue.cache.CacheTransaction$1.call(CacheTransaction.java:89)
    at com.thinkaurelius.titan.diskstorage.keycolumnvalue.cache.CacheTransaction$1.call(CacheTransaction.java:86)
    at com.thinkaurelius.titan.diskstorage.util.BackendOperation.executeDirect(BackendOperation.java:56)
    at com.thinkaurelius.titan.diskstorage.util.BackendOperation.execute(BackendOperation.java:42)
    ... 8 more
4744 [main] ERROR com.thinkaurelius.titan.graphdb.database.StandardTitanGraph  - Could not commit transaction [2] due to exception
com.thinkaurelius.titan.core.TitanException: Could not execute operation due to backend exception
    at com.thinkaurelius.titan.diskstorage.util.BackendOperation.execute(BackendOperation.java:44)
    at com.thinkaurelius.titan.diskstorage.keycolumnvalue.cache.CacheTransaction.persist(CacheTransaction.java:86)
    at com.thinkaurelius.titan.diskstorage.keycolumnvalue.cache.CacheTransaction.flushInternal(CacheTransaction.java:140)
    at com.thinkaurelius.titan.diskstorage.keycolumnvalue.cache.CacheTransaction.commit(CacheTransaction.java:197)
    at com.thinkaurelius.titan.diskstorage.BackendTransaction.commit(BackendTransaction.java:134)
    at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.commit(StandardTitanGraph.java:599)
    at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx.commit(StandardTitanTx.java:1228)
    at com.thinkaurelius.titan.graphdb.blueprints.TitanBlueprintsGraph.commit(TitanBlueprintsGraph.java:57)
    at com.bulkdata.indices.Main.main(Main.java:43)
Caused by: com.thinkaurelius.titan.diskstorage.locking.PermanentLockingException: Expected value mismatch for KeyColumn [k=0x 16-165-160-114-116- 37- 97-100-115- 84-111-112- 86-101-114-116-101-120- 80-114-111-112-243, c=0x  0]: expected=[] vs actual=[ 12- 80-133] (store=graphindex)
    at com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction.checkSingleExpectedValueUnsafe(ExpectedValueCheckingTransaction.java:272)
    at com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction.access$000(ExpectedValueCheckingTransaction.java:35)
    at com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction$1.call(ExpectedValueCheckingTransaction.java:212)
    at com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction$1.call(ExpectedValueCheckingTransaction.java:209)
    at com.thinkaurelius.titan.diskstorage.util.BackendOperation.executeDirect(BackendOperation.java:56)
    at com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction.checkSingleExpectedValue(ExpectedValueCheckingTransaction.java:209)
    at com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction.checkAllExpectedValues(ExpectedValueCheckingTransaction.java:178)
    at com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction.prepareForMutations(ExpectedValueCheckingTransaction.java:143)
    at com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingStoreManager.mutateMany(ExpectedValueCheckingStoreManager.java:57)
    at com.thinkaurelius.titan.diskstorage.keycolumnvalue.cache.CacheTransaction$1.call(CacheTransaction.java:89)
    at com.thinkaurelius.titan.diskstorage.keycolumnvalue.cache.CacheTransaction$1.call(CacheTransaction.java:86)
    at com.thinkaurelius.titan.diskstorage.util.BackendOperation.executeDirect(BackendOperation.java:56)
    at com.thinkaurelius.titan.diskstorage.util.BackendOperation.execute(BackendOperation.java:42)

ravi kumar

unread,
Aug 27, 2014, 10:45:38 AM8/27/14
to aureliu...@googlegroups.com
What I found that if I do indexing and adding vertex together its creating problem but if do below:


.....create indexes
mgmt.commit();

......add Vertex
g.commit();

it works doesn't throw error.

Is this how 0.5 works ?

But 1st problem is still there i.e. program doesn't terminate itself

Matthias Broecheler

unread,
Aug 27, 2014, 7:42:56 PM8/27/14
to aureliu...@googlegroups.com
Yes, please note that mgmt is its own transaction - meaning changes made there aren't actually made until it is committed.

You have to shutdown the graph to terminate the database correctly: g.shutdown()


--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/722c21d9-a8e9-4f06-9825-aefd8d54b621%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Matthias Broecheler
http://www.matthiasb.com

ravi kumar

unread,
Aug 27, 2014, 11:35:36 PM8/27/14
to aureliu...@googlegroups.com
Yeah correct. In case of web application i will have to do g.shutdown() only when closing web server right?

Matthias Broecheler

unread,
Aug 28, 2014, 3:34:07 AM8/28/14
to aureliu...@googlegroups.com

Correct.

On Aug 27, 2014 8:44 PM, "ravi kumar" <ravi...@gmail.com> wrote:
Yeah correct. In case of web application i will have to do g.shutdown() only when closing web server right?

--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages