hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Daniel Cryans <jdcry...@apache.org>
Subject 5 seconds pause connecting to ZK in unit tests
Date Wed, 07 Nov 2012 18:13:19 GMT
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!
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

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



View raw message