Skip to content

Commit 18a946b

Browse files
sunhellyJenkins
authored andcommitted
HBASE-22896 TestHRegion.testFlushMarkersWALFail is flaky (apache#551)
* HBASE-22896 TestHRegion.testFlushMarkersWALFail is flaky * delete blank line (cherry picked from commit f57ea4e) Change-Id: I7470acb1a75ca1996c453c70139edcfd3f257ae2
1 parent c7d5577 commit 18a946b

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,10 +1234,9 @@ public long getLength() {
12341234
this.region = initHRegion(tableName, HConstants.EMPTY_START_ROW,
12351235
HConstants.EMPTY_END_ROW, false, Durability.USE_DEFAULT, wal, family);
12361236
region.put(put);
1237-
12381237
// 3. Test case where ABORT_FLUSH will throw exception.
12391238
// Even if ABORT_FLUSH throws exception, we should not fail with IOE, but continue with
1240-
// DroppedSnapshotException. Below COMMMIT_FLUSH will cause flush to abort
1239+
// DroppedSnapshotException. Below COMMIT_FLUSH will cause flush to abort
12411240
wal.flushActions = new FlushAction [] {FlushAction.COMMIT_FLUSH, FlushAction.ABORT_FLUSH};
12421241

12431242
try {
@@ -2366,7 +2365,6 @@ public void testDataInMemoryWithoutWAL() throws IOException {
23662365
hLog.init();
23672366
// This chunk creation is done throughout the code base. Do we want to move it into core?
23682367
// It is missing from this test. W/o it we NPE.
2369-
ChunkCreator.initialize(MemStoreLABImpl.CHUNK_SIZE_DEFAULT, false, 0, 0, 0, null);
23702368
region = initHRegion(tableName, null, null, false, Durability.SYNC_WAL, hLog,
23712369
COLUMN_FAMILY_BYTES);
23722370

@@ -4852,7 +4850,6 @@ protected HRegion initHRegion(TableName tableName, byte[] startKey, byte[] stopK
48524850
String callingMethod, Configuration conf, boolean isReadOnly, byte[]... families)
48534851
throws IOException {
48544852
Path logDir = TEST_UTIL.getDataTestDirOnTestFS(callingMethod + ".log");
4855-
ChunkCreator.initialize(MemStoreLABImpl.CHUNK_SIZE_DEFAULT, false, 0, 0, 0, null);
48564853
HRegionInfo hri = new HRegionInfo(tableName, startKey, stopKey);
48574854
final WAL wal = HBaseTestingUtility.createWal(conf, logDir, hri);
48584855
return initHRegion(tableName, startKey, stopKey, isReadOnly,
@@ -4865,6 +4862,7 @@ protected HRegion initHRegion(TableName tableName, byte[] startKey, byte[] stopK
48654862
*/
48664863
public HRegion initHRegion(TableName tableName, byte[] startKey, byte[] stopKey,
48674864
boolean isReadOnly, Durability durability, WAL wal, byte[]... families) throws IOException {
4865+
ChunkCreator.initialize(MemStoreLABImpl.CHUNK_SIZE_DEFAULT, false, 0, 0, 0, null);
48684866
return TEST_UTIL.createLocalHRegion(tableName, startKey, stopKey,
48694867
isReadOnly, durability, wal, families);
48704868
}

0 commit comments

Comments
 (0)