// sleep for *SleepTime duration in Task by recSleepTime per record
mapSleepCount = (int)Math.ceil(mapSleepTime / ((double)recSleepTime));
reduceSleepCount = (int)Math.ceil(reduceSleepTime / ((double)recSleepTime));
iReduceSleepCount = (int)Math.ceil(iReduceSleepTime / ((double)recSleepTime));
TezConfiguration conf = new TezConfiguration(getConf());
FileSystem remoteFs = FileSystem.get(conf);
TezClient tezClient = new TezClient(conf);
ApplicationId appId =
tezClient.createApplication();
conf.set(TezConfiguration.TEZ_AM_STAGING_DIR,
conf.get(
TezConfiguration.TEZ_AM_STAGING_DIR,
TezConfiguration.TEZ_AM_STAGING_DIR_DEFAULT));
Path remoteStagingDir =
remoteFs.makeQualified(new Path(conf.get(
TezConfiguration.TEZ_AM_STAGING_DIR,
TezConfiguration.TEZ_AM_STAGING_DIR_DEFAULT),
appId.toString()));
TezClientUtils.ensureStagingDirExists(conf, remoteStagingDir);
DAG dag = createDAG(remoteFs, conf, appId, remoteStagingDir,
numMapper, numReducer, iReduceStagesCount, numIReducer,
mapSleepTime, mapSleepCount, reduceSleepTime, reduceSleepCount,
iReduceSleepTime, iReduceSleepCount, writeSplitsToDfs, generateSplitsInAM);
conf.set(TezConfiguration.TEZ_AM_JAVA_OPTS,
MRHelpers.getMRAMJavaOpts(conf));
AMConfiguration amConfig = new AMConfiguration(null,
null, conf, this.credentials);