HBASE-11511 Write flush events to WAL (ADDENDUM to fix flaky test)
This commit is contained in:
parent
9dda92dbed
commit
07643580bb
|
@ -798,8 +798,8 @@ public class TestHRegion {
|
||||||
String method = name.getMethodName();
|
String method = name.getMethodName();
|
||||||
TableName tableName = TableName.valueOf(method);
|
TableName tableName = TableName.valueOf(method);
|
||||||
byte[] family = Bytes.toBytes("family");
|
byte[] family = Bytes.toBytes("family");
|
||||||
Path logDir = TEST_UTIL.getDataTestDirOnTestFS("testRecoveredEditsIgnoreFlushMarkers.log");
|
Path logDir = TEST_UTIL.getDataTestDirOnTestFS(method + ".log");
|
||||||
HLog hlog = HLogFactory.createHLog(FILESYSTEM, logDir, UUID.randomUUID().toString(),
|
HLog hlog = HLogFactory.createHLog(FILESYSTEM, logDir, "logs",
|
||||||
TEST_UTIL.getConfiguration());
|
TEST_UTIL.getConfiguration());
|
||||||
|
|
||||||
this.region = initHRegion(tableName.getName(), HConstants.EMPTY_START_ROW,
|
this.region = initHRegion(tableName.getName(), HConstants.EMPTY_START_ROW,
|
||||||
|
@ -829,7 +829,7 @@ public class TestHRegion {
|
||||||
// now verify that the flush markers are written
|
// now verify that the flush markers are written
|
||||||
hlog.close();
|
hlog.close();
|
||||||
HLog.Reader reader = HLogFactory.createReader(fs,
|
HLog.Reader reader = HLogFactory.createReader(fs,
|
||||||
fs.listStatus(fs.listStatus(logDir)[0].getPath())[0].getPath(),
|
fs.listStatus(new Path(logDir, "logs"))[0].getPath(),
|
||||||
TEST_UTIL.getConfiguration());
|
TEST_UTIL.getConfiguration());
|
||||||
|
|
||||||
List<HLog.Entry> flushDescriptors = new ArrayList<HLog.Entry>();
|
List<HLog.Entry> flushDescriptors = new ArrayList<HLog.Entry>();
|
||||||
|
@ -942,8 +942,9 @@ public class TestHRegion {
|
||||||
byte[] family = Bytes.toBytes("family");
|
byte[] family = Bytes.toBytes("family");
|
||||||
|
|
||||||
// spy an actual WAL implementation to throw exception (was not able to mock)
|
// spy an actual WAL implementation to throw exception (was not able to mock)
|
||||||
Path logDir = TEST_UTIL.getDataTestDirOnTestFS("testRecoveredEditsIgnoreFlushMarkers.log");
|
Path logDir = TEST_UTIL.getDataTestDirOnTestFS(method + "log");
|
||||||
HLog hlog = spy(HLogFactory.createHLog(FILESYSTEM, logDir, UUID.randomUUID().toString(),
|
|
||||||
|
HLog hlog = spy(HLogFactory.createHLog(FILESYSTEM, logDir, "logs",
|
||||||
TEST_UTIL.getConfiguration()));
|
TEST_UTIL.getConfiguration()));
|
||||||
|
|
||||||
this.region = initHRegion(tableName.getName(), HConstants.EMPTY_START_ROW,
|
this.region = initHRegion(tableName.getName(), HConstants.EMPTY_START_ROW,
|
||||||
|
|
Loading…
Reference in New Issue