Hi all,
It's a requirement for our platform to use the hbase-client-1.1.2 jar
and we can't have multiple versions of hbase-client so I need to get
nutch-2.3.1 to use hbase-client-1.1.2 rather than 0.98.8-hadoop2.
*/For these tests, I have been pointing nutch at a standalone hbase
running on my local machine./*
I found that gora-hbase-0.6.1 just doesn't work with hbase-client-1.1.2:
java.lang.NoSuchMethodError:
org.apache.hadoop.hbase.HTableDescriptor.addFamily(Lorg/apache/hadoop/hbase/HColumnDescriptor;)V
at
org.apache.gora.hbase.store.HBaseMapping$HBaseMappingBuilder.build(HBaseMapping.java:174)
at
org.apache.gora.hbase.store.HBaseStore.readMapping(HBaseStore.java:798)
at
org.apache.gora.hbase.store.HBaseStore.initialize(HBaseStore.java:116)
at
org.apache.gora.store.DataStoreFactory.initializeDataStore(DataStoreFactory.java:102)
at
org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:161)
at
org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:135)
at
org.apache.nutch.storage.StorageUtils.createWebStore(StorageUtils.java:78)
at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:218)
at org.apache.nutch.crawl.InjectorJob.inject(InjectorJob.java:252)
at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:275)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at
com.attivio.webcrawler.nutch.NutchJobManager.run(NutchJobManager.java:111)
at
com.attivio.webcrawler.connector.WebCrawlerScanner.start(WebCrawlerScanner.java:353)
at
com.attivio.webcrawler.connector.WebCrawlerScannerTest.test(WebCrawlerScannerTest.java:28)
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:497)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
So I upgraded to gora-hbase-0.7 which runs fine for a short time before
hitting connection errors. After just a couple minutes of crawling,
everything comes to a halt and my logs get loaded up with:
2017-04-19 15:26:22,638 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase/hbaseid
2017-04-19 15:26:23,945 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase/hbaseid
2017-04-19 15:26:27,158 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase/hbaseid
2017-04-19 15:26:32,327 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase/hbaseid
2017-04-19 15:26:40,963 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase/hbaseid
2017-04-19 15:26:40,964 ERROR RecoverableZooKeeper - ZooKeeper
exists failed after 4 attempts
2017-04-19 15:26:40,964 WARN ZKUtil - hconnection-0x15f9a7320x0,
quorum=localhost:2181, baseZNode=/hbase Unable to set watcher on
znode (/hbase/hbaseid)
2017-04-19 15:26:40,964 ERROR ZooKeeperWatcher -
hconnection-0x15f9a7320x0, quorum=localhost:2181, baseZNode=/hbase
Received unexpected KeeperException, re-throwing exception
2017-04-19 15:26:40,964 WARN ZooKeeperRegistry - Can't retrieve
clusterId from Zookeeper
2017-04-19 15:26:42,766 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase
2017-04-19 15:26:44,061 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase
2017-04-19 15:26:46,506 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase
2017-04-19 15:26:50,536 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase
2017-04-19 15:26:58,703 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase
2017-04-19 15:26:58,703 ERROR RecoverableZooKeeper - ZooKeeper
getChildren failed after 4 attempts
2017-04-19 15:26:58,703 WARN MetaTableLocator - Got ZK exception
org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase
2017-04-19 15:27:00,261 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase/meta-region-server
2017-04-19 15:27:01,674 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase/meta-region-server
2017-04-19 15:27:04,172 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase/meta-region-server
2017-04-19 15:27:08,673 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase/meta-region-server
2017-04-19 15:27:18,281 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase/meta-region-server
2017-04-19 15:27:18,281 ERROR RecoverableZooKeeper - ZooKeeper
getData failed after 4 attempts
2017-04-19 15:27:18,281 WARN ZKUtil - hconnection-0x15f9a7320x0,
quorum=localhost:2181, baseZNode=/hbase Unable to get data of znode
/hbase/meta-region-server
2017-04-19 15:27:18,282 ERROR ZooKeeperWatcher -
hconnection-0x15f9a7320x0, quorum=localhost:2181, baseZNode=/hbase
Received unexpected KeeperException, re-throwing exception
2017-04-19 15:27:19,487 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase/meta-region-server
2017-04-19 15:27:20,737 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase/meta-region-server
2017-04-19 15:27:22,746 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase/meta-region-server
2017-04-19 15:27:27,799 WARN RecoverableZooKeeper - Possibly
transient ZooKeeper, quorum=localhost:2181,
exception=org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss for /hbase/meta-region-server
/*This is doesn't seem to be a problem with my hbase environment.
*/Before, during, and after the test, the hbase server was still running
successfully, and so was it's zookeeper quorum. I ran the exact same
test with the exact same standalone hbase but using the
hbase-client-0.98.8-hadoop2 and gora-hbase-0.6.1 and I was it able to
complete without issue. However, this isn't a viable workaround for our
actual platform.
I realize this is a real edge-case type of issue, and odds are I'm just
gonna end up building a store plugin for gora and/or hacking
org.apache.nutch.storage.StorageUtils, but I thought I'd at least ask
y'all first to see if anyone has any ideas about what's happening/ how
to get around it.
Any feedback will be greatly appreciated.
Thanks,
Ben V.