HBASE-22896 TestHRegion.testFlushMarkersWALFail is flaky (#551)
* HBASE-22896 TestHRegion.testFlushMarkersWALFail is flaky * delete blank line
This commit is contained in:
parent
13b2edc1be
commit
693fa05273
@ -396,7 +396,6 @@ public class TestHRegion {
|
|||||||
String testName = "testMemstoreSizeAccountingWithFailedPostBatchMutate";
|
String testName = "testMemstoreSizeAccountingWithFailedPostBatchMutate";
|
||||||
FileSystem fs = FileSystem.get(CONF);
|
FileSystem fs = FileSystem.get(CONF);
|
||||||
Path rootDir = new Path(dir + testName);
|
Path rootDir = new Path(dir + testName);
|
||||||
ChunkCreator.initialize(MemStoreLABImpl.CHUNK_SIZE_DEFAULT, false, 0, 0, 0, null);
|
|
||||||
FSHLog hLog = new FSHLog(fs, rootDir, testName, CONF);
|
FSHLog hLog = new FSHLog(fs, rootDir, testName, CONF);
|
||||||
hLog.init();
|
hLog.init();
|
||||||
region = initHRegion(tableName, null, null, false, Durability.SYNC_WAL, hLog,
|
region = initHRegion(tableName, null, null, false, Durability.SYNC_WAL, hLog,
|
||||||
@ -1233,10 +1232,9 @@ public class TestHRegion {
|
|||||||
this.region = initHRegion(tableName, HConstants.EMPTY_START_ROW,
|
this.region = initHRegion(tableName, HConstants.EMPTY_START_ROW,
|
||||||
HConstants.EMPTY_END_ROW, false, Durability.USE_DEFAULT, wal, family);
|
HConstants.EMPTY_END_ROW, false, Durability.USE_DEFAULT, wal, family);
|
||||||
region.put(put);
|
region.put(put);
|
||||||
|
|
||||||
// 3. Test case where ABORT_FLUSH will throw exception.
|
// 3. Test case where ABORT_FLUSH will throw exception.
|
||||||
// Even if ABORT_FLUSH throws exception, we should not fail with IOE, but continue with
|
// Even if ABORT_FLUSH throws exception, we should not fail with IOE, but continue with
|
||||||
// DroppedSnapshotException. Below COMMMIT_FLUSH will cause flush to abort
|
// DroppedSnapshotException. Below COMMIT_FLUSH will cause flush to abort
|
||||||
wal.flushActions = new FlushAction [] {FlushAction.COMMIT_FLUSH, FlushAction.ABORT_FLUSH};
|
wal.flushActions = new FlushAction [] {FlushAction.COMMIT_FLUSH, FlushAction.ABORT_FLUSH};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -2365,7 +2363,6 @@ public class TestHRegion {
|
|||||||
hLog.init();
|
hLog.init();
|
||||||
// This chunk creation is done throughout the code base. Do we want to move it into core?
|
// This chunk creation is done throughout the code base. Do we want to move it into core?
|
||||||
// It is missing from this test. W/o it we NPE.
|
// It is missing from this test. W/o it we NPE.
|
||||||
ChunkCreator.initialize(MemStoreLABImpl.CHUNK_SIZE_DEFAULT, false, 0, 0, 0, null);
|
|
||||||
region = initHRegion(tableName, null, null, false, Durability.SYNC_WAL, hLog,
|
region = initHRegion(tableName, null, null, false, Durability.SYNC_WAL, hLog,
|
||||||
COLUMN_FAMILY_BYTES);
|
COLUMN_FAMILY_BYTES);
|
||||||
|
|
||||||
@ -4863,7 +4860,6 @@ public class TestHRegion {
|
|||||||
String callingMethod, Configuration conf, boolean isReadOnly, byte[]... families)
|
String callingMethod, Configuration conf, boolean isReadOnly, byte[]... families)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
Path logDir = TEST_UTIL.getDataTestDirOnTestFS(callingMethod + ".log");
|
Path logDir = TEST_UTIL.getDataTestDirOnTestFS(callingMethod + ".log");
|
||||||
ChunkCreator.initialize(MemStoreLABImpl.CHUNK_SIZE_DEFAULT, false, 0, 0, 0, null);
|
|
||||||
HRegionInfo hri = new HRegionInfo(tableName, startKey, stopKey);
|
HRegionInfo hri = new HRegionInfo(tableName, startKey, stopKey);
|
||||||
final WAL wal = HBaseTestingUtility.createWal(conf, logDir, hri);
|
final WAL wal = HBaseTestingUtility.createWal(conf, logDir, hri);
|
||||||
return initHRegion(tableName, startKey, stopKey, isReadOnly,
|
return initHRegion(tableName, startKey, stopKey, isReadOnly,
|
||||||
@ -4876,6 +4872,7 @@ public class TestHRegion {
|
|||||||
*/
|
*/
|
||||||
public HRegion initHRegion(TableName tableName, byte[] startKey, byte[] stopKey,
|
public HRegion initHRegion(TableName tableName, byte[] startKey, byte[] stopKey,
|
||||||
boolean isReadOnly, Durability durability, WAL wal, byte[]... families) throws IOException {
|
boolean isReadOnly, Durability durability, WAL wal, byte[]... families) throws IOException {
|
||||||
|
ChunkCreator.initialize(MemStoreLABImpl.CHUNK_SIZE_DEFAULT, false, 0, 0, 0, null);
|
||||||
return TEST_UTIL.createLocalHRegion(tableName, startKey, stopKey,
|
return TEST_UTIL.createLocalHRegion(tableName, startKey, stopKey,
|
||||||
isReadOnly, durability, wal, families);
|
isReadOnly, durability, wal, families);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user