本文整理汇总了Java中org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto类的典型用法代码示例。如果您正苦于以下问题:Java ApplicationReportProto类的具体用法?Java ApplicationReportProto怎么用?Java ApplicationReportProto使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ApplicationReportProto类属于org.apache.hadoop.yarn.proto.YarnProtos包,在下文中一共展示了ApplicationReportProto类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initLocalApplicationsList
import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto; //导入依赖的package包/类
private void initLocalApplicationsList() {
if (this.applicationList != null) {
return;
}
GetApplicationsResponseProtoOrBuilder p = viaProto ? proto : builder;
List<ApplicationReportProto> list = p.getApplicationsList();
applicationList = new ArrayList<ApplicationReport>();
for (ApplicationReportProto a : list) {
applicationList.add(convertFromProtoFormat(a));
}
}
示例2: addLocalApplicationsToProto
import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto; //导入依赖的package包/类
private void addLocalApplicationsToProto() {
maybeInitBuilder();
builder.clearApplications();
if (applicationList == null)
return;
Iterable<ApplicationReportProto> iterable = new Iterable<ApplicationReportProto>() {
@Override
public Iterator<ApplicationReportProto> iterator() {
return new Iterator<ApplicationReportProto>() {
Iterator<ApplicationReport> iter = applicationList.iterator();
@Override
public boolean hasNext() {
return iter.hasNext();
}
@Override
public ApplicationReportProto next() {
return convertToProtoFormat(iter.next());
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
}
};
builder.addAllApplications(iterable);
}
示例3: initLocalApplicationsList
import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto; //导入依赖的package包/类
private void initLocalApplicationsList() {
if (this.applicationsList != null) {
return;
}
QueueInfoProtoOrBuilder p = viaProto ? proto : builder;
List<ApplicationReportProto> list = p.getApplicationsList();
applicationsList = new ArrayList<ApplicationReport>();
for (ApplicationReportProto a : list) {
applicationsList.add(convertFromProtoFormat(a));
}
}
示例4: addApplicationsToProto
import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto; //导入依赖的package包/类
private void addApplicationsToProto() {
maybeInitBuilder();
builder.clearApplications();
if (applicationsList == null)
return;
Iterable<ApplicationReportProto> iterable = new Iterable<ApplicationReportProto>() {
@Override
public Iterator<ApplicationReportProto> iterator() {
return new Iterator<ApplicationReportProto>() {
Iterator<ApplicationReport> iter = applicationsList.iterator();
@Override
public boolean hasNext() {
return iter.hasNext();
}
@Override
public ApplicationReportProto next() {
return convertToProtoFormat(iter.next());
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
};
}
};
builder.addAllApplications(iterable);
}
示例5: convertFromProtoFormat
import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto; //导入依赖的package包/类
private ApplicationReportPBImpl convertFromProtoFormat(ApplicationReportProto p) {
return new ApplicationReportPBImpl(p);
}
示例6: convertToProtoFormat
import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto; //导入依赖的package包/类
private ApplicationReportProto convertToProtoFormat(ApplicationReport t) {
return ((ApplicationReportPBImpl)t).getProto();
}