Skip navigation
2015

If you like graph databases, you probably have tried the Gremlin query language.

After some development, you get to a state when you have quite a large database, and need to query it interactively, mainly for the purpose of learning more complex queries and applying them in your app.

 

On various Gremlin docs sites, you can see code like this:

 

gremlin> g = TitanFactory.open('../server/conf/titan-cassandra-es.properties')
==>standardtitangraph[cassandra:[127.0.0.1]]

 

The problem is that Gremlin, as distributed, can't open Titan graph files - it doesn't contain the libs.

So this is what I had to do to make it work.

It's probably not the best way to do it, quite unsystemic, but got me to a working state, so...

 

1) Copy these into gremlin-groovy-2.5.0/lib:

(I just took the newest I had in my local Maven repo.)

  • .m2/repository/com/google/guava/guava/18.0/guava-18.0.jar
  • .m2/repository/com/thinkaurelius/titan/titan-berkeleyje/0.5.4/titan-berkeleyje-0.5.4.jar

2) Then the missing classes were appearantly from Titan, so I downloaded Titan 0.5.4 and copied

  • titan-0.5.4-hadoop2/lib/je-5.0.73.jar

3) And there were more missing classes, so I just copied everything from titan-0.5.4-hadoop2/lib/

and removed those which seemed to duplicating, only other version:

  • commons-io-2.1.jar
  • commons-beanutils-core-1.7.0.jar
  • concurrentlinkedhashmap-lru-1.3.jar
  • guava-15.0.jar
  • netty-3.2.7.Final.jar
  • stax-api-1.0-2.jar

 

Then it started working:

 

$ gremlin
         \,,,/
         (o o)
-----oOOo-(_)-oOOo-----
gremlin> import com.thinkaurelius.titan.core.TitanFactory
...
gremlin> g = TitanFactory.open("target/reportsW2/WebLogicExamples_wldfdemo-wlnav.war-report/graph/TitanConfiguration.properties");
... -> Few exceptions but finally:
==>titangraph[berkeleyje:/home/ondra/work/Migration/WindupCompar1vs2/target/reportsW2/WebLogicExamples_wldfdemo-wlnav.war-report/graph/titangraph]

gremlin> g.has("w:vertextype", "BaseWindupConfiguration")
--> com.thinkaurelius.titan.graphdb.database.StandardTitanGraph cannot be cast to com.tinkerpop.blueprints.Element

gremlin> g.V.has("w:vertextype", "BaseWindupConfiguration")
19:11:34.155 [main] DEBUG c.t.t.g.transaction.StandardTitanTx - Guava vertex cache size: requested=20000 effective=20000 (min=100)
19:11:34.155 [main] DEBUG c.t.t.g.t.v.GuavaVertexCache - Created dirty vertex map with initial size 32
19:11:34.156 [main] DEBUG c.t.t.g.t.v.GuavaVertexCache - Created vertex cache with max size 20000
19:11:34.160 [main] DEBUG c.t.t.g.b.TitanBlueprintsGraph - Created new thread-bound transaction standardtitantx[null]
19:11:34.174 [main] DEBUG c.t.t.g.transaction.StandardTitanTx - Guava vertex cache size: requested=20000 effective=20000 (min=100)
19:11:34.174 [main] DEBUG c.t.t.g.t.v.GuavaVertexCache - Created dirty vertex map with initial size 32
19:11:34.174 [main] DEBUG c.t.t.g.t.v.GuavaVertexCache - Created vertex cache with max size 20000
19:11:34.208 [main] DEBUG c.t.t.g.transaction.StandardTitanTx - Guava vertex cache size: requested=20000 effective=20000 (min=100)
19:11:34.208 [main] DEBUG c.t.t.g.t.v.GuavaVertexCache - Created dirty vertex map with initial size 32
19:11:34.208 [main] DEBUG c.t.t.g.t.v.GuavaVertexCache - Created vertex cache with max size 20000
19:11:34.214 [main] DEBUG c.t.t.g.d.s.kryo.ThreadLocalKryos - [0x41385767] Returning thread-local Kryo com.esotericsoftware.kryo.Kryo@69ee8449
19:11:34.226 [main] DEBUG c.t.t.g.transaction.StandardTitanTx - Guava vertex cache size: requested=20000 effective=20000 (min=100)
19:11:34.227 [main] DEBUG c.t.t.g.t.v.GuavaVertexCache - Created dirty vertex map with initial size 32
19:11:34.227 [main] DEBUG c.t.t.g.t.v.GuavaVertexCache - Created vertex cache with max size 20000
19:11:34.232 [main] DEBUG c.t.t.g.transaction.StandardTitanTx - Guava vertex cache size: requested=20000 effective=20000 (min=100)
19:11:34.232 [main] DEBUG c.t.t.g.t.v.GuavaVertexCache - Created dirty vertex map with initial size 32
19:11:34.232 [main] DEBUG c.t.t.g.t.v.GuavaVertexCache - Created vertex cache with max size 20000
19:11:34.234 [main] DEBUG c.t.t.g.transaction.StandardTitanTx - Guava vertex cache size: requested=20000 effective=20000 (min=100)
19:11:34.234 [main] DEBUG c.t.t.g.t.v.GuavaVertexCache - Created dirty vertex map with initial size 32
19:11:34.234 [main] DEBUG c.t.t.g.t.v.GuavaVertexCache - Created vertex cache with max size 20000
19:11:34.236 [main] DEBUG c.t.t.g.transaction.StandardTitanTx - Guava vertex cache size: requested=20000 effective=20000 (min=100)
19:11:34.237 [main] DEBUG c.t.t.g.t.v.GuavaVertexCache - Created dirty vertex map with initial size 32
19:11:34.237 [main] DEBUG c.t.t.g.t.v.GuavaVertexCache - Created vertex cache with max size 20000
==>v[256]
gremlin> g.V("w:vertextype", "BaseWindupConfiguration")
==>v[256]

 

Enjoy

Windup 2.3.0.Final was released.

 

What's the news?

 

  • In this release, we only included the reviewed rules - targetted mainly for WebSphere and WebLogic.
  • The reviewed rules have more useful information in them, including links that point to Red Hat Knowledge Base and other sources.
  • Thanks to parallelization of the Java analysis, the run time got reduced significantly.

 

Download here.

Stay tuned, soon you'll see a hands-on video by Brad Davis.

 

And - most important of all - if you're going to Red Hat Summit, make sure to attend the Windup presentation!

Hotwire ne.

Hospody - Pit, BuKu, Speak Easy.

Hotely - Days Inn, Extended Stay America - taxi $15.

Red Hat Tower

Vlak do NY

Windup 2.2 was primarily improving performance. That is still a big priority. For Windup 2.3, we also review the existing rules, to be more useful than just saying "this is bad" - we add links to Red Hat knowledge base, javadoc, and more meaningful messages.

 

Another news is that XML rules development should be easier and more smooth. As a side effect of us working on the rules, we see what's the biggest pain to achieve, what's missing, and what's not working. All that should be improved and fixed until the JBoss summit. Also, there's a new XSD for the Java EE app related rules, which will make it easy for your favorite IDE (provided it supports XSD-based XML code completion).

 

Stay tuned!