HBASE-21479 Individual tests in TestHRegionReplayEvents class are failing
Signed-off-by: Michael Stack <stack@apache.org>
This commit is contained in:
parent
4ebbfa3d60
commit
58cfed60ec
|
@ -66,7 +66,7 @@ import org.apache.hadoop.hbase.io.hfile.HFileContext;
|
||||||
import org.apache.hadoop.hbase.regionserver.HRegion.FlushResultImpl;
|
import org.apache.hadoop.hbase.regionserver.HRegion.FlushResultImpl;
|
||||||
import org.apache.hadoop.hbase.regionserver.HRegion.PrepareFlushResult;
|
import org.apache.hadoop.hbase.regionserver.HRegion.PrepareFlushResult;
|
||||||
import org.apache.hadoop.hbase.regionserver.throttle.NoLimitThroughputController;
|
import org.apache.hadoop.hbase.regionserver.throttle.NoLimitThroughputController;
|
||||||
import org.apache.hadoop.hbase.testclassification.MediumTests;
|
import org.apache.hadoop.hbase.testclassification.LargeTests;
|
||||||
import org.apache.hadoop.hbase.util.Bytes;
|
import org.apache.hadoop.hbase.util.Bytes;
|
||||||
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
|
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
|
||||||
import org.apache.hadoop.hbase.util.EnvironmentEdgeManagerTestHelper;
|
import org.apache.hadoop.hbase.util.EnvironmentEdgeManagerTestHelper;
|
||||||
|
@ -80,7 +80,9 @@ import org.apache.hadoop.hbase.wal.WALKeyImpl;
|
||||||
import org.apache.hadoop.hbase.wal.WALSplitter.MutationReplay;
|
import org.apache.hadoop.hbase.wal.WALSplitter.MutationReplay;
|
||||||
import org.apache.hadoop.util.StringUtils;
|
import org.apache.hadoop.util.StringUtils;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
|
import org.junit.AfterClass;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
import org.junit.BeforeClass;
|
||||||
import org.junit.ClassRule;
|
import org.junit.ClassRule;
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -108,7 +110,7 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.StoreDescript
|
||||||
* Tests of HRegion methods for replaying flush, compaction, region open, etc events for secondary
|
* Tests of HRegion methods for replaying flush, compaction, region open, etc events for secondary
|
||||||
* region replicas
|
* region replicas
|
||||||
*/
|
*/
|
||||||
@Category(MediumTests.class)
|
@Category(LargeTests.class)
|
||||||
public class TestHRegionReplayEvents {
|
public class TestHRegionReplayEvents {
|
||||||
|
|
||||||
@ClassRule
|
@ClassRule
|
||||||
|
@ -120,7 +122,7 @@ public class TestHRegionReplayEvents {
|
||||||
|
|
||||||
private static HBaseTestingUtility TEST_UTIL;
|
private static HBaseTestingUtility TEST_UTIL;
|
||||||
|
|
||||||
public static Configuration CONF ;
|
public static Configuration CONF;
|
||||||
private String dir;
|
private String dir;
|
||||||
|
|
||||||
private byte[][] families = new byte[][] {
|
private byte[][] families = new byte[][] {
|
||||||
|
@ -136,17 +138,27 @@ public class TestHRegionReplayEvents {
|
||||||
// per test fields
|
// per test fields
|
||||||
private Path rootDir;
|
private Path rootDir;
|
||||||
private TableDescriptor htd;
|
private TableDescriptor htd;
|
||||||
private long time;
|
|
||||||
private RegionServerServices rss;
|
private RegionServerServices rss;
|
||||||
private RegionInfo primaryHri, secondaryHri;
|
private RegionInfo primaryHri, secondaryHri;
|
||||||
private HRegion primaryRegion, secondaryRegion;
|
private HRegion primaryRegion, secondaryRegion;
|
||||||
private WALFactory wals;
|
|
||||||
private WAL walPrimary, walSecondary;
|
private WAL walPrimary, walSecondary;
|
||||||
private WAL.Reader reader;
|
private WAL.Reader reader;
|
||||||
|
|
||||||
|
@BeforeClass
|
||||||
|
public static void setUpBeforeClass() throws Exception {
|
||||||
|
TEST_UTIL = new HBaseTestingUtility();
|
||||||
|
TEST_UTIL.startMiniDFSCluster(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@AfterClass
|
||||||
|
public static void tearDownAfterClass() throws Exception {
|
||||||
|
LOG.info("Cleaning test directory: " + TEST_UTIL.getDataTestDir());
|
||||||
|
TEST_UTIL.cleanupTestDir();
|
||||||
|
TEST_UTIL.shutdownMiniDFSCluster();
|
||||||
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setup() throws IOException {
|
public void setUp() throws Exception {
|
||||||
TEST_UTIL = HBaseTestingUtility.createLocalHTU();
|
|
||||||
CONF = TEST_UTIL.getConfiguration();
|
CONF = TEST_UTIL.getConfiguration();
|
||||||
dir = TEST_UTIL.getDataTestDir("TestHRegionReplayEvents").toString();
|
dir = TEST_UTIL.getDataTestDir("TestHRegionReplayEvents").toString();
|
||||||
method = name.getMethodName();
|
method = name.getMethodName();
|
||||||
|
@ -160,14 +172,14 @@ public class TestHRegionReplayEvents {
|
||||||
}
|
}
|
||||||
htd = builder.build();
|
htd = builder.build();
|
||||||
|
|
||||||
time = System.currentTimeMillis();
|
long time = System.currentTimeMillis();
|
||||||
ChunkCreator.initialize(MemStoreLABImpl.CHUNK_SIZE_DEFAULT, false, 0, 0, 0, null);
|
ChunkCreator.initialize(MemStoreLABImpl.CHUNK_SIZE_DEFAULT, false, 0, 0, 0, null);
|
||||||
primaryHri =
|
primaryHri =
|
||||||
RegionInfoBuilder.newBuilder(htd.getTableName()).setRegionId(time).setReplicaId(0).build();
|
RegionInfoBuilder.newBuilder(htd.getTableName()).setRegionId(time).setReplicaId(0).build();
|
||||||
secondaryHri =
|
secondaryHri =
|
||||||
RegionInfoBuilder.newBuilder(htd.getTableName()).setRegionId(time).setReplicaId(1).build();
|
RegionInfoBuilder.newBuilder(htd.getTableName()).setRegionId(time).setReplicaId(1).build();
|
||||||
|
|
||||||
wals = TestHRegion.createWALFactory(CONF, rootDir);
|
WALFactory wals = TestHRegion.createWALFactory(CONF, rootDir);
|
||||||
walPrimary = wals.getWAL(primaryHri);
|
walPrimary = wals.getWAL(primaryHri);
|
||||||
walSecondary = wals.getWAL(secondaryHri);
|
walSecondary = wals.getWAL(secondaryHri);
|
||||||
|
|
||||||
|
@ -207,8 +219,6 @@ public class TestHRegionReplayEvents {
|
||||||
}
|
}
|
||||||
|
|
||||||
EnvironmentEdgeManagerTestHelper.reset();
|
EnvironmentEdgeManagerTestHelper.reset();
|
||||||
LOG.info("Cleaning test directory: " + TEST_UTIL.getDataTestDir());
|
|
||||||
TEST_UTIL.cleanupTestDir();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String getName() {
|
String getName() {
|
||||||
|
|
Loading…
Reference in New Issue