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

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

Introduction

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

Prototype

ListClustersResult listClusters();

Source Link

Document

Simplified method form for invoking the ListClusters operation.

Usage

From source file:rollsPOC2.util.AWSHelper.java

public static ClusterSummary findCluster(String clusterName, AmazonElasticMapReduce emr) {
    ListClustersResult clusters = emr.listClusters();

    for (ClusterSummary clusterSummary : clusters.getClusters()) {
        if (clusterSummary.getName().equals(clusterName)) {
            return clusterSummary;
        }// www  .  j av  a  2 s.  c o m
    }

    return null;
}