Janusgraph Hadoop Gremlin gives class cast exception

282 views
Skip to first unread message

hall....@gmail.com

unread,
Oct 24, 2017, 1:25:58 PM10/24/17
to JanusGraph users
I've tried for a while to resolve this by swapping out various libraries but can't seem to do so.
On a brand new install of 0.2.0, I get the following in gremlin...



         
\,,,/
         
(o o)
-----oOOo-(3)-oOOo-----
plugin activated
: janusgraph.imports
plugin activated
: tinkerpop.server
plugin activated
: tinkerpop.utilities
SLF4J
: Class path contains multiple SLF4J bindings.
SLF4J
: Found binding in [jar:file:/opt/janusgraph-0.2.0-hadoop2/lib/slf4j-log4j12-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J
: Found binding in [jar:file:/opt/janusgraph-0.2.0-hadoop2/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J
: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J
: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
10:03:45 WARN  org.apache.hadoop.util.NativeCodeLoader  - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
plugin activated
: tinkerpop.hadoop
plugin activated
: tinkerpop.spark
plugin activated
: tinkerpop.tinkergraph
gremlin
> hdfs
==>storage[DFS[DFSClient[clientName=DFSClient_NONMAPREDUCE_1815516599_1, ugi=someuser (auth:SIMPLE)]]]
gremlin
> hdfs.ls()
org
.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$GetFileInfoRequestProto cannot be cast to com.google.protobuf.Message
Type ':help' or ':h' for help.
Display stack trace? [yN]y
java
.lang.ClassCastException: org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$GetFileInfoRequestProto cannot be cast to com.google.protobuf.Message
...


For a sanity check, I downloaded gremlin-console 3.2.6 and installed hadoop plugin and it works fine...

         \,,,/
         
(o o)
-----oOOo-(3)-oOOo-----
plugin activated
: tinkerpop.server
plugin activated
: tinkerpop.utilities
WARN  org
.apache.hadoop.util.NativeCodeLoader  - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
INFO  org
.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph  - HADOOP_GREMLIN_LIBS is set to:
plugin activated
: tinkerpop.hadoop
plugin activated
: tinkerpop.tinkergraph
gremlin
> hdfs
==>storage[DFS[DFSClient[clientName=DFSClient_NONMAPREDUCE_475546329_1, ugi=someuser (auth:SIMPLE)]]]
gremlin
> hdfs.ls()
==>rwxr-xr-x someuser supergroup 0 (D) data
==>rw-r--r-- someuser supergroup 332226 grateful-dead.kryo
==>rw-r--r-- someuser supergroup 1910 hadoop-grateful-gryo.properties
==>rwxr-xr-x someuser supergroup 0 (D) input
==>rwxr-xr-x someuser supergroup 0 (D) scripts
==>rw-r--r-- someuser supergroup 781 tinkerpop-modern.kryo

I've tried this on a few different environments and get the same result. 

Can someone tell me what I'm missing?

Thanks,
ch.

Jason Plurad

unread,
Oct 30, 2017, 4:13:41 PM10/30/17
to JanusGraph users
Are you using a specific Hadoop distribution? Are you running into issues like this also https://github.com/JanusGraph/janusgraph/issues/674
Reply all
Reply to author
Forward
0 new messages