hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-14572 TestImportExport#testImport94Table can't find its src data file
Date Wed, 07 Oct 2015 06:30:53 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 80be32720 -> ceb5a675f


HBASE-14572 TestImportExport#testImport94Table can't find its src data file


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ceb5a675
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ceb5a675
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ceb5a675

Branch: refs/heads/branch-1.2
Commit: ceb5a675f537f490ca5000b6445ef3e30e95a4d1
Parents: 80be327
Author: stack <stack@apache.org>
Authored: Tue Oct 6 23:27:58 2015 -0700
Committer: stack <stack@apache.org>
Committed: Tue Oct 6 23:30:44 2015 -0700

----------------------------------------------------------------------
 .../hbase/mapreduce/TestImportExport.java       | 22 +++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/ceb5a675/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
index 0acc8fb..269c957 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
@@ -27,6 +27,7 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
 import java.io.ByteArrayOutputStream;
+import java.io.File;
 import java.io.IOException;
 import java.io.PrintStream;
 import java.net.URL;
@@ -104,7 +105,8 @@ public class TestImportExport {
     UTIL.getConfiguration().setInt(HConstants.REGION_SERVER_HIGH_PRIORITY_HANDLER_COUNT,
10);
     UTIL.startMiniCluster();
     UTIL.startMiniMapReduceCluster();
-    FQ_OUTPUT_DIR =  new Path(OUTPUT_DIR).makeQualified(FileSystem.get(UTIL.getConfiguration())).toString();
+    FQ_OUTPUT_DIR =
+      new Path(OUTPUT_DIR).makeQualified(FileSystem.get(UTIL.getConfiguration())).toString();
   }
 
   @AfterClass
@@ -219,13 +221,19 @@ public class TestImportExport {
    */
   @Test
   public void testImport94Table() throws Exception {
-    URL url = TestImportExport.class.getResource(
-        "exportedTableIn94Format");
-    Path importPath = new Path(url.getPath());
+    final String name = "exportedTableIn94Format";
+    URL url = TestImportExport.class.getResource(name);
+    File f = new File(url.toURI());
+    if (!f.exists()) {
+      LOG.warn("FAILED TO FIND " + f + "; skipping out on test");
+      return;
+    }
+    assertTrue(f.exists());
+    LOG.info("FILE=" + f);
+    Path importPath = new Path(f.toURI());
     FileSystem fs = FileSystem.get(UTIL.getConfiguration());
-    fs.copyFromLocalFile(importPath, new Path(FQ_OUTPUT_DIR + Path.SEPARATOR
-        + "exportedTableIn94Format"));
-    String IMPORT_TABLE = "importTableExportedFrom94";
+    fs.copyFromLocalFile(importPath, new Path(FQ_OUTPUT_DIR + Path.SEPARATOR + name));
+    String IMPORT_TABLE = name;
     Table t = UTIL.createTable(TableName.valueOf(IMPORT_TABLE), Bytes.toBytes("f1"), 3);
     String[] args = new String[] {
         "-Dhbase.import.version=0.94" ,


Mime
View raw message