From 39c1c2ee2ded52bdf6b933689fd9c050f7e100d5 Mon Sep 17 00:00:00 2001 From: Enis Soztutar Date: Thu, 20 Mar 2014 19:46:16 +0000 Subject: [PATCH] HBASE-10799 [WINDOWS] TestImportTSVWithVisibilityLabels.testBulkOutputWithTsvImporterTextMapper fails on windows git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1579723 13f79535-47bb-0310-9956-ffa450edef68 --- .../TestImportTSVWithVisibilityLabels.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java index 077c95a9b80..62005b830e3 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java @@ -92,10 +92,12 @@ public class TestImportTSVWithVisibilityLabels implements Configurable { private static User SUPERUSER; private static Configuration conf; + @Override public Configuration getConf() { return util.getConfiguration(); } + @Override public void setConf(Configuration conf) { throw new IllegalArgumentException("setConf not supported"); } @@ -121,6 +123,7 @@ public class TestImportTSVWithVisibilityLabels implements Configurable { private static void createLabels() throws IOException, InterruptedException { PrivilegedExceptionAction action = new PrivilegedExceptionAction() { + @Override public VisibilityLabelsResponse run() throws Exception { String[] labels = { SECRET, TOPSECRET, CONFIDENTIAL, PUBLIC, PRIVATE }; try { @@ -173,12 +176,12 @@ public class TestImportTSVWithVisibilityLabels implements Configurable { doMROnTableTest(util, FAMILY, data, args, 1); util.deleteTable(tableName); } - + @Test public void testBulkOutputWithTsvImporterTextMapper() throws Exception { String table = "test-" + UUID.randomUUID(); String FAMILY = "FAM"; - Path bulkOutputPath = new Path(util.getDataTestDir(table),"hfiles"); + Path bulkOutputPath = new Path(util.getDataTestDirOnTestFS(table),"hfiles"); // Prepare the arguments required for the test. String[] args = new String[] { @@ -187,13 +190,13 @@ public class TestImportTSVWithVisibilityLabels implements Configurable { "-D" + ImportTsv.COLUMNS_CONF_KEY + "=HBASE_ROW_KEY,FAM:A,FAM:B,HBASE_CELL_VISIBILITY", "-D" + ImportTsv.SEPARATOR_CONF_KEY + "=\u001b", - "-D" + ImportTsv.BULK_OUTPUT_CONF_KEY + "=" + bulkOutputPath.toString(), table + "-D" + ImportTsv.BULK_OUTPUT_CONF_KEY + "=" + bulkOutputPath.toString(), table }; String data = "KEY\u001bVALUE4\u001bVALUE8\u001bsecret&private\n"; doMROnTableTest(util, FAMILY, data, args, 4); util.deleteTable(table); } - + @Test public void testMRWithOutputFormat() throws Exception { String tableName = "test-" + UUID.randomUUID(); @@ -210,13 +213,13 @@ public class TestImportTSVWithVisibilityLabels implements Configurable { doMROnTableTest(util, FAMILY, data, args, 1); util.deleteTable(tableName); } - + /** * Run an ImportTsv job and perform basic validation on the results. Returns * the ImportTsv Tool instance so that other tests can inspect it * for further validation as necessary. This method is static to insure * non-reliance on instance's util/conf facilities. - * + * * @param args * Any arguments to pass BEFORE inputFile path is appended. * @return The Tool instance used to run the test.