HBASE-8453. TestImportExport failing again due to configuration issues
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1477373 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
518168296c
commit
e8dfdeb6ec
|
@ -1997,6 +1997,10 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
|
|||
return dfsCluster;
|
||||
}
|
||||
|
||||
public MiniMRCluster getMRCluster() {
|
||||
return mrCluster;
|
||||
}
|
||||
|
||||
public void setDFSCluster(MiniDFSCluster cluster) throws IOException {
|
||||
if (dfsCluster != null && dfsCluster.isClusterUp()) {
|
||||
throw new IOException("DFSCluster is already running! Shut it down first.");
|
||||
|
|
|
@ -26,6 +26,7 @@ import java.io.IOException;
|
|||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.fs.FileSystem;
|
||||
import org.apache.hadoop.fs.Path;
|
||||
import org.apache.hadoop.hbase.HBaseConfiguration;
|
||||
import org.apache.hadoop.hbase.HBaseTestingUtility;
|
||||
import org.apache.hadoop.hbase.HColumnDescriptor;
|
||||
import org.apache.hadoop.hbase.HTableDescriptor;
|
||||
|
@ -41,6 +42,7 @@ import org.apache.hadoop.hbase.client.Scan;
|
|||
import org.apache.hadoop.hbase.filter.Filter;
|
||||
import org.apache.hadoop.hbase.filter.PrefixFilter;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.hadoop.mapred.JobConf;
|
||||
import org.apache.hadoop.mapreduce.Job;
|
||||
import org.apache.hadoop.util.GenericOptionsParser;
|
||||
import org.junit.After;
|
||||
|
@ -103,7 +105,9 @@ public class TestImportExport {
|
|||
GenericOptionsParser opts = new GenericOptionsParser(new Configuration(UTIL.getConfiguration()), args);
|
||||
Configuration conf = opts.getConfiguration();
|
||||
args = opts.getRemainingArgs();
|
||||
Job job = Export.createSubmittableJob(conf, args);
|
||||
JobConf jobConf = UTIL.getMRCluster().createJobConf();
|
||||
HBaseConfiguration.merge(jobConf, conf);
|
||||
Job job = Export.createSubmittableJob(jobConf, args);
|
||||
job.waitForCompletion(false);
|
||||
return job.isSuccessful();
|
||||
}
|
||||
|
@ -121,7 +125,9 @@ public class TestImportExport {
|
|||
GenericOptionsParser opts = new GenericOptionsParser(new Configuration(UTIL.getConfiguration()), args);
|
||||
Configuration conf = opts.getConfiguration();
|
||||
args = opts.getRemainingArgs();
|
||||
Job job = Import.createSubmittableJob(conf, args);
|
||||
JobConf jobConf = UTIL.getMRCluster().createJobConf();
|
||||
HBaseConfiguration.merge(jobConf, conf);
|
||||
Job job = Import.createSubmittableJob(jobConf, args);
|
||||
job.waitForCompletion(false);
|
||||
return job.isSuccessful();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue