hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jxi...@apache.org
Subject svn commit: r1503512 - in /hbase/trunk/hbase-server/src: main/java/org/apache/hadoop/hbase/SplitLogCounters.java main/java/org/apache/hadoop/hbase/regionserver/SplitLogWorker.java test/java/org/apache/hadoop/hbase/regionserver/TestSplitLogWorker.java
Date Mon, 15 Jul 2013 23:10:33 GMT
Author: jxiang
Date: Mon Jul 15 23:10:33 2013
New Revision: 1503512

URL: http://svn.apache.org/r1503512
Log:
HBASE-8954 TestSplitLogWorker#testPreemptTask failed

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/SplitLogCounters.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitLogWorker.java
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitLogWorker.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/SplitLogCounters.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/SplitLogCounters.java?rev=1503512&r1=1503511&r2=1503512&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/SplitLogCounters.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/SplitLogCounters.java Mon
Jul 15 23:10:33 2013
@@ -82,6 +82,7 @@ public class SplitLogCounters {
   public final static AtomicLong tot_wkr_preempt_task = new AtomicLong(0);
   public final static AtomicLong tot_wkr_task_heartbeat_failed = new AtomicLong(0);
   public final static AtomicLong tot_wkr_final_transition_failed = new AtomicLong(0);
+  public final static AtomicLong tot_wkr_task_grabing = new AtomicLong(0);
 
   public static void resetCounters() throws Exception {
     Class<?> cl = (new SplitLogCounters()).getClass();

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitLogWorker.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitLogWorker.java?rev=1503512&r1=1503511&r2=1503512&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitLogWorker.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitLogWorker.java
Mon Jul 15 23:10:33 2013
@@ -240,6 +240,7 @@ public class SplitLogWorker extends ZooK
           return;
         }
       }
+      SplitLogCounters.tot_wkr_task_grabing.incrementAndGet();
       synchronized (taskReadyLock) {
         while (seq_start == taskReadySeq) {
           try {

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitLogWorker.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitLogWorker.java?rev=1503512&r1=1503511&r2=1503512&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitLogWorker.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitLogWorker.java
Mon Jul 15 23:10:33 2013
@@ -201,6 +201,7 @@ public class TestSplitLogWorker {
     try {
       Thread.yield(); // let the worker start
       Thread.sleep(1000);
+      waitForCounter(SplitLogCounters.tot_wkr_task_grabing, 0, 1, 1500);
 
       // this time create a task node after starting the splitLogWorker
       zkw.getRecoverableZooKeeper().create(PATH,
@@ -231,6 +232,8 @@ public class TestSplitLogWorker {
     try {
       Thread.yield(); // let the worker start
       Thread.sleep(100);
+      waitForCounter(SplitLogCounters.tot_wkr_task_grabing, 0, 1, 1500);
+
       SplitLogTask unassignedManager = new SplitLogTask.Unassigned(MANAGER);
       zkw.getRecoverableZooKeeper().create(PATH1, unassignedManager.toByteArray(),
         Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);



Mime
View raw message