You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by en...@apache.org on 2014/03/20 20:46:16 UTC
svn commit: r1579723 -
/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java
Author: enis
Date: Thu Mar 20 19:46:16 2014
New Revision: 1579723
URL: http://svn.apache.org/r1579723
Log:
HBASE-10799 [WINDOWS] TestImportTSVWithVisibilityLabels.testBulkOutputWithTsvImporterTextMapper fails on windows
Modified:
hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java
Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java?rev=1579723&r1=1579722&r2=1579723&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java (original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTSVWithVisibilityLabels.java Thu Mar 20 19:46:16 2014
@@ -92,10 +92,12 @@ public class TestImportTSVWithVisibility
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 TestImportTSVWithVisibility
private static void createLabels() throws IOException, InterruptedException {
PrivilegedExceptionAction<VisibilityLabelsResponse> action =
new PrivilegedExceptionAction<VisibilityLabelsResponse>() {
+ @Override
public VisibilityLabelsResponse run() throws Exception {
String[] labels = { SECRET, TOPSECRET, CONFIDENTIAL, PUBLIC, PRIVATE };
try {
@@ -173,12 +176,12 @@ public class TestImportTSVWithVisibility
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 TestImportTSVWithVisibility
"-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 TestImportTSVWithVisibility
doMROnTableTest(util, FAMILY, data, args, 1);
util.deleteTable(tableName);
}
-
+
/**
* Run an ImportTsv job and perform basic validation on the results. Returns
* the ImportTsv <code>Tool</code> 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.