[32/50] [abbrv] hbase git commit: HBASE-15384 Avoid using '/tmp' directory in TestBulkLoad
HBASE-15384 Avoid using '/tmp' directory in TestBulkLoad Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e9c4f128 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e9c4f128 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e9c4f128 Branch: refs/heads/hbase-12439 Commit: e9c4f12856420b3089665751ea141298580f6c21 Parents: 07c597c Author: chenhengAuthored: Thu Mar 24 15:19:02 2016 +0800 Committer: chenheng Committed: Fri Mar 25 12:06:55 2016 +0800 -- .../apache/hadoop/hbase/regionserver/TestBulkLoad.java | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/e9c4f128/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java index d0633a8..6ba12a9 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java @@ -38,6 +38,7 @@ import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.CellUtil; import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.HBaseConfiguration; +import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.HTableDescriptor; @@ -81,6 +82,7 @@ public class TestBulkLoad { @ClassRule public static TemporaryFolder testFolder = new TemporaryFolder(); + private static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); private final WAL log = mock(WAL.class); private final Configuration conf = HBaseConfiguration.create(); private final Random random = new Random(); @@ -217,13 +219,18 @@ public class TestBulkLoad { } private Pair withMissingHFileForFamily(byte[] family) { -return new Pair (family, "/tmp/does_not_exist"); +return new Pair (family, getNotExistFilePath()); + } + + private String getNotExistFilePath() { +Path path = new Path(TEST_UTIL.getDataTestDir(), "does_not_exist"); +return path.toUri().getPath(); } private Pair withInvalidColumnFamilyButProperHFileLocation(byte[] family) throws IOException { createHFileForFamilies(family); -return new Pair (new byte[]{0x00, 0x01, 0x02}, "/tmp/does_not_exist"); +return new Pair (new byte[]{0x00, 0x01, 0x02}, getNotExistFilePath()); }
hbase git commit: HBASE-15384 Avoid using '/tmp' directory in TestBulkLoad
Repository: hbase Updated Branches: refs/heads/branch-1.2 6a80087f4 -> c33e2352f HBASE-15384 Avoid using '/tmp' directory in TestBulkLoad Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c33e2352 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c33e2352 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c33e2352 Branch: refs/heads/branch-1.2 Commit: c33e2352f688e23c665216a6fa8ae99c0d284134 Parents: 6a80087 Author: chenhengAuthored: Thu Mar 24 15:19:02 2016 +0800 Committer: chenheng Committed: Tue Mar 29 11:13:34 2016 +0800 -- .../apache/hadoop/hbase/regionserver/TestBulkLoad.java | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/c33e2352/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java index 092f3ef..735fec8 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java @@ -38,6 +38,7 @@ import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.CellUtil; import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.HBaseConfiguration; +import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.HTableDescriptor; @@ -81,6 +82,7 @@ public class TestBulkLoad { @ClassRule public static TemporaryFolder testFolder = new TemporaryFolder(); + private static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); private final WAL log = mock(WAL.class); private final Configuration conf = HBaseConfiguration.create(); private final Random random = new Random(); @@ -216,13 +218,18 @@ public class TestBulkLoad { } private Pair withMissingHFileForFamily(byte[] family) { -return new Pair (family, "/tmp/does_not_exist"); +return new Pair (family, getNotExistFilePath()); + } + + private String getNotExistFilePath() { +Path path = new Path(TEST_UTIL.getDataTestDir(), "does_not_exist"); +return path.toUri().getPath(); } private Pair withInvalidColumnFamilyButProperHFileLocation(byte[] family) throws IOException { createHFileForFamilies(family); -return new Pair (new byte[]{0x00, 0x01, 0x02}, "/tmp/does_not_exist"); +return new Pair (new byte[]{0x00, 0x01, 0x02}, getNotExistFilePath()); }
hbase git commit: HBASE-15384 Avoid using '/tmp' directory in TestBulkLoad
Repository: hbase Updated Branches: refs/heads/branch-1.3 fc47cc38b -> 0f72597db HBASE-15384 Avoid using '/tmp' directory in TestBulkLoad Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/0f72597d Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/0f72597d Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/0f72597d Branch: refs/heads/branch-1.3 Commit: 0f72597db161ca8876821a2a939cf052f6f42f5c Parents: fc47cc3 Author: chenhengAuthored: Thu Mar 24 15:19:02 2016 +0800 Committer: chenheng Committed: Tue Mar 29 11:11:37 2016 +0800 -- .../apache/hadoop/hbase/regionserver/TestBulkLoad.java | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/0f72597d/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java index 092f3ef..735fec8 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java @@ -38,6 +38,7 @@ import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.CellUtil; import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.HBaseConfiguration; +import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.HTableDescriptor; @@ -81,6 +82,7 @@ public class TestBulkLoad { @ClassRule public static TemporaryFolder testFolder = new TemporaryFolder(); + private static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); private final WAL log = mock(WAL.class); private final Configuration conf = HBaseConfiguration.create(); private final Random random = new Random(); @@ -216,13 +218,18 @@ public class TestBulkLoad { } private Pair withMissingHFileForFamily(byte[] family) { -return new Pair (family, "/tmp/does_not_exist"); +return new Pair (family, getNotExistFilePath()); + } + + private String getNotExistFilePath() { +Path path = new Path(TEST_UTIL.getDataTestDir(), "does_not_exist"); +return path.toUri().getPath(); } private Pair withInvalidColumnFamilyButProperHFileLocation(byte[] family) throws IOException { createHFileForFamilies(family); -return new Pair (new byte[]{0x00, 0x01, 0x02}, "/tmp/does_not_exist"); +return new Pair (new byte[]{0x00, 0x01, 0x02}, getNotExistFilePath()); }
hbase git commit: HBASE-15384 Avoid using '/tmp' directory in TestBulkLoad
Repository: hbase Updated Branches: refs/heads/branch-1 5202d3c25 -> 13df65321 HBASE-15384 Avoid using '/tmp' directory in TestBulkLoad Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/13df6532 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/13df6532 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/13df6532 Branch: refs/heads/branch-1 Commit: 13df65321522831640ec08f209133b5ee7b8a6bf Parents: 5202d3c Author: chenhengAuthored: Thu Mar 24 15:19:02 2016 +0800 Committer: chenheng Committed: Tue Mar 29 11:10:44 2016 +0800 -- .../apache/hadoop/hbase/regionserver/TestBulkLoad.java | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/13df6532/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java index 092f3ef..735fec8 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java @@ -38,6 +38,7 @@ import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.CellUtil; import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.HBaseConfiguration; +import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.HTableDescriptor; @@ -81,6 +82,7 @@ public class TestBulkLoad { @ClassRule public static TemporaryFolder testFolder = new TemporaryFolder(); + private static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); private final WAL log = mock(WAL.class); private final Configuration conf = HBaseConfiguration.create(); private final Random random = new Random(); @@ -216,13 +218,18 @@ public class TestBulkLoad { } private Pair withMissingHFileForFamily(byte[] family) { -return new Pair (family, "/tmp/does_not_exist"); +return new Pair (family, getNotExistFilePath()); + } + + private String getNotExistFilePath() { +Path path = new Path(TEST_UTIL.getDataTestDir(), "does_not_exist"); +return path.toUri().getPath(); } private Pair withInvalidColumnFamilyButProperHFileLocation(byte[] family) throws IOException { createHFileForFamilies(family); -return new Pair (new byte[]{0x00, 0x01, 0x02}, "/tmp/does_not_exist"); +return new Pair (new byte[]{0x00, 0x01, 0x02}, getNotExistFilePath()); }
hbase git commit: HBASE-15384 Avoid using '/tmp' directory in TestBulkLoad
Repository: hbase Updated Branches: refs/heads/master 07c597c8a -> e9c4f1285 HBASE-15384 Avoid using '/tmp' directory in TestBulkLoad Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e9c4f128 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e9c4f128 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e9c4f128 Branch: refs/heads/master Commit: e9c4f12856420b3089665751ea141298580f6c21 Parents: 07c597c Author: chenhengAuthored: Thu Mar 24 15:19:02 2016 +0800 Committer: chenheng Committed: Fri Mar 25 12:06:55 2016 +0800 -- .../apache/hadoop/hbase/regionserver/TestBulkLoad.java | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/e9c4f128/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java index d0633a8..6ba12a9 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java @@ -38,6 +38,7 @@ import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.CellUtil; import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.HBaseConfiguration; +import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.HTableDescriptor; @@ -81,6 +82,7 @@ public class TestBulkLoad { @ClassRule public static TemporaryFolder testFolder = new TemporaryFolder(); + private static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); private final WAL log = mock(WAL.class); private final Configuration conf = HBaseConfiguration.create(); private final Random random = new Random(); @@ -217,13 +219,18 @@ public class TestBulkLoad { } private Pair withMissingHFileForFamily(byte[] family) { -return new Pair (family, "/tmp/does_not_exist"); +return new Pair (family, getNotExistFilePath()); + } + + private String getNotExistFilePath() { +Path path = new Path(TEST_UTIL.getDataTestDir(), "does_not_exist"); +return path.toUri().getPath(); } private Pair withInvalidColumnFamilyButProperHFileLocation(byte[] family) throws IOException { createHFileForFamilies(family); -return new Pair (new byte[]{0x00, 0x01, 0x02}, "/tmp/does_not_exist"); +return new Pair (new byte[]{0x00, 0x01, 0x02}, getNotExistFilePath()); }