Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ public BookieAutoRecoveryTest() throws IOException, KeeperException,
"org.apache.bookkeeper.meta.HierarchicalLedgerManagerFactory");
baseConf.setOpenLedgerRereplicationGracePeriod(openLedgerRereplicationGracePeriod);
baseConf.setRwRereplicateBackoffMs(500);
// Reduce ZK session timeout so killed bookie's ephemeral node disappears faster,
// speeding up Auditor leader re-election when the killed bookie was the leader.
baseConf.setZkTimeout(4000);
baseClientConf.setLedgerManagerFactoryClassName(
"org.apache.bookkeeper.meta.HierarchicalLedgerManagerFactory");
this.digestType = DigestType.MAC;
Expand Down Expand Up @@ -168,7 +171,7 @@ public void testOpenLedgers() throws Exception {

// waiting to publish urLedger znode by Auditor
assertTrue("Ledger should be marked as underreplicated",
latch.await(60, TimeUnit.SECONDS));
latch.await(90, TimeUnit.SECONDS));
latch = new CountDownLatch(1);
LOG.info("Watching on urLedgerPath:" + urLedgerZNode
+ " to know the status of rereplication process");
Expand All @@ -186,7 +189,7 @@ public void testOpenLedgers() throws Exception {
+ replicaToKillAddr);
}
assertTrue("Replication should complete",
latch.await(60, TimeUnit.SECONDS));
latch.await(90, TimeUnit.SECONDS));

// grace period to update the urledger metadata in zookeeper
LOG.info("Waiting to update the urledger metadata in zookeeper");
Expand Down Expand Up @@ -223,7 +226,7 @@ public void testClosedLedgers() throws Exception {

// waiting to publish urLedger znode by Auditor
assertTrue("Ledgers should be marked as underreplicated",
latch.await(60, TimeUnit.SECONDS));
latch.await(90, TimeUnit.SECONDS));

// Again watching the urLedger znode to know the replication status
latch = new CountDownLatch(listOfLedgerHandle.size());
Expand All @@ -248,7 +251,7 @@ public void testClosedLedgers() throws Exception {

// waiting to finish replication
assertTrue("Replication should complete",
latch.await(60, TimeUnit.SECONDS));
latch.await(90, TimeUnit.SECONDS));

// grace period to update the urledger metadata in zookeeper
LOG.info("Waiting to update the urledger metadata in zookeeper");
Expand Down Expand Up @@ -296,7 +299,7 @@ public void testStopWhileReplicationInProgress() throws Exception {

// waiting to publish urLedger znode by Auditor
assertTrue("Ledgers should be marked as underreplicated",
latch.await(60, TimeUnit.SECONDS));
latch.await(90, TimeUnit.SECONDS));

// Again watching the urLedger znode to know the replication status
latch = new CountDownLatch(listOfLedgerHandle.size());
Expand Down Expand Up @@ -332,7 +335,7 @@ public void testStopWhileReplicationInProgress() throws Exception {

LOG.info("Waiting to finish rereplication processes");
assertTrue("Replication should complete after restart",
latch.await(60, TimeUnit.SECONDS));
latch.await(90, TimeUnit.SECONDS));

// grace period to update the urledger metadata in zookeeper
LOG.info("Waiting to update the urledger metadata in zookeeper");
Expand Down Expand Up @@ -369,7 +372,7 @@ public void testNoSuchLedgerExists() throws Exception {
killBookie(replicaToKillAddr);
// waiting to publish urLedger znode by Auditor
assertTrue("Ledgers should be marked as underreplicated",
latch.await(60, TimeUnit.SECONDS));
latch.await(90, TimeUnit.SECONDS));

latch = new CountDownLatch(listOfLedgerHandle.size());
for (LedgerHandle lh : listOfLedgerHandle) {
Expand All @@ -385,7 +388,7 @@ public void testNoSuchLedgerExists() throws Exception {

// waiting to delete published urledgers, since it doesn't exists
assertTrue("UrLedgers should be cleaned up after deletion",
latch.await(60, TimeUnit.SECONDS));
latch.await(90, TimeUnit.SECONDS));

for (LedgerHandle lh : listOfLedgerHandle) {
assertNull("UrLedger still exists after rereplication",
Expand Down Expand Up @@ -491,7 +494,7 @@ public void testLedgerMetadataContainsIpAddressAsBookieID()

// waiting to publish urLedger znode by Auditor
assertTrue("Ledger should be marked as underreplicated",
latch.await(60, TimeUnit.SECONDS));
latch.await(90, TimeUnit.SECONDS));
latch = new CountDownLatch(1);
LOG.info("Watching on urLedgerPath:" + urLedgerZNode
+ " to know the status of rereplication process");
Expand All @@ -512,7 +515,7 @@ public void testLedgerMetadataContainsIpAddressAsBookieID()
+ replicaToKillAddr);
}
assertTrue("Replication should complete",
latch.await(60, TimeUnit.SECONDS));
latch.await(90, TimeUnit.SECONDS));

// grace period to update the urledger metadata in zookeeper
LOG.info("Waiting to update the urledger metadata in zookeeper");
Expand Down Expand Up @@ -570,7 +573,7 @@ public void testLedgerMetadataContainsHostNameAsBookieID()

// waiting to publish urLedger znode by Auditor
assertTrue("Ledger should be marked as underreplicated",
latch.await(60, TimeUnit.SECONDS));
latch.await(90, TimeUnit.SECONDS));
latch = new CountDownLatch(1);
LOG.info("Watching on urLedgerPath:" + urLedgerZNode
+ " to know the status of rereplication process");
Expand All @@ -593,7 +596,7 @@ public void testLedgerMetadataContainsHostNameAsBookieID()
+ replicaToKillAddr);
}
assertTrue("Replication should complete",
latch.await(60, TimeUnit.SECONDS));
latch.await(90, TimeUnit.SECONDS));

// grace period to update the urledger metadata in zookeeper
LOG.info("Waiting to update the urledger metadata in zookeeper");
Expand Down
Loading