Titan, Gremlin and console logging.

895 views
Skip to first unread message

Renato Perini

unread,
Jun 30, 2016, 5:28:54 AM6/30/16
to Aurelius
Just trying out Titan:db for the first time, using the provided Gremlin console.
I want to try it using an Apache Cassandra storage backend. So, what I do is:

1) I launch a Cassandra instance.
2) I enable the thrift protocol (nodetool enablethrift) on the launched instance.
3) I start the Gremlin console.
4) I open the Cassandra connection using the following string in the Gremlin console:

graph = TitanFactory.open('conf/titan-cassandra.properties')

The connection start and Titan connects to the Cassandra instance.
The problem is that the Gremlin console becomes unusable because of excessive console logging (DEBUG) about Cassandra transactions:

00:44:28.841 [pool-4-thread-1] DEBUG c.t.t.d.c.CassandraTransaction - Created CassandraTransaction@77087b22[read=QUORUM,write=QUORUM]
00:44:33.848 [pool-4-thread-1] DEBUG c.t.t.d.c.CassandraTransaction - Created CassandraTransaction@320afba7[read=QUORUM,write=QUORUM]
00:44:38.852 [pool-4-thread-1] DEBUG c.t.t.d.c.CassandraTransaction - Created CassandraTransaction@4f050f34[read=QUORUM,write=QUORUM]
00:44:43.859 [pool-4-thread-1] DEBUG c.t.t.d.c.CassandraTransaction - Created CassandraTransaction@372ac59[read=QUORUM,write=QUORUM]
00:44:48.867 [pool-4-thread-1] DEBUG c.t.t.d.c.CassandraTransaction - Created CassandraTransaction@3797067e[read=QUORUM,write=QUORUM]

and continuing every 5 seconds for the eternity.

I want to disable this large amount of console logging, but I can't find any suitable to do it (I just don't know which config file to use to configure this).
The log4j-console.properties seems to be not effective.

Any advice?

Thank you.

Jason Plurad

unread,
Jun 30, 2016, 4:41:57 PM6/30/16
to Aurelius
What's your platform? Windows? If so, you should try out the latest gremlin.bat and gremlin-server.bat from https://github.com/thinkaurelius/titan/blob/titan11/titan-dist/src/assembly/static/bin/

This problem occurs if the classpath order is incorrect. slf4j needs to come before logback.

-- Jason

manish kumar

unread,
Aug 1, 2016, 2:59:04 PM8/1/16
to Aurelius
I am using ubuntu. In my pom.xml file i am just using titan-all1.0.0 not using slf4j . So where should i maintain the order ?

Jason Plurad

unread,
Aug 1, 2016, 4:59:22 PM8/1/16
to Aurelius
I thought you were talking about Gremlin Console on the other thread...

If you're running your own Java project, keep an eye on your depedency tree (mvn dependency:tree) for logback somehow sneaking ahead of slf4j. With this barebones config, I'm able to run a simple Titan-Cassandra program without getting excessive debugging.

    <properties>
       
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
       
<titan.version>1.0.0</titan.version>
   
</properties>
   
<dependencies>
       
<dependency>
           
<groupId>com.thinkaurelius.titan</groupId>
           
<artifactId>titan-core</artifactId>
           
<version>${titan.version}</version>
       
</dependency>
       
<dependency>
           
<groupId>com.thinkaurelius.titan</groupId>
           
<artifactId>titan-cassandra</artifactId>
           
<version>${titan.version}</version>
       
</dependency>
   
</dependencies>

Another alternative that Effy suggested -- using a logback.xml -- is also noted on this issue https://github.com/thinkaurelius/titan/issues/1242

-- Jason
Reply all
Reply to author
Forward
0 new messages