本文整理汇总了Java中org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto类的典型用法代码示例。如果您正苦于以下问题:Java ContainerIdProto类的具体用法?Java ContainerIdProto怎么用?Java ContainerIdProto使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContainerIdProto类属于org.apache.hadoop.yarn.proto.YarnProtos包,在下文中一共展示了ContainerIdProto类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addLocalContainerIdsToProto
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void addLocalContainerIdsToProto() {
maybeInitBuilder();
builder.clearContainerId();
if (this.containerIds == null)
return;
List<ContainerIdProto> protoList = new ArrayList<ContainerIdProto>();
for (ContainerId id : containerIds) {
protoList.add(convertToProtoFormat(id));
}
builder.addAllContainerId(protoList);
}
示例2: addSucceededRequestsToProto
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void addSucceededRequestsToProto() {
maybeInitBuilder();
builder.clearSucceededRequests();
if (this.succeededRequests == null) {
return;
}
Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
@Override
public Iterator<ContainerIdProto> iterator() {
return new Iterator<ContainerIdProto>() {
Iterator<ContainerId> iter = succeededRequests.iterator();
@Override
public boolean hasNext() {
return iter.hasNext();
}
@Override
public ContainerIdProto next() {
return convertToProtoFormat(iter.next());
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
}
};
builder.addAllSucceededRequests(iterable);
}
示例3: initSucceededRequests
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void initSucceededRequests() {
if (this.succeededRequests != null)
return;
StopContainersResponseProtoOrBuilder p = viaProto ? proto : builder;
List<ContainerIdProto> list = p.getSucceededRequestsList();
this.succeededRequests = new ArrayList<ContainerId>();
for (ContainerIdProto c : list) {
this.succeededRequests.add(convertFromProtoFormat(c));
}
}
示例4: initReleases
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void initReleases() {
if (this.release != null) {
return;
}
AllocateRequestProtoOrBuilder p = viaProto ? proto : builder;
List<ContainerIdProto> list = p.getReleaseList();
this.release = new ArrayList<ContainerId>();
for (ContainerIdProto c : list) {
this.release.add(convertFromProtoFormat(c));
}
}
示例5: addReleasesToProto
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void addReleasesToProto() {
maybeInitBuilder();
builder.clearRelease();
if (release == null)
return;
Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
@Override
public Iterator<ContainerIdProto> iterator() {
return new Iterator<ContainerIdProto>() {
Iterator<ContainerId> iter = release.iterator();
@Override
public boolean hasNext() {
return iter.hasNext();
}
@Override
public ContainerIdProto next() {
return convertToProtoFormat(iter.next());
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
}
};
builder.addAllRelease(iterable);
}
示例6: addSucceededContainersToProto
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void addSucceededContainersToProto() {
maybeInitBuilder();
builder.clearSucceededRequests();
if (this.succeededContainers == null) {
return;
}
Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
@Override
public Iterator<ContainerIdProto> iterator() {
return new Iterator<ContainerIdProto>() {
Iterator<ContainerId> iter = succeededContainers.iterator();
@Override
public boolean hasNext() {
return iter.hasNext();
}
@Override
public ContainerIdProto next() {
return convertToProtoFormat(iter.next());
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
}
};
builder.addAllSucceededRequests(iterable);
}
示例7: initSucceededContainers
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void initSucceededContainers() {
if (this.succeededContainers != null)
return;
StartContainersResponseProtoOrBuilder p = viaProto ? proto : builder;
List<ContainerIdProto> list = p.getSucceededRequestsList();
this.succeededContainers = new ArrayList<ContainerId>();
for (ContainerIdProto c : list) {
this.succeededContainers.add(convertFromProtoFormat(c));
}
}
示例8: initContainersToCleanup
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void initContainersToCleanup() {
if (this.containersToCleanup != null) {
return;
}
NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
List<ContainerIdProto> list = p.getContainersToCleanupList();
this.containersToCleanup = new ArrayList<ContainerId>();
for (ContainerIdProto c : list) {
this.containersToCleanup.add(convertFromProtoFormat(c));
}
}
示例9: initContainersToBeRemovedFromNM
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void initContainersToBeRemovedFromNM() {
if (this.containersToBeRemovedFromNM != null) {
return;
}
NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
List<ContainerIdProto> list = p.getContainersToBeRemovedFromNmList();
this.containersToBeRemovedFromNM = new ArrayList<ContainerId>();
for (ContainerIdProto c : list) {
this.containersToBeRemovedFromNM.add(convertFromProtoFormat(c));
}
}
示例10: addContainersToCleanupToProto
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void addContainersToCleanupToProto() {
maybeInitBuilder();
builder.clearContainersToCleanup();
if (containersToCleanup == null)
return;
Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
@Override
public Iterator<ContainerIdProto> iterator() {
return new Iterator<ContainerIdProto>() {
Iterator<ContainerId> iter = containersToCleanup.iterator();
@Override
public boolean hasNext() {
return iter.hasNext();
}
@Override
public ContainerIdProto next() {
return convertToProtoFormat(iter.next());
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
}
};
builder.addAllContainersToCleanup(iterable);
}
示例11: addContainersToBeRemovedFromNMToProto
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void addContainersToBeRemovedFromNMToProto() {
maybeInitBuilder();
builder.clearContainersToBeRemovedFromNm();
if (containersToBeRemovedFromNM == null)
return;
Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
@Override
public Iterator<ContainerIdProto> iterator() {
return new Iterator<ContainerIdProto>() {
Iterator<ContainerId> iter = containersToBeRemovedFromNM.iterator();
@Override
public boolean hasNext() {
return iter.hasNext();
}
@Override
public ContainerIdProto next() {
return convertToProtoFormat(iter.next());
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
}
};
builder.addAllContainersToBeRemovedFromNm(iterable);
}
示例12: addSucceededRequestsToProto
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private void addSucceededRequestsToProto() {
maybeInitBuilder();
builder.clearSucceededRequests();
if (this.succeededRequests == null) {
return;
}
Iterable<ContainerIdProto> iterable = new Iterable<ContainerIdProto>() {
@Override
public Iterator<ContainerIdProto> iterator() {
return new Iterator<ContainerIdProto>() {
Iterator<ContainerId> iter = succeededRequests.iterator();
@Override
public boolean hasNext() {
return iter.hasNext();
}
@Override
public ContainerIdProto next() {
return convertToProtoFormat(iter.next());
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
}
};
builder.addAllSucceededRequests(iterable);
}
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:32,代码来源:IncreaseContainersResourceResponsePBImpl.java
示例13: convertFromProtoFormat
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private ContainerIdPBImpl convertFromProtoFormat(ContainerIdProto p) {
return new ContainerIdPBImpl(p);
}
示例14: convertToProtoFormat
import org.apache.hadoop.yarn.proto.YarnProtos.ContainerIdProto; //导入依赖的package包/类
private ContainerIdProto convertToProtoFormat(ContainerId t) {
return ((ContainerIdPBImpl) t).getProto();
}