Repository: hbase Updated Branches: refs/heads/master 784c814e5 -> 58727343f
HBASE-11511 Write flush events to WAL (ADDENDUM to fix flaky test) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/58727343 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/58727343 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/58727343 Branch: refs/heads/master Commit: 58727343f2b7ac4093828ca645084901d7ca568c Parents: 784c814 Author: Enis Soztutar <e...@apache.org> Authored: Tue Jul 15 18:28:32 2014 -0700 Committer: Enis Soztutar <e...@apache.org> Committed: Tue Jul 15 18:28:32 2014 -0700 ---------------------------------------------------------------------- .../apache/hadoop/hbase/regionserver/TestHRegion.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/58727343/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java index 6e050a0..0f9de92 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java @@ -798,8 +798,8 @@ public class TestHRegion { String method = name.getMethodName(); TableName tableName = TableName.valueOf(method); byte[] family = Bytes.toBytes("family"); - Path logDir = TEST_UTIL.getDataTestDirOnTestFS("testRecoveredEditsIgnoreFlushMarkers.log"); - HLog hlog = HLogFactory.createHLog(FILESYSTEM, logDir, UUID.randomUUID().toString(), + Path logDir = TEST_UTIL.getDataTestDirOnTestFS(method + ".log"); + HLog hlog = HLogFactory.createHLog(FILESYSTEM, logDir, "logs", TEST_UTIL.getConfiguration()); this.region = initHRegion(tableName.getName(), HConstants.EMPTY_START_ROW, @@ -829,7 +829,7 @@ public class TestHRegion { // now verify that the flush markers are written hlog.close(); 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()); List<HLog.Entry> flushDescriptors = new ArrayList<HLog.Entry>(); @@ -942,8 +942,9 @@ public class TestHRegion { byte[] family = Bytes.toBytes("family"); // spy an actual WAL implementation to throw exception (was not able to mock) - Path logDir = TEST_UTIL.getDataTestDirOnTestFS("testRecoveredEditsIgnoreFlushMarkers.log"); - HLog hlog = spy(HLogFactory.createHLog(FILESYSTEM, logDir, UUID.randomUUID().toString(), + Path logDir = TEST_UTIL.getDataTestDirOnTestFS(method + "log"); + + HLog hlog = spy(HLogFactory.createHLog(FILESYSTEM, logDir, "logs", TEST_UTIL.getConfiguration())); this.region = initHRegion(tableName.getName(), HConstants.EMPTY_START_ROW,