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


Java NMTokenProto类代码示例

本文整理汇总了Java中org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto的典型用法代码示例。如果您正苦于以下问题:Java NMTokenProto类的具体用法?Java NMTokenProto怎么用?Java NMTokenProto使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


NMTokenProto类属于org.apache.hadoop.yarn.proto.YarnServiceProtos包,在下文中一共展示了NMTokenProto类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: mergeLocalToBuilder

import org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto; //导入依赖的package包/类
private void mergeLocalToBuilder() {
  if (this.maximumResourceCapability != null) {
    builder.setMaximumCapability(
        convertToProtoFormat(this.maximumResourceCapability));
  }
  if (this.applicationACLS != null) {
    addApplicationACLs();
  }
  if (this.containersFromPreviousAttempts != null) {
    addContainersFromPreviousAttemptToProto();
  }
  if (nmTokens != null) {
    builder.clearNmTokensFromPreviousAttempts();
    Iterable<NMTokenProto> iterable = getTokenProtoIterable(nmTokens);
    builder.addAllNmTokensFromPreviousAttempts(iterable);
  }
  if(schedulerResourceTypes != null) {
    addSchedulerResourceTypes();
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:21,代码来源:RegisterApplicationMasterResponsePBImpl.java

示例2: mergeLocalToBuilder

import org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto; //导入依赖的package包/类
private void mergeLocalToBuilder() {
  if (this.maximumResourceCapability != null) {
    builder.setMaximumCapability(
        convertToProtoFormat(this.maximumResourceCapability));
  }
  if (this.applicationACLS != null) {
    addApplicationACLs();
  }
  if (this.containersFromPreviousAttempts != null) {
    addContainersFromPreviousAttemptToProto();
  }
  if (nmTokens != null) {
    builder.clearNmTokensFromPreviousAttempts();
    Iterable<NMTokenProto> iterable = getTokenProtoIterable(nmTokens);
    builder.addAllNmTokensFromPreviousAttempts(iterable);
  }
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre2,代码行数:18,代码来源:RegisterApplicationMasterResponsePBImpl.java

示例3: initLocalNewNMTokenList

import org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto; //导入依赖的package包/类
private synchronized void initLocalNewNMTokenList() {
  RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NMTokenProto> list = p.getNmTokensFromPreviousAttemptsList();
  nmTokens = new ArrayList<NMToken>();
  for (NMTokenProto t : list) {
    nmTokens.add(convertFromProtoFormat(t));
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:9,代码来源:RegisterApplicationMasterResponsePBImpl.java

示例4: getTokenProtoIterable

import org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto; //导入依赖的package包/类
private synchronized Iterable<NMTokenProto> getTokenProtoIterable(
    final List<NMToken> nmTokenList) {
  maybeInitBuilder();
  return new Iterable<NMTokenProto>() {
    @Override
    public synchronized Iterator<NMTokenProto> iterator() {
      return new Iterator<NMTokenProto>() {

        Iterator<NMToken> iter = nmTokenList.iterator();

        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }

        @Override
        public NMTokenProto next() {
          return convertToProtoFormat(iter.next());
        }

        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
}
 
开发者ID:naver,项目名称:hadoop,代码行数:29,代码来源:RegisterApplicationMasterResponsePBImpl.java

示例5: initLocalNewNMTokenList

import org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto; //导入依赖的package包/类
private synchronized void initLocalNewNMTokenList() {
  if (nmTokens != null) {
    return;
  }
  AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
  List<NMTokenProto> list = p.getNmTokensList();
  nmTokens = new ArrayList<NMToken>();
  for (NMTokenProto t : list) {
    nmTokens.add(convertFromProtoFormat(t));
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:12,代码来源:AllocateResponsePBImpl.java

示例6: getTokenProtoIterable

import org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto; //导入依赖的package包/类
private synchronized Iterable<NMTokenProto> getTokenProtoIterable(
    final List<NMToken> nmTokenList) {
  maybeInitBuilder();
  return new Iterable<NMTokenProto>() {
    @Override
    public synchronized Iterator<NMTokenProto> iterator() {
      return new Iterator<NMTokenProto>() {

        Iterator<NMToken> iter = nmTokenList.iterator();
        
        @Override
        public boolean hasNext() {
          return iter.hasNext();
        }
        
        @Override
        public NMTokenProto next() {
          return convertToProtoFormat(iter.next());
        }
        
        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
  };
}
 
开发者ID:naver,项目名称:hadoop,代码行数:29,代码来源:AllocateResponsePBImpl.java

示例7: convertToProtoFormat

import org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto; //导入依赖的package包/类
private NMTokenProto convertToProtoFormat(NMToken token) {
  return ((NMTokenPBImpl) token).getProto();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:RegisterApplicationMasterResponsePBImpl.java

示例8: convertFromProtoFormat

import org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto; //导入依赖的package包/类
private NMToken convertFromProtoFormat(NMTokenProto proto) {
  return new NMTokenPBImpl(proto);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:RegisterApplicationMasterResponsePBImpl.java

示例9: convertToProtoFormat

import org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto; //导入依赖的package包/类
private synchronized NMTokenProto convertToProtoFormat(NMToken token) {
  return ((NMTokenPBImpl)token).getProto();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:AllocateResponsePBImpl.java

示例10: convertFromProtoFormat

import org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto; //导入依赖的package包/类
private synchronized NMToken convertFromProtoFormat(NMTokenProto proto) {
  return new NMTokenPBImpl(proto);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:AllocateResponsePBImpl.java


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