当前位置: 首页>>代码示例>>Java>>正文


Java YarnServiceProtos类代码示例

本文整理汇总了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;
  }
}
 
开发者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


注:本文中的org.apache.hadoop.yarn.proto.YarnServiceProtos类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。