本文整理匯總了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));
}
}