HBASE-9088 TestSplitLogManager.testMultipleResubmits fails

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1508591 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jxiang 2013-07-30 19:57:04 +00:00
parent 7c3882ca3c
commit 43a064231e
3 changed files with 4 additions and 1 deletions

View File

@ -64,6 +64,7 @@ public class SplitLogCounters {
public final static AtomicLong tot_mgr_resubmit_unassigned = new AtomicLong(0);
public final static AtomicLong tot_mgr_relist_logdir = new AtomicLong(0);
public final static AtomicLong tot_mgr_resubmit_dead_server_task = new AtomicLong(0);
public final static AtomicLong tot_mgr_resubmit_force = new AtomicLong(0);
// SplitLogWorker counters
public final static AtomicLong tot_wkr_failed_to_grab_task_no_data = new AtomicLong(0);

View File

@ -865,6 +865,7 @@ public class SplitLogManager extends ZooKeeperListener {
// race with heartbeat() that might be changing last_version
version = task.last_version;
} else {
SplitLogCounters.tot_mgr_resubmit_force.incrementAndGet();
version = -1;
}
LOG.info("resubmitting task " + path);

View File

@ -30,6 +30,7 @@ import static org.apache.hadoop.hbase.SplitLogCounters.tot_mgr_rescan_deleted;
import static org.apache.hadoop.hbase.SplitLogCounters.tot_mgr_resubmit;
import static org.apache.hadoop.hbase.SplitLogCounters.tot_mgr_resubmit_dead_server_task;
import static org.apache.hadoop.hbase.SplitLogCounters.tot_mgr_resubmit_failed;
import static org.apache.hadoop.hbase.SplitLogCounters.tot_mgr_resubmit_force;
import static org.apache.hadoop.hbase.SplitLogCounters.tot_mgr_resubmit_threshold_reached;
import static org.apache.hadoop.hbase.SplitLogCounters.tot_mgr_resubmit_unassigned;
import static org.apache.hadoop.hbase.SplitLogCounters.tot_mgr_task_deleted;
@ -287,7 +288,7 @@ public class TestSplitLogManager {
waitForCounter(tot_mgr_heartbeat, 1, 2, to/2);
waitForCounter(tot_mgr_resubmit_threshold_reached, 0, 1, to + to/2);
Thread.sleep(to + to/2);
assertEquals(2L, tot_mgr_resubmit.get());
assertEquals(2L, tot_mgr_resubmit.get() - tot_mgr_resubmit_force.get());
}
@Test