Java 类com.amazonaws.services.elasticmapreduce.model.TerminateJobFlowsRequest 实例源码

项目:herd    文件:EmrOperationsImpl.java   
/**
 * Terminate EMR cluster, overrides terminate protection if requested.
 */
@Override
public void terminateEmrCluster(AmazonElasticMapReduceClient emrClient, String clusterId, boolean overrideTerminationProtection)
{
    // Override terminate protection if requested.
    if (overrideTerminationProtection)
    {
        // Set termination protection
        emrClient.setTerminationProtection(new SetTerminationProtectionRequest().withJobFlowIds(clusterId).withTerminationProtected(false));
    }

    // Terminate the job flow
    emrClient.terminateJobFlows(new TerminateJobFlowsRequest().withJobFlowIds(clusterId));
}
项目:digdag    文件:EmrIT.java   
@After
public void tearDownEmrClusters()
        throws Exception
{
    if (!clusterIds.isEmpty()) {
        emr.terminateJobFlows(new TerminateJobFlowsRequest().withJobFlowIds(clusterIds));
    }
}