Search in sources :

Example 1 with JobServiceMaxThroughputSummary

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;
}
Also used : JobMasterClient(alluxio.client.job.JobMasterClient) InstancedConfiguration(alluxio.conf.InstancedConfiguration) ArrayList(java.util.ArrayList) JobServiceMaxThroughputSummary(alluxio.stress.jobservice.JobServiceMaxThroughputSummary)

Aggregations

JobMasterClient (alluxio.client.job.JobMasterClient)1 InstancedConfiguration (alluxio.conf.InstancedConfiguration)1 JobServiceMaxThroughputSummary (alluxio.stress.jobservice.JobServiceMaxThroughputSummary)1 ArrayList (java.util.ArrayList)1