Question about connecting to HBase

1,883 views
Skip to first unread message

Jerry

unread,
Apr 21, 2017, 8:12:51 AM4/21/17
to JanusGraph users list
Hi ,
Sorry for the repost!
I am new to the JanusGraph and  setup a JanusGraph database  on my cluster .The storage is HBase with Zookeeper as coordinator.

I try to run the GraphOfTheGodsFactory example from IntelliJ Idea. I configure the janusgraph-hbase.properties  as following:

storage.hostname=10.1.1.2,10.1.1.3,10.1.1.4
storage.port=2181

The IP addresses are zookeeper servers.
I run the following codes:

JanusGraph g = JanusGraphFactory.open("/janusgraph/conf/janusgraph-hbase.properties");
load(g);
I get the following error message:

 java.lang.ClassNotFoundException: org.apache.hadoop.hbase.MasterNotRunningException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

but I can connect to the Hbase in gremlin shell with the same conf file.
I know the error message is about the ClassNotFoundException but it seems the JanusGraphFactory cannot connect to Hbase and then reports the MasterNotRunningException after checking the source code 

public final static <T> T instantiate(String clazzname, Object[] constructorArgs, Class[] classes) {
Preconditions.checkArgument(constructorArgs!=null && classes!=null);
Preconditions.checkArgument(constructorArgs.length==classes.length);
try {
Class clazz = Class.forName(clazzname);
Constructor constructor = clazz.getConstructor(classes);
T instance = (T) constructor.newInstance(constructorArgs);
return instance;
} catch (ClassNotFoundException e) {
throw new IllegalArgumentException("Could not find implementation class: " + clazzname, e);
} catch (NoSuchMethodException e) {
throw new IllegalArgumentException("Implementation class does not have required constructor: " + clazzname, e);
} catch (InstantiationException e) {
throw new IllegalArgumentException("Could not instantiate implementation: " + clazzname, e);
} catch (IllegalAccessException e) {
throw new IllegalArgumentException("Could not instantiate implementation: " + clazzname, e);
} catch (InvocationTargetException e) {
throw new IllegalArgumentException("Could not instantiate implementation: " + clazzname, e);
} catch (ClassCastException e) {
throw new IllegalArgumentException("Could not instantiate implementation: " + clazzname, e);
}
}

I wonder if you have any suggestion on solving this problem? 
Thanks in advance!

HadoopMarc

unread,
Apr 23, 2017, 7:11:51 AM4/23/17
to JanusGraph users list
Hi Jerry,

What does your load() function/method look like?

Did you include the janusgraph-hbase dependency in your Intellij project?

Cheers,     Marc

Op vrijdag 21 april 2017 14:12:51 UTC+2 schreef Jerry:

Jerry

unread,
Apr 23, 2017, 10:27:42 PM4/23/17
to JanusGraph users list
Hi Marc,
I use the GraphOfTheGodsFactory example  and the load method is exactly same as the source code.

public static void loadWithoutMixedIndex(final JanusGraph graph, boolean uniqueNameCompositeIndex) {
        load(graph, null, uniqueNameCompositeIndex);
    }

    public static void load(final JanusGraph graph) {
        load(graph, INDEX_NAME, true);
    }

    public static void load(final JanusGraph graph, String mixedIndexName, boolean uniqueNameCompositeIndex) {

Based on the error message, it seems the program stopped at open() function before the load():

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/MasterNotRunningException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.janusgraph.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:56)
at org.janusgraph.diskstorage.Backend.getImplementationClass(Backend.java:480)
at org.janusgraph.diskstorage.Backend.getStorageManager(Backend.java:414)
at org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1343)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:107)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:75)
at org.janusgraph.example.GraphOfTheGodsFactory.main(GraphOfTheGodsFactory.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

Thanks in advance,
Jerry

Jerry

unread,
Apr 23, 2017, 10:31:28 PM4/23/17
to JanusGraph users list
Hi Marc,
I manually add the hbase dependency 
janusgraph-hbase-core-0.2.0-SNAPSHOT.jar
into the project.


On Sunday, April 23, 2017 at 7:11:51 PM UTC+8, HadoopMarc wrote:

HadoopMarc

unread,
Apr 24, 2017, 1:36:14 AM4/24/17
to JanusGraph users list
Hi Jerry,

You need janusgraph:janusgraph-hbase:0.2.0-SNAPSHOT (or maybe better, if you did not change anything in JanusGraph, janusgraph:janusgraph-hbase:0.1.0 which is downloaded from maven central)
Cheers,    Marc

Op maandag 24 april 2017 04:31:28 UTC+2 schreef Jerry:

Jerry

unread,
Apr 24, 2017, 8:21:24 AM4/24/17
to JanusGraph users list
Hi Marc,
Thanks for the suggestion.
I add the package but it reports new error:
20:06:05,756  INFO ZooKeeper:100 - Client environment:java.library.path=/Users/jerry/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
20:06:05,756  INFO ZooKeeper:100 - Client environment:java.io.tmpdir=/var/folders/hw/wxcxpn457ns15d8kf39d8cgm0000gn/T/
20:06:05,756  INFO ZooKeeper:100 - Client environment:java.compiler=<NA>
20:06:05,757  INFO ZooKeeper:100 - Client environment:os.name=Mac OS X
20:06:05,757  INFO ZooKeeper:100 - Client environment:os.arch=x86_64
20:06:05,758  INFO ZooKeeper:100 - Client environment:os.version=10.12.4
20:06:05,758  INFO ZooKeeper:100 - Client environment:user.name=jerry
20:06:05,758  INFO ZooKeeper:100 - Client environment:user.home=/Users/jerry
20:06:05,758  INFO ZooKeeper:100 - Client environment:user.dir=/Users/jerry/Documents/Src/janusgraph
20:06:05,759  INFO ZooKeeper:438 - Initiating client connection, connectString=qaapp:2181 sessionTimeout=90000 watcher=hconnection-0x10683d9d0x0, quorum=qaapp4:2181, baseZNode=/hbase-unsecure
20:06:05,780  INFO ClientCnxn:975 - Opening socket connection to server qaapp/10.0.3.10:2181. Will not attempt to authenticate using SASL (unknown error)
20:06:05,805  INFO ClientCnxn:852 - Socket connection established to qaapp/10.0.3.10:2181, initiating session
20:06:05,817  INFO ClientCnxn:1235 - Session establishment complete on server qaapp/10.0.3.10:2181, sessionid = 0x255d89e07146c15, negotiated timeout = 40000
20:06:05,824  INFO ZooKeeperRegistry:107 - ClusterId read in ZooKeeper is null
20:06:05,896  WARN HBaseStoreManager:405 - Unexpected exception during getDeployment()
java.lang.RuntimeException: org.janusgraph.diskstorage.TemporaryBackendException: Temporary failure in storage backend
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getDeployment(HBaseStoreManager.java:364)
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getFeatures(HBaseStoreManager.java:403)
at org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1344)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:107)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:75)
at org.janusgraph.example.GraphOfTheGodsFactory.main(GraphOfTheGodsFactory.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: org.janusgraph.diskstorage.TemporaryBackendException: Temporary failure in storage backend
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:766)
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getLocalKeyPartition(HBaseStoreManager.java:567)
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getDeployment(HBaseStoreManager.java:361)
... 10 more
Caused by: org.apache.hadoop.hbase.DoNotRetryIOException: java.lang.IllegalAccessError: tried to access method com.google.common.base.Stopwatch.<init>()V from class org.apache.hadoop.hbase.zookeeper.MetaTableLocator
at org.apache.hadoop.hbase.client.RpcRetryingCaller.translateException(RpcRetryingCaller.java:239)
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:212)
at org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:327)
at org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:302)
at org.apache.hadoop.hbase.client.ClientScanner.initializeScannerInConstruction(ClientScanner.java:167)
at org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.java:162)
at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:797)
at org.apache.hadoop.hbase.MetaTableAccessor.fullScan(MetaTableAccessor.java:602)
at org.apache.hadoop.hbase.MetaTableAccessor.tableExists(MetaTableAccessor.java:366)
at org.apache.hadoop.hbase.client.HBaseAdmin.tableExists(HBaseAdmin.java:406)
at org.janusgraph.diskstorage.hbase.HBaseAdmin1_0.tableExists(HBaseAdmin1_0.java:77)
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:760)
... 12 more
Caused by: java.lang.IllegalAccessError: tried to access method com.google.common.base.Stopwatch.<init>()V from class org.apache.hadoop.hbase.zookeeper.MetaTableLocator
at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:604)
at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:588)
at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:561)
at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getMetaRegionLocation(ZooKeeperRegistry.java:61)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateMeta(ConnectionManager.java:1211)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegion(ConnectionManager.java:1178)
at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.getRegionLocations(RpcRetryingCallerWithReadReplicas.java:305)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:156)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:60)
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:210)
... 22 more
20:06:05,898  WARN HBaseStoreManager:405 - Unexpected exception during getDeployment()
java.lang.RuntimeException: org.janusgraph.diskstorage.TemporaryBackendException: Temporary failure in storage backend
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getDeployment(HBaseStoreManager.java:364)
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getFeatures(HBaseStoreManager.java:403)
at org.janusgraph.diskstorage.Backend.getStandaloneGlobalConfiguration(Backend.java:445)
at org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1345)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:107)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:75)
at org.janusgraph.example.GraphOfTheGodsFactory.main(GraphOfTheGodsFactory.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: org.janusgraph.diskstorage.TemporaryBackendException: Temporary failure in storage backend
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:766)
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getLocalKeyPartition(HBaseStoreManager.java:567)
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getDeployment(HBaseStoreManager.java:361)
... 11 more
Caused by: org.apache.hadoop.hbase.DoNotRetryIOException: java.lang.IllegalAccessError: tried to access method com.google.common.base.Stopwatch.<init>()V from class org.apache.hadoop.hbase.zookeeper.MetaTableLocator
at org.apache.hadoop.hbase.client.RpcRetryingCaller.translateException(RpcRetryingCaller.java:239)
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:212)
at org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:327)
at org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:302)
at org.apache.hadoop.hbase.client.ClientScanner.initializeScannerInConstruction(ClientScanner.java:167)
at org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.java:162)
at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:797)
at org.apache.hadoop.hbase.MetaTableAccessor.fullScan(MetaTableAccessor.java:602)
at org.apache.hadoop.hbase.MetaTableAccessor.tableExists(MetaTableAccessor.java:366)
at org.apache.hadoop.hbase.client.HBaseAdmin.tableExists(HBaseAdmin.java:406)
at org.janusgraph.diskstorage.hbase.HBaseAdmin1_0.tableExists(HBaseAdmin1_0.java:77)
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:760)
... 13 more
Caused by: java.lang.IllegalAccessError: tried to access method com.google.common.base.Stopwatch.<init>()V from class org.apache.hadoop.hbase.zookeeper.MetaTableLocator
at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:604)
at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:588)
at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:561)
at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getMetaRegionLocation(ZooKeeperRegistry.java:61)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateMeta(ConnectionManager.java:1211)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegion(ConnectionManager.java:1178)
at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.getRegionLocations(RpcRetryingCallerWithReadReplicas.java:305)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:156)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:60)
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:210)
... 23 more
20:06:05,903  WARN HBaseStoreManager:405 - Unexpected exception during getDeployment()
java.lang.RuntimeException: org.janusgraph.diskstorage.TemporaryBackendException: Temporary failure in storage backend
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getDeployment(HBaseStoreManager.java:364)
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getFeatures(HBaseStoreManager.java:403)
at org.janusgraph.diskstorage.common.AbstractStoreManager.getMetaDataSchema(AbstractStoreManager.java:58)
at org.janusgraph.diskstorage.hbase.HBaseKeyColumnValueStore.<init>(HBaseKeyColumnValueStore.java:81)
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.openDatabase(HBaseStoreManager.java:460)
at org.janusgraph.diskstorage.keycolumnvalue.KeyColumnValueStoreManager.openDatabase(KeyColumnValueStoreManager.java:43)
at org.janusgraph.diskstorage.Backend.getStandaloneGlobalConfiguration(Backend.java:456)
at org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1345)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:107)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:75)
at org.janusgraph.example.GraphOfTheGodsFactory.main(GraphOfTheGodsFactory.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: org.janusgraph.diskstorage.TemporaryBackendException: Temporary failure in storage backend
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:766)
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getLocalKeyPartition(HBaseStoreManager.java:567)
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getDeployment(HBaseStoreManager.java:361)
... 15 more
Caused by: org.apache.hadoop.hbase.DoNotRetryIOException: java.lang.IllegalAccessError: tried to access method com.google.common.base.Stopwatch.<init>()V from class org.apache.hadoop.hbase.zookeeper.MetaTableLocator
at org.apache.hadoop.hbase.client.RpcRetryingCaller.translateException(RpcRetryingCaller.java:239)
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:212)
at org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:327)
at org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:302)
at org.apache.hadoop.hbase.client.ClientScanner.initializeScannerInConstruction(ClientScanner.java:167)
at org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.java:162)
at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:797)
at org.apache.hadoop.hbase.MetaTableAccessor.fullScan(MetaTableAccessor.java:602)
at org.apache.hadoop.hbase.MetaTableAccessor.tableExists(MetaTableAccessor.java:366)
at org.apache.hadoop.hbase.client.HBaseAdmin.tableExists(HBaseAdmin.java:406)
at org.janusgraph.diskstorage.hbase.HBaseAdmin1_0.tableExists(HBaseAdmin1_0.java:77)
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:760)
... 17 more
Caused by: java.lang.IllegalAccessError: tried to access method com.google.common.base.Stopwatch.<init>()V from class org.apache.hadoop.hbase.zookeeper.MetaTableLocator
at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:604)
at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:588)
at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:561)
at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getMetaRegionLocation(ZooKeeperRegistry.java:61)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateMeta(ConnectionManager.java:1211)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegion(ConnectionManager.java:1178)
at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.getRegionLocations(RpcRetryingCallerWithReadReplicas.java:305)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:156)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:60)
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:210)
... 27 more
Exception in thread "main" org.janusgraph.core.JanusGraphException: Could not open global configuration
at org.janusgraph.diskstorage.Backend.getStandaloneGlobalConfiguration(Backend.java:458)
at org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1345)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:107)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:75)
at org.janusgraph.example.GraphOfTheGodsFactory.main(GraphOfTheGodsFactory.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: org.janusgraph.diskstorage.TemporaryBackendException: Temporary failure in storage backend
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:766)
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.ensureColumnFamilyExists(HBaseStoreManager.java:838)
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.openDatabase(HBaseStoreManager.java:470)
at org.janusgraph.diskstorage.keycolumnvalue.KeyColumnValueStoreManager.openDatabase(KeyColumnValueStoreManager.java:43)
at org.janusgraph.diskstorage.Backend.getStandaloneGlobalConfiguration(Backend.java:456)
... 9 more
Caused by: org.apache.hadoop.hbase.DoNotRetryIOException: java.lang.IllegalAccessError: tried to access method com.google.common.base.Stopwatch.<init>()V from class org.apache.hadoop.hbase.zookeeper.MetaTableLocator
at org.apache.hadoop.hbase.client.RpcRetryingCaller.translateException(RpcRetryingCaller.java:239)
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:212)
at org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:327)
at org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:302)
at org.apache.hadoop.hbase.client.ClientScanner.initializeScannerInConstruction(ClientScanner.java:167)
at org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.java:162)
at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:797)
at org.apache.hadoop.hbase.MetaTableAccessor.fullScan(MetaTableAccessor.java:602)
at org.apache.hadoop.hbase.MetaTableAccessor.tableExists(MetaTableAccessor.java:366)
at org.apache.hadoop.hbase.client.HBaseAdmin.tableExists(HBaseAdmin.java:406)
at org.janusgraph.diskstorage.hbase.HBaseAdmin1_0.tableExists(HBaseAdmin1_0.java:77)
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:760)
... 13 more
Caused by: java.lang.IllegalAccessError: tried to access method com.google.common.base.Stopwatch.<init>()V from class org.apache.hadoop.hbase.zookeeper.MetaTableLocator
at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:604)
at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:588)
at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:561)
at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getMetaRegionLocation(ZooKeeperRegistry.java:61)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateMeta(ConnectionManager.java:1211)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegion(ConnectionManager.java:1178)
at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.getRegionLocations(RpcRetryingCallerWithReadReplicas.java:305)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:156)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:60)
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:210)
... 23 more

Process finished with exit code 1

HadoopMarc

unread,
Apr 24, 2017, 11:24:59 AM4/24/17
to JanusGraph users list
Hi Jerry,

At least you are a step further :-)

The StopWatch issue looks familiar. It is a jar version issue, so you have something on your classpath that has a dependency on an older version of StopWatch which gets included earlier than the higher version JG wants. If you use maven, you can have maven print out the dependency tree and see in which offending dependency you must exclude the com.google.common.base pakage in order to have the JG dependency prevail.

These kind of issues are frustrating, but part of using the JVM. At least you know the solution must be there, given that you had it working from the gremlin console!

Cheers,     Marc

Op maandag 24 april 2017 14:21:24 UTC+2 schreef Jerry:

HadoopMarc

unread,
Apr 24, 2017, 12:55:08 PM4/24/17
to JanusGraph users list
Hi Jerry,

I gave a quick look at janusgraph repo.

The link https://github.com/JanusGraph/janusgraph/blob/e1b087566bbc85ecfadaef9455c4f8358ae88947/janusgraph-hadoop-parent/janusgraph-hadoop-2/pom.xml
includes the following text:

<!-- Include janusgraph-hbase-core to resolve Guava StopWatch error in HBase tests.
Can be removed when Guava version is updated in HBase -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>janusgraph-hbase-core</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

In fact the JG team copied the StopWatch class into the janusgraph-hbase jar, so you will be fine as long as janusgraph-hbase sits on your classpath earlier than the hbase jars, so:

CLASSPATH=some/lib/janusgraph-hbase-0.1.0.jar;some/lib/*.jar

Cheers,    Marc

Op maandag 24 april 2017 17:24:59 UTC+2 schreef HadoopMarc:

Jerry

unread,
Apr 25, 2017, 1:28:07 AM4/25/17
to JanusGraph users list
Hi Marc,
Thanks a lot for your help.
I have solve the problem. I find it is due to the jars from other projects on my laptop. Maven complies  and stores all dependencies into /.m2 folder and janusgraph seems to read the older one from it directly. I clean the /.m2 folder and rebuild  then it works
Reply all
Reply to author
Forward
0 new messages