本文整理汇总了Java中org.apache.hadoop.yarn.proto.YarnServiceProtos类的典型用法代码示例。如果您正苦于以下问题:Java YarnServiceProtos类的具体用法?Java YarnServiceProtos怎么用?Java YarnServiceProtos使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
YarnServiceProtos类属于org.apache.hadoop.yarn.proto包,在下文中一共展示了YarnServiceProtos类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
}
开发者ID:naver,项目名称:hadoop,代码行数:16,代码来源:ApplicationClientProtocolPBClientImpl.java
示例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;
}
}
开发者ID:naver,项目名称:hadoop,代码行数:15,代码来源:ApplicationClientProtocolPBClientImpl.java
示例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;
}
}
开发者ID:naver,项目名称:hadoop,代码行数:15,代码来源:SCMAdminProtocolPBClientImpl.java
示例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;
}
}
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:14,代码来源:ApplicationClientProtocolPBClientImpl.java
示例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));
}
}
开发者ID:hopshadoop,项目名称:hops,代码行数:14,代码来源:AllocateResponsePBImpl.java
示例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));
}
}
开发者ID:hopshadoop,项目名称:hops,代码行数:13,代码来源:AllocateResponsePBImpl.java
示例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();
}
};
}
};
}
开发者ID:hopshadoop,项目名称:hops,代码行数:34,代码来源:AllocateResponsePBImpl.java
示例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();
}
};
}
};
}
开发者ID:hopshadoop,项目名称:hops,代码行数:34,代码来源:AllocateResponsePBImpl.java
示例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());
}
开发者ID:hopshadoop,项目名称:hops,代码行数:10,代码来源:UpdatedContainerPBImpl.java
示例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;
}
开发者ID:hopshadoop,项目名称:hops,代码行数:14,代码来源:UpdatedContainerPBImpl.java
示例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();
}
开发者ID:hopshadoop,项目名称:hops,代码行数:10,代码来源:UpdateContainerRequestPBImpl.java
示例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;
}
开发者ID:hopshadoop,项目名称:hops,代码行数:14,代码来源:UpdateContainerRequestPBImpl.java
示例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;
}
开发者ID:hopshadoop,项目名称:hops,代码行数:14,代码来源:UpdateContainerRequestPBImpl.java
示例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());
}
开发者ID:hopshadoop,项目名称:hops,代码行数:10,代码来源:UpdateContainerRequestPBImpl.java
示例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;
}
开发者ID:hopshadoop,项目名称:hops,代码行数:13,代码来源:UpdateContainerErrorPBImpl.java
示例16: getUpdateContainerRequest
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
@Override
public UpdateContainerRequest getUpdateContainerRequest() {
YarnServiceProtos.UpdateContainerErrorProtoOrBuilder p = viaProto ? proto
: builder;
if (this.updateRequest != null) {
return this.updateRequest;
}
if (p.hasUpdateRequest()) {
this.updateRequest =
ProtoUtils.convertFromProtoFormat(p.getUpdateRequest());
}
return this.updateRequest;
}
开发者ID:hopshadoop,项目名称:hops,代码行数:14,代码来源:UpdateContainerErrorPBImpl.java
示例17: getNewReservation
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
@Override
public GetNewReservationResponse getNewReservation(
GetNewReservationRequest request)
throws YarnException, IOException {
YarnServiceProtos.GetNewReservationRequestProto requestProto =
((GetNewReservationRequestPBImpl) request).getProto();
try {
return new GetNewReservationResponsePBImpl(proxy.getNewReservation(null,
requestProto));
} catch (ServiceException e) {
RPCUtil.unwrapAndThrowException(e);
return null;
}
}
开发者ID:hopshadoop,项目名称:hops,代码行数:15,代码来源:ApplicationClientProtocolPBClientImpl.java
示例18: listReservations
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
@Override
public ReservationListResponse listReservations(ReservationListRequest
request) throws YarnException, IOException {
YarnServiceProtos.ReservationListRequestProto requestProto =
((ReservationListRequestPBImpl) request).getProto();
try {
return new ReservationListResponsePBImpl(proxy.listReservations(null,
requestProto));
} catch (ServiceException e) {
RPCUtil.unwrapAndThrowException(e);
return null;
}
}
开发者ID:hopshadoop,项目名称:hops,代码行数:14,代码来源:ApplicationClientProtocolPBClientImpl.java
示例19: signalToContainer
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
@Override
public SignalContainerResponse signalToContainer(
SignalContainerRequest request) throws YarnException, IOException {
YarnServiceProtos.SignalContainerRequestProto requestProto =
((SignalContainerRequestPBImpl) request).getProto();
try {
return new SignalContainerResponsePBImpl(
proxy.signalToContainer(null, requestProto));
} catch (ServiceException e) {
RPCUtil.unwrapAndThrowException(e);
return null;
}
}
开发者ID:hopshadoop,项目名称:hops,代码行数:14,代码来源:ApplicationClientProtocolPBClientImpl.java
示例20: GetNodesToLabelsRequestPBImpl
import org.apache.hadoop.yarn.proto.YarnServiceProtos; //导入依赖的package包/类
public GetNodesToLabelsRequestPBImpl() {
builder = YarnServiceProtos.GetNodesToLabelsRequestProto.newBuilder();
}
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:GetNodesToLabelsRequestPBImpl.java
注:本文中的org.apache.hadoop.yarn.proto.YarnServiceProtos类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论