本文整理汇总了Java中org.apache.hadoop.yarn.proto.YarnServiceProtos类的典型用法代码示例。如果您正苦于以下问题:Java YarnServiceProtos类的具体用法?Java YarnServiceProtos怎么用?Java YarnServiceProtos使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
YarnServiceProtos类属于org.apache.hadoop.yarn.proto包,在下文中一共展示了YarnServiceProtos类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNodeToLabels
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
@Override
public GetNodesToLabelsResponse getNodeToLabels(
GetNodesToLabelsRequest request)
throws YarnException, IOException {
YarnServiceProtos.GetNodesToLabelsRequestProto
requestProto =
((GetNodesToLabelsRequestPBImpl) request).getProto();
try {
return new GetNodesToLabelsResponsePBImpl(proxy.getNodeToLabels(
null, requestProto));
} catch (ServiceException e) {
RPCUtil.unwrapAndThrowException(e);
return null;
}
}
示例2: getLabelsToNodes
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
@Override
public GetLabelsToNodesResponse getLabelsToNodes(
GetLabelsToNodesRequest request)
throws YarnException, IOException {
YarnServiceProtos.GetLabelsToNodesRequestProto requestProto =
((GetLabelsToNodesRequestPBImpl) request).getProto();
try {
return new GetLabelsToNodesResponsePBImpl(proxy.getLabelsToNodes(
null, requestProto));
} catch (ServiceException e) {
RPCUtil.unwrapAndThrowException(e);
return null;
}
}
示例3: runCleanerTask
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
@Override
public RunSharedCacheCleanerTaskResponse runCleanerTask(
RunSharedCacheCleanerTaskRequest request) throws YarnException,
IOException {
YarnServiceProtos.RunSharedCacheCleanerTaskRequestProto requestProto =
((RunSharedCacheCleanerTaskRequestPBImpl) request).getProto();
try {
return new RunSharedCacheCleanerTaskResponsePBImpl(proxy.runCleanerTask(null,
requestProto));
} catch (ServiceException e) {
RPCUtil.unwrapAndThrowException(e);
return null;
}
}
示例4: signalContainer
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
@Override
public SignalContainerResponse signalContainer(
SignalContainerRequest request) throws YarnException, IOException {
YarnServiceProtos.SignalContainerRequestProto requestProto =
((SignalContainerRequestPBImpl) request).getProto();
try {
return new SignalContainerResponsePBImpl(
proxy.signalContainer(null, requestProto));
} catch (ServiceException e) {
RPCUtil.unwrapAndThrowException(e);
return null;
}
}
示例5: initLocalUpdatedContainerList
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
private synchronized void initLocalUpdatedContainerList() {
if (this.updatedContainers != null) {
return;
}
AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
List<YarnServiceProtos.UpdatedContainerProto> list =
p.getUpdatedContainersList();
updatedContainers = new ArrayList<>();
for (YarnServiceProtos.UpdatedContainerProto c : list) {
updatedContainers.add(convertFromProtoFormat(c));
}
}
示例6: initLocalUpdateErrorsList
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
private synchronized void initLocalUpdateErrorsList() {
if (updateErrors != null) {
return;
}
AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
List<YarnServiceProtos.UpdateContainerErrorProto> list =
p.getUpdateErrorsList();
this.updateErrors = new ArrayList<UpdateContainerError>();
for (YarnServiceProtos.UpdateContainerErrorProto t : list) {
updateErrors.add(ProtoUtils.convertFromProtoFormat(t));
}
}
示例7: getUpdateErrorsIterable
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
private synchronized Iterable<YarnServiceProtos.UpdateContainerErrorProto>
getUpdateErrorsIterable(
final List<UpdateContainerError> updateErrorsList) {
maybeInitBuilder();
return new Iterable<YarnServiceProtos.UpdateContainerErrorProto>() {
@Override
public synchronized Iterator<YarnServiceProtos
.UpdateContainerErrorProto> iterator() {
return new Iterator<YarnServiceProtos.UpdateContainerErrorProto>() {
private Iterator<UpdateContainerError> iter =
updateErrorsList.iterator();
@Override
public synchronized boolean hasNext() {
return iter.hasNext();
}
@Override
public synchronized YarnServiceProtos.UpdateContainerErrorProto
next() {
return ProtoUtils.convertToProtoFormat(iter.next());
}
@Override
public synchronized void remove() {
throw new UnsupportedOperationException();
}
};
}
};
}
示例8: getUpdatedContainerProtoIterable
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
private synchronized Iterable<YarnServiceProtos.UpdatedContainerProto>
getUpdatedContainerProtoIterable(
final List<UpdatedContainer> newUpdatedContainersList) {
maybeInitBuilder();
return new Iterable<YarnServiceProtos.UpdatedContainerProto>() {
@Override
public synchronized Iterator<YarnServiceProtos.UpdatedContainerProto>
iterator() {
return new Iterator<YarnServiceProtos.UpdatedContainerProto>() {
private Iterator<UpdatedContainer> iter =
newUpdatedContainersList.iterator();
@Override
public synchronized boolean hasNext() {
return iter.hasNext();
}
@Override
public synchronized YarnServiceProtos.UpdatedContainerProto next() {
return convertToProtoFormat(iter.next());
}
@Override
public synchronized void remove() {
throw new UnsupportedOperationException();
}
};
}
};
}
示例9: getUpdateType
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
@Override
public ContainerUpdateType getUpdateType() {
YarnServiceProtos.UpdatedContainerProtoOrBuilder p =
viaProto ? proto : builder;
if (!p.hasUpdateType()) {
return null;
}
return ProtoUtils.convertFromProtoFormat(p.getUpdateType());
}
示例10: getContainer
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
@Override
public Container getContainer() {
YarnServiceProtos.UpdatedContainerProtoOrBuilder p =
viaProto ? proto : builder;
if (this.container != null) {
return this.container;
}
if (!p.hasContainer()) {
return null;
}
this.container = ProtoUtils.convertFromProtoFormat(p.getContainer());
return this.container;
}
示例11: getContainerVersion
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
@Override
public int getContainerVersion() {
YarnServiceProtos.UpdateContainerRequestProtoOrBuilder p =
viaProto ? proto : builder;
if (!p.hasContainerVersion()) {
return 0;
}
return p.getContainerVersion();
}
示例12: getContainerId
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
@Override
public ContainerId getContainerId() {
YarnServiceProtos.UpdateContainerRequestProtoOrBuilder p =
viaProto ? proto : builder;
if (this.existingContainerId != null) {
return this.existingContainerId;
}
if (p.hasContainerId()) {
this.existingContainerId =
ProtoUtils.convertFromProtoFormat(p.getContainerId());
}
return this.existingContainerId;
}
示例13: getCapability
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
@Override
public Resource getCapability() {
YarnServiceProtos.UpdateContainerRequestProtoOrBuilder p = viaProto ? proto
: builder;
if (this.targetCapability != null) {
return this.targetCapability;
}
if (p.hasCapability()) {
this.targetCapability =
ProtoUtils.convertFromProtoFormat(p.getCapability());
}
return this.targetCapability;
}
示例14: getContainerUpdateType
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
@Override
public ContainerUpdateType getContainerUpdateType() {
YarnServiceProtos.UpdateContainerRequestProtoOrBuilder p =
viaProto ? proto : builder;
if (!p.hasUpdateType()) {
return null;
}
return ProtoUtils.convertFromProtoFormat(p.getUpdateType());
}
示例15: getReason
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
@Override
public String getReason() {
YarnServiceProtos.UpdateContainerErrorProtoOrBuilder p = viaProto ? proto
: builder;
if (this.reason != null) {
return this.reason;
}
if (p.hasReason()) {
this.reason = p.getReason();
}
return this.reason;
}