HBASE-13607 TestSplitLogManager.testGetPreviousRecoveryMode consistently failing (Josh Elser)
This commit is contained in:
parent
1c4b47f856
commit
807eba3e1a
|
@ -49,7 +49,6 @@ import org.apache.hadoop.fs.Path;
|
||||||
import org.apache.hadoop.hbase.ChoreService;
|
import org.apache.hadoop.hbase.ChoreService;
|
||||||
import org.apache.hadoop.hbase.CoordinatedStateManager;
|
import org.apache.hadoop.hbase.CoordinatedStateManager;
|
||||||
import org.apache.hadoop.hbase.CoordinatedStateManagerFactory;
|
import org.apache.hadoop.hbase.CoordinatedStateManagerFactory;
|
||||||
import org.apache.hadoop.hbase.HBaseConfiguration;
|
|
||||||
import org.apache.hadoop.hbase.HBaseTestingUtility;
|
import org.apache.hadoop.hbase.HBaseTestingUtility;
|
||||||
import org.apache.hadoop.hbase.HConstants;
|
import org.apache.hadoop.hbase.HConstants;
|
||||||
import org.apache.hadoop.hbase.HRegionInfo;
|
import org.apache.hadoop.hbase.HRegionInfo;
|
||||||
|
@ -644,15 +643,16 @@ public class TestSplitLogManager {
|
||||||
public void testGetPreviousRecoveryMode() throws Exception {
|
public void testGetPreviousRecoveryMode() throws Exception {
|
||||||
LOG.info("testGetPreviousRecoveryMode");
|
LOG.info("testGetPreviousRecoveryMode");
|
||||||
SplitLogCounters.resetCounters();
|
SplitLogCounters.resetCounters();
|
||||||
Configuration testConf = HBaseConfiguration.create(TEST_UTIL.getConfiguration());
|
// Not actually enabling DLR for the cluster, just for the ZkCoordinatedStateManager to use.
|
||||||
testConf.setBoolean(HConstants.DISTRIBUTED_LOG_REPLAY_KEY, true);
|
// The test is just manipulating ZK manually anyways.
|
||||||
|
conf.setBoolean(HConstants.DISTRIBUTED_LOG_REPLAY_KEY, true);
|
||||||
|
|
||||||
zkw.getRecoverableZooKeeper().create(ZKSplitLog.getEncodedNodeName(zkw, "testRecovery"),
|
zkw.getRecoverableZooKeeper().create(ZKSplitLog.getEncodedNodeName(zkw, "testRecovery"),
|
||||||
new SplitLogTask.Unassigned(
|
new SplitLogTask.Unassigned(
|
||||||
ServerName.valueOf("mgr,1,1"), RecoveryMode.LOG_SPLITTING).toByteArray(),
|
ServerName.valueOf("mgr,1,1"), RecoveryMode.LOG_SPLITTING).toByteArray(),
|
||||||
Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
|
Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
|
||||||
|
|
||||||
slm = new SplitLogManager(ds, testConf, stopper, master, DUMMY_MASTER);
|
slm = new SplitLogManager(ds, conf, stopper, master, DUMMY_MASTER);
|
||||||
LOG.info("Mode1=" + slm.getRecoveryMode());
|
LOG.info("Mode1=" + slm.getRecoveryMode());
|
||||||
assertTrue(slm.isLogSplitting());
|
assertTrue(slm.isLogSplitting());
|
||||||
zkw.getRecoverableZooKeeper().delete(ZKSplitLog.getEncodedNodeName(zkw, "testRecovery"), -1);
|
zkw.getRecoverableZooKeeper().delete(ZKSplitLog.getEncodedNodeName(zkw, "testRecovery"), -1);
|
||||||
|
|
Loading…
Reference in New Issue