use of alluxio.stress.jobservice.JobServiceMaxThroughputSummary in project alluxio by Alluxio.
the class JobServiceMaxThroughput method runSuite.
@Override
public JobServiceMaxThroughputSummary runSuite(String[] args) throws Exception {
try (JobMasterClient client = JobMasterClient.Factory.create(JobMasterClientContext.newBuilder(ClientContext.create(new InstancedConfiguration(ConfigurationUtils.defaults()))).build())) {
mNumWorkers = client.getAllWorkerHealth().size();
}
if (mNumWorkers <= 0) {
throw new IllegalStateException("No workers available for testing!");
}
JobServiceMaxThroughputSummary summary = new JobServiceMaxThroughputSummary();
summary.setParameters(mParameters);
List<String> baseArgs = new ArrayList<>(Arrays.asList(args));
int best = getBestThroughput(mParameters.mTargetThroughput, summary, baseArgs, mNumWorkers);
LOG.info("max throughput: " + best);
summary.setEndTimeMs(CommonUtils.getCurrentMs());
summary.setMaxThroughput(best);
return summary;
}
Aggregations