本文整理汇总了Java中com.amazonaws.services.elasticmapreduce.model.TerminateJobFlowsRequest类的典型用法代码示例。如果您正苦于以下问题:Java TerminateJobFlowsRequest类的具体用法?Java TerminateJobFlowsRequest怎么用?Java TerminateJobFlowsRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TerminateJobFlowsRequest类属于com.amazonaws.services.elasticmapreduce.model包,在下文中一共展示了TerminateJobFlowsRequest类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: terminateEmrCluster
import com.amazonaws.services.elasticmapreduce.model.TerminateJobFlowsRequest; //导入依赖的package包/类
/**
* 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));
}
示例2: tearDownEmrClusters
import com.amazonaws.services.elasticmapreduce.model.TerminateJobFlowsRequest; //导入依赖的package包/类
@After
public void tearDownEmrClusters()
throws Exception
{
if (!clusterIds.isEmpty()) {
emr.terminateJobFlows(new TerminateJobFlowsRequest().withJobFlowIds(clusterIds));
}
}