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
This commit is contained in:
parent
93b8f1606e
commit
39c1c2ee2d
|
@ -92,10 +92,12 @@ public class TestImportTSVWithVisibilityLabels implements Configurable {
|
||||||
private static User SUPERUSER;
|
private static User SUPERUSER;
|
||||||
private static Configuration conf;
|
private static Configuration conf;
|
||||||
|
|
||||||
|
@Override
|
||||||
public Configuration getConf() {
|
public Configuration getConf() {
|
||||||
return util.getConfiguration();
|
return util.getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setConf(Configuration conf) {
|
public void setConf(Configuration conf) {
|
||||||
throw new IllegalArgumentException("setConf not supported");
|
throw new IllegalArgumentException("setConf not supported");
|
||||||
}
|
}
|
||||||
|
@ -121,6 +123,7 @@ public class TestImportTSVWithVisibilityLabels implements Configurable {
|
||||||
private static void createLabels() throws IOException, InterruptedException {
|
private static void createLabels() throws IOException, InterruptedException {
|
||||||
PrivilegedExceptionAction<VisibilityLabelsResponse> action =
|
PrivilegedExceptionAction<VisibilityLabelsResponse> action =
|
||||||
new PrivilegedExceptionAction<VisibilityLabelsResponse>() {
|
new PrivilegedExceptionAction<VisibilityLabelsResponse>() {
|
||||||
|
@Override
|
||||||
public VisibilityLabelsResponse run() throws Exception {
|
public VisibilityLabelsResponse run() throws Exception {
|
||||||
String[] labels = { SECRET, TOPSECRET, CONFIDENTIAL, PUBLIC, PRIVATE };
|
String[] labels = { SECRET, TOPSECRET, CONFIDENTIAL, PUBLIC, PRIVATE };
|
||||||
try {
|
try {
|
||||||
|
@ -173,12 +176,12 @@ public class TestImportTSVWithVisibilityLabels implements Configurable {
|
||||||
doMROnTableTest(util, FAMILY, data, args, 1);
|
doMROnTableTest(util, FAMILY, data, args, 1);
|
||||||
util.deleteTable(tableName);
|
util.deleteTable(tableName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testBulkOutputWithTsvImporterTextMapper() throws Exception {
|
public void testBulkOutputWithTsvImporterTextMapper() throws Exception {
|
||||||
String table = "test-" + UUID.randomUUID();
|
String table = "test-" + UUID.randomUUID();
|
||||||
String FAMILY = "FAM";
|
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.
|
// Prepare the arguments required for the test.
|
||||||
String[] args =
|
String[] args =
|
||||||
new String[] {
|
new String[] {
|
||||||
|
@ -187,13 +190,13 @@ public class TestImportTSVWithVisibilityLabels implements Configurable {
|
||||||
"-D" + ImportTsv.COLUMNS_CONF_KEY
|
"-D" + ImportTsv.COLUMNS_CONF_KEY
|
||||||
+ "=HBASE_ROW_KEY,FAM:A,FAM:B,HBASE_CELL_VISIBILITY",
|
+ "=HBASE_ROW_KEY,FAM:A,FAM:B,HBASE_CELL_VISIBILITY",
|
||||||
"-D" + ImportTsv.SEPARATOR_CONF_KEY + "=\u001b",
|
"-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";
|
String data = "KEY\u001bVALUE4\u001bVALUE8\u001bsecret&private\n";
|
||||||
doMROnTableTest(util, FAMILY, data, args, 4);
|
doMROnTableTest(util, FAMILY, data, args, 4);
|
||||||
util.deleteTable(table);
|
util.deleteTable(table);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMRWithOutputFormat() throws Exception {
|
public void testMRWithOutputFormat() throws Exception {
|
||||||
String tableName = "test-" + UUID.randomUUID();
|
String tableName = "test-" + UUID.randomUUID();
|
||||||
|
@ -210,13 +213,13 @@ public class TestImportTSVWithVisibilityLabels implements Configurable {
|
||||||
doMROnTableTest(util, FAMILY, data, args, 1);
|
doMROnTableTest(util, FAMILY, data, args, 1);
|
||||||
util.deleteTable(tableName);
|
util.deleteTable(tableName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run an ImportTsv job and perform basic validation on the results. Returns
|
* 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
|
* the ImportTsv <code>Tool</code> instance so that other tests can inspect it
|
||||||
* for further validation as necessary. This method is static to insure
|
* for further validation as necessary. This method is static to insure
|
||||||
* non-reliance on instance's util/conf facilities.
|
* non-reliance on instance's util/conf facilities.
|
||||||
*
|
*
|
||||||
* @param args
|
* @param args
|
||||||
* Any arguments to pass BEFORE inputFile path is appended.
|
* Any arguments to pass BEFORE inputFile path is appended.
|
||||||
* @return The Tool instance used to run the test.
|
* @return The Tool instance used to run the test.
|
||||||
|
|
Loading…
Reference in New Issue