本文整理汇总了Java中org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils.convertToProtoFormat方法的典型用法代码示例。如果您正苦于以下问题:Java ProtoUtils.convertToProtoFormat方法的具体用法?Java ProtoUtils.convertToProtoFormat怎么用?Java ProtoUtils.convertToProtoFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils
的用法示例。
在下文中一共展示了ProtoUtils.convertToProtoFormat方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: mergeLocalToBuilder
import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private void mergeLocalToBuilder() {
if (this.states != null) {
maybeInitBuilder();
builder.clearNodeStates();
Iterable<NodeStateProto> iterable = new Iterable<NodeStateProto>() {
@Override
public Iterator<NodeStateProto> iterator() {
return new Iterator<NodeStateProto>() {
Iterator<NodeState> iter = states.iterator();
@Override
public boolean hasNext() {
return iter.hasNext();
}
@Override
public NodeStateProto next() {
return ProtoUtils.convertToProtoFormat(iter.next());
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
}
};
builder.addAllNodeStates(iterable);
}
}
示例2: getUpdateErrorsIterable
import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的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();
}
};
}
};
}
示例3: mergeLocalToBuilder
import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private void mergeLocalToBuilder() {
if (this.applicationTypes != null) {
addLocalApplicationTypesToProto();
}
if (this.applicationStates != null) {
maybeInitBuilder();
builder.clearApplicationStates();
Iterable<YarnApplicationStateProto> iterable =
new Iterable<YarnApplicationStateProto>() {
@Override
public Iterator<YarnApplicationStateProto> iterator() {
return new Iterator<YarnApplicationStateProto>() {
Iterator<YarnApplicationState> iter = applicationStates
.iterator();
@Override
public boolean hasNext() {
return iter.hasNext();
}
@Override
public YarnApplicationStateProto next() {
return ProtoUtils.convertToProtoFormat(iter.next());
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
}
};
builder.addAllApplicationStates(iterable);
}
}
示例4: convertToProtoFormat
import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private FinalApplicationStatusProto convertToProtoFormat(FinalApplicationStatus s) {
return ProtoUtils.convertToProtoFormat(s);
}
示例5: convertToProtoFormat
import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
protected final ByteString convertToProtoFormat(ByteBuffer byteBuffer) {
return ProtoUtils.convertToProtoFormat(byteBuffer);
}
示例6: convertToProtoFormat
import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private ContainerStateProto
convertToProtoFormat(ContainerState containerState) {
return ProtoUtils.convertToProtoFormat(containerState);
}
示例7: convertToProtoFormat
import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private ContainerStateProto convertToProtoFormat(ContainerState state) {
return ProtoUtils.convertToProtoFormat(state);
}
示例8: convertToProtoFormat
import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private FinalApplicationStatusProto convertToProtoFormat(
FinalApplicationStatus finalApplicationStatus) {
return ProtoUtils.convertToProtoFormat(finalApplicationStatus);
}
示例9: convertToProtoFormat
import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private ContainerTypeProto convertToProtoFormat(ContainerType containerType) {
return ProtoUtils.convertToProtoFormat(containerType);
}
示例10: convertToProtoFormat
import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private LogAggregationStatusProto
convertToProtoFormat(LogAggregationStatus s) {
return ProtoUtils.convertToProtoFormat(s);
}
示例11: convertToProtoFormat
import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private YarnApplicationStateProto convertToProtoFormat(
YarnApplicationState state) {
return ProtoUtils.convertToProtoFormat(state);
}
示例12: convertToProtoFormat
import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private YarnApplicationAttemptStateProto convertToProtoFormat(
YarnApplicationAttemptState state) {
return ProtoUtils.convertToProtoFormat(state);
}
示例13: convertToProtoFormat
import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private ByteString convertToProtoFormat(ByteBuffer byteBuffer) {
return ProtoUtils.convertToProtoFormat(byteBuffer);
}
示例14: mergeLocalToBuilder
import org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils; //导入方法依赖的package包/类
private void mergeLocalToBuilder() {
if (this.applicationTypes != null) {
addLocalApplicationTypesToProto();
}
if (this.applicationStates != null) {
maybeInitBuilder();
builder.clearApplicationStates();
Iterable<YarnApplicationStateProto> iterable =
new Iterable<YarnApplicationStateProto>() {
@Override
public Iterator<YarnApplicationStateProto> iterator() {
return new Iterator<YarnApplicationStateProto>() {
Iterator<YarnApplicationState> iter = applicationStates
.iterator();
@Override
public boolean hasNext() {
return iter.hasNext();
}
@Override
public YarnApplicationStateProto next() {
return ProtoUtils.convertToProtoFormat(iter.next());
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
}
};
builder.addAllApplicationStates(iterable);
}
if (this.applicationTags != null && !this.applicationTags.isEmpty()) {
builder.addAllApplicationTags(this.applicationTags);
}
if (this.scope != null) {
builder.setScope(ProtoUtils.convertToProtoFormat(scope));
}
}