Repository: hbase
Updated Branches:
  refs/heads/0.98 3c90cfa0b -> 230a768a3


HBASE-11217 Race between SplitLogManager task creation + TimeoutMonitor - 
ADDENDUM to fix unit test


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/230a768a
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/230a768a
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/230a768a

Branch: refs/heads/0.98
Commit: 230a768a3ccf4ef8e50236e360035efadaea7ecc
Parents: 3c90cfa
Author: Enis Soztutar <[email protected]>
Authored: Thu May 22 18:27:30 2014 -0700
Committer: Enis Soztutar <[email protected]>
Committed: Thu May 22 18:29:38 2014 -0700

----------------------------------------------------------------------
 .../hbase/master/TestSplitLogManager.java       | 45 --------------------
 1 file changed, 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/230a768a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
index 82b8673..ed51484 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
@@ -491,51 +491,6 @@ public class TestSplitLogManager {
     assertFalse(fs.exists(emptyLogDirPath));
   }
 
-  @Test(timeout=45000)
-  public void testVanishingTaskZNode() throws Exception {
-    LOG.info("testVanishingTaskZNode");
-
-    conf.setInt("hbase.splitlog.manager.unassigned.timeout", 0);
-    conf.setInt("hbase.splitlog.manager.timeoutmonitor.period", 1000);
-    slm = new SplitLogManager(zkw, conf, stopper, master, DUMMY_MASTER);
-    FileSystem fs = TEST_UTIL.getTestFileSystem();
-    final Path logDir = new Path(fs.getWorkingDirectory(),
-        UUID.randomUUID().toString());
-    fs.mkdirs(logDir);
-    Thread thread = null;
-    try {
-      Path logFile = new Path(logDir, UUID.randomUUID().toString());
-      fs.createNewFile(logFile);
-      thread = new Thread() {
-        public void run() {
-          try {
-            // this call will block because there are no SplitLogWorkers,
-            // until the task znode is deleted below. Then the call will
-            // complete successfully, assuming the log is split.
-            slm.splitLogDistributed(logDir);
-          } catch (Exception e) {
-            LOG.warn("splitLogDistributed failed", e);
-          }
-        }
-      };
-      thread.start();
-      waitForCounter(tot_mgr_node_create_result, 0, 1, 10000);
-      String znode = ZKSplitLog.getEncodedNodeName(zkw, logFile.toString());
-      // remove the task znode, to finish the distributed log splitting
-      ZKUtil.deleteNode(zkw, znode);
-      waitForCounter(tot_mgr_get_data_nonode, 0, 1, 30000);
-      waitForCounter(tot_mgr_log_split_batch_success, 0, 1, to/2);
-      assertTrue(fs.exists(logFile));
-    } finally {
-      if (thread != null) {
-        // interrupt the thread in case the test fails in the middle.
-        // it has no effect if the thread is already terminated.
-        thread.interrupt();
-      }
-      fs.delete(logDir, true);
-    }
-  }
-
   /**
    * The following test case is aiming to test the situation when 
distributedLogReplay is turned off
    * and restart a cluster there should no recovery regions in ZK left.

Reply via email to