alpakka icon indicating copy to clipboard operation
alpakka copied to clipboard

Failed: HBase all tests failed

Open seglo opened this issue 4 years ago • 9 comments

All the HBase tests timed out on this build. Attached the log so the stage could be retried and not wipe out build info.

log.txt

seglo avatar Mar 10 '20 17:03 seglo

Happening in master too.

https://travis-ci.com/github/akka/alpakka/jobs/296475571

Build log has an error:

2020-03-10 13:52:34,501 DEBUG [pool-1-thread-1] [org.apache.hadoop.util.Shell]  Failed to detect a valid hadoop home directory
java.io.IOException: HADOOP_HOME or hadoop.home.dir are not set.
	at org.apache.hadoop.util.Shell.checkHadoopHome(Shell.java:329)
	at org.apache.hadoop.util.Shell.<clinit>(Shell.java:354)
	at org.apache.hadoop.util.StringUtils.<clinit>(StringUtils.java:80)
	at org.apache.hadoop.conf.Configuration.getBoolean(Configuration.java:1437)
	at org.apache.hadoop.hbase.HBaseConfiguration.checkDefaultsVersion(HBaseConfiguration.java:67)
	at org.apache.hadoop.hbase.HBaseConfiguration.addHbaseResources(HBaseConfiguration.java:81)
	at org.apache.hadoop.hbase.HBaseConfiguration.create(HBaseConfiguration.java:96)
	at docs.scaladsl.HBaseStageSpec.<init>(HBaseStageSpec.scala:102)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.lang.Class.newInstance(Class.java:442)
	at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:450)
	at sbt.ForkMain$Run.lambda$runTest$1(ForkMain.java:304)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

seglo avatar Mar 10 '20 17:03 seglo

After I mapped the hbase to localhost in my /etc/hosts I was able to run the tests locally. Clue came from this failure of a java test.

Caused by: java.net.UnknownHostException: can not resolve hbase,16201,1583863526635
        at org.apache.hadoop.hbase.ipc.AbstractRpcClient.createAddr(AbstractRpcClient.java:429)
        at org.apache.hadoop.hbase.ipc.AbstractRpcClient.createBlockingRpcChannel(AbstractRpcClient.java:507)
        at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.getClient(ConnectionManager.java:1703)
        at org.apache.hadoop.hbase.client.ScannerCallable.prepare(ScannerCallable.java:168)
        at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas$RetryingRPC.prepare(ScannerCallableWithReplicas.java:400)
        at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:140)
        ... 4 more

IDK why this is all of a sudden necessary, or why the failure is transient in master.

EDIT: This was always necessary. The tests passed because I was using an older image of the hbase:1.4 tag.

seglo avatar Mar 10 '20 18:03 seglo

https://travis-ci.com/github/akka/alpakka/jobs/296475571

seglo avatar Mar 10 '20 18:03 seglo

Upstream docker image tag we rely on for integration tests was recently updated (1.4) https://hub.docker.com/r/harisekhon/hbase/tags

seglo avatar Mar 10 '20 18:03 seglo

Yes, this seems to be a show stopper for all of our Travis builds. Looking into what they might have done at https://github.com/HariSekhon/Dockerfiles/commits/hbase-1.4/hbase

ennru avatar Mar 11 '20 12:03 ennru

I've tried to revive the HBase tests locally with no success.

ennru avatar Sep 16 '20 12:09 ennru

The HBase tests are excluded from the GitHub actions workflow, as well.

ennru avatar Feb 02 '22 15:02 ennru

The HBase image the tests use doesn't work anymore and it doesn't seem maintained anymore https://github.com/HariSekhon/Dockerfiles/issues/42.

Furthermore, the versions of the Hadoop libraries Alpakka relies on are very outdated with CVEs reported for them.

[info] Found 4 dependency updates for akka-stream-alpakka-hbase
[info]   org.apache.hadoop:hadoop-common                : 2.7.7            -> 2.10.1 -> 3.3.2
[info]   org.apache.hadoop:hadoop-mapreduce-client-core : 2.7.7            -> 2.10.1 -> 3.3.2
[info]   org.apache.hbase:hbase-common                  : 1.4.13 -> 1.4.14 -> 1.7.1  -> 2.4.11
[info]   org.apache.hbase:hbase-shaded-client           : 1.4.13 -> 1.4.14 -> 1.7.1  -> 2.4.11

I'm inclined to remove the HBase connector altogether for Alpakka 4.0.

ennru avatar Apr 19 '22 16:04 ennru

Just looked at this again, the Docker images haven't been touched and we are not verifying Alpakka HBase with integration tests.

ennru avatar Apr 05 '24 15:04 ennru