本文整理匯總了Java中org.apache.hadoop.yarn.api.records.ContainerId.fromString方法的典型用法代碼示例。如果您正苦於以下問題:Java ContainerId.fromString方法的具體用法?Java ContainerId.fromString怎麽用?Java ContainerId.fromString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.hadoop.yarn.api.records.ContainerId
的用法示例。
在下文中一共展示了ContainerId.fromString方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setupPreviousRunningContainers
import org.apache.hadoop.yarn.api.records.ContainerId; //導入方法依賴的package包/類
private void setupPreviousRunningContainers(RegisterApplicationMasterResponse response) {
String containerIdStr =
System.getenv(Environment.CONTAINER_ID.name());
ContainerId containerId = ContainerId.fromString(containerIdStr);
appAttemptId = containerId.getApplicationAttemptId();
List<Container> previousAMRunningContainers =
response.getContainersFromPreviousAttempts();
LOG.info(appAttemptId + " received " + previousAMRunningContainers.size()
+ " previous attempts' running containers on AM registration.");
for (Container container : previousAMRunningContainers) {
launchedContainers.add(container.getId());
}
allocatedContainerNum.addAndGet(previousAMRunningContainers.size());
}
示例2: toContainerId
import org.apache.hadoop.yarn.api.records.ContainerId; //導入方法依賴的package包/類
public static ContainerId toContainerId(String containerIdStr) {
return ContainerId.fromString(containerIdStr);
}