本文整理汇总了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();
}
}
示例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);
}
}
示例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));
}
}
示例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();
}
};
}
};
}
示例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));
}
}
示例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();
}
};
}
};
}
示例7: convertToProtoFormat
import org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto; //导入依赖的package包/类
private NMTokenProto convertToProtoFormat(NMToken token) {
return ((NMTokenPBImpl) token).getProto();
}
示例8: convertFromProtoFormat
import org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto; //导入依赖的package包/类
private NMToken convertFromProtoFormat(NMTokenProto proto) {
return new NMTokenPBImpl(proto);
}
示例9: convertToProtoFormat
import org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto; //导入依赖的package包/类
private synchronized NMTokenProto convertToProtoFormat(NMToken token) {
return ((NMTokenPBImpl)token).getProto();
}
示例10: convertFromProtoFormat
import org.apache.hadoop.yarn.proto.YarnServiceProtos.NMTokenProto; //导入依赖的package包/类
private synchronized NMToken convertFromProtoFormat(NMTokenProto proto) {
return new NMTokenPBImpl(proto);
}