Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # dev >> 5 seconds pause connecting to ZK in unit tests


Copy link to this message
-
5 seconds pause connecting to ZK in unit tests
Hey devs,

I'm wondering if anyone else saw this. I was running TestReplication
on my machine and I saw it failing in testDeleteTypes trying to
replicate _3_ rows:

Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 59.62
sec <<< FAILURE!
testDeleteTypes(org.apache.hadoop.hbase.replication.TestReplication)
Time elapsed: 0.081 sec  <<< FAILURE!
java.lang.AssertionError: Waited too much time for put replication
        at org.junit.Assert.fail(Assert.java:93)
        at org.apache.hadoop.hbase.replication.TestReplication.testDeleteTypes(TestReplication.java:242)

Digging down, I was able to jstack while the test is waiting for
replication and I see:

Thread[REPL IPC Server handler 0 on 62520,5,main]
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.zookeeper.ClientCnxn.submitRequest(ClientCnxn.java:1259)
        at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:998)
        at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:171)

It stays there the whole time. Adding debug around exists I see:

2012-11-07 10:01:15,759 INFO  [REPL IPC Server handler 0 on 62520]
zookeeper.RecoverableZooKeeper(170): Running exists on /2/master
2012-11-07 10:01:20,244 INFO  [REPL IPC Server handler 0 on 62520]
zookeeper.RecoverableZooKeeper(184): Done with exists on /2/master

If I turn on debug for ZK I see that ZK doesn't process the exists
until a few ms before the call returns.

FWIW I see other exits() hanging for about 5 seconds in the log, and
it always seems to happen on the first call after the session is
started.

Elliott saw the same issue with his machine yesterday but I'm
wondering if anyone else saw it and/or have a clue.

Thx,

J-D