Example usage for com.amazonaws.services.elasticmapreduce AmazonElasticMapReduce listSteps

List of usage examples for com.amazonaws.services.elasticmapreduce AmazonElasticMapReduce listSteps

Introduction

In this page you can find the example usage for com.amazonaws.services.elasticmapreduce AmazonElasticMapReduce listSteps.

Prototype

ListStepsResult listSteps(ListStepsRequest listStepsRequest);

Source Link

Document

Provides a list of steps for the cluster in reverse order unless you specify stepIds with the request of filter by StepStates.

Usage

From source file:rollsPOC2.util.AWSHelper.java

public static StepSummary findEMRStep(String clusterId, String stepName) {
    AmazonElasticMapReduce emr = AppServices.getEMRClient();
    ListStepsResult listStepsResponse = emr.listSteps(new ListStepsRequest().withClusterId(clusterId));
    for (StepSummary step : listStepsResponse.getSteps()) {
        if (step.getName().equals(stepName)) {
            return step;
        }//  w w  w .j ava 2 s.  c o m
    }

    return null;
}