Вот так
org.apache.hadoop.conf.Configuration conf = HBaseConfiguration.
create();
conf.addResource(new Path("./resources/hbase-site.xml"));
conf.addResource(new Path("./resources/hdfs-site.xml"));
conf.addResource(new Path("./resources/yarn-site.xml"));
conf.addResource(new Path("./resources/mapred-site.xml"));
conf.addResource(new Path("./resources/core-site.xml"));
ExecutionContext jobContext = GetJobContext(chunkContext);
Long StartTimestamp = (Long) jobContext.get("StartTimestamp");
Long EndTimestamp = (Long) jobContext.get("EndTimestamp");
String args[] = new String[5];
args[0]="--starttime=" + StartTimestamp.toString();
args[1]="--endtime=" + EndTimestamp.toString();
args[2]="--
new.name=STG.NEW_NAME;
args[3]="--peer.adr=host1,host2,host3:2181:/hbase";
args[4]="OLD_NAME";
int ret =
ToolRunner.runrun(new CopyTable(conf), args);