Java 类org.apache.hadoop.yarn.proto.YarnProtos.ReservationDefinitionProto 实例源码

项目:aliyun-oss-hadoop-fs    文件:ReservationSystemUtil.java   
public static ReservationAllocationStateProto buildStateProto(
    ReservationAllocation allocation) {
  ReservationAllocationStateProto.Builder builder =
      ReservationAllocationStateProto.newBuilder();

  builder.setAcceptanceTimestamp(allocation.getAcceptanceTime());
  builder.setContainsGangs(allocation.containsGangs());
  builder.setStartTime(allocation.getStartTime());
  builder.setEndTime(allocation.getEndTime());
  builder.setUser(allocation.getUser());
  ReservationDefinitionProto definitionProto = convertToProtoFormat(
      allocation.getReservationDefinition());
  builder.setReservationDefinition(definitionProto);

  for (Map.Entry<ReservationInterval, Resource> entry :
      allocation.getAllocationRequests().entrySet()) {
    ResourceAllocationRequestProto p =
        ResourceAllocationRequestProto.newBuilder()
        .setStartTime(entry.getKey().getStartTime())
        .setEndTime(entry.getKey().getEndTime())
        .setResource(convertToProtoFormat(entry.getValue()))
        .build();
    builder.addAllocationRequests(p);
  }

  ReservationAllocationStateProto allocationProto = builder.build();
  return allocationProto;
}
项目:hops    文件:ReservationSystemUtil.java   
public static ReservationAllocationStateProto buildStateProto(
    ReservationAllocation allocation) {
  ReservationAllocationStateProto.Builder builder =
      ReservationAllocationStateProto.newBuilder();

  builder.setAcceptanceTime(allocation.getAcceptanceTime());
  builder.setContainsGangs(allocation.containsGangs());
  builder.setStartTime(allocation.getStartTime());
  builder.setEndTime(allocation.getEndTime());
  builder.setUser(allocation.getUser());
  ReservationDefinitionProto definitionProto = convertToProtoFormat(
      allocation.getReservationDefinition());
  builder.setReservationDefinition(definitionProto);

  for (Map.Entry<ReservationInterval, Resource> entry :
      allocation.getAllocationRequests().entrySet()) {
    ResourceAllocationRequestProto p =
        ResourceAllocationRequestProto.newBuilder()
        .setStartTime(entry.getKey().getStartTime())
        .setEndTime(entry.getKey().getEndTime())
        .setResource(convertToProtoFormat(entry.getValue()))
        .build();
    builder.addAllocationRequests(p);
  }

  ReservationAllocationStateProto allocationProto = builder.build();
  return allocationProto;
}
项目:hadoop    文件:ReservationSubmissionRequestPBImpl.java   
private ReservationDefinitionProto convertToProtoFormat(
    ReservationDefinition r) {
  return ((ReservationDefinitionPBImpl) r).getProto();
}
项目:hadoop    文件:ReservationSubmissionRequestPBImpl.java   
private ReservationDefinitionPBImpl convertFromProtoFormat(
    ReservationDefinitionProto r) {
  return new ReservationDefinitionPBImpl(r);
}
项目:hadoop    文件:ReservationUpdateRequestPBImpl.java   
private ReservationDefinitionProto convertToProtoFormat(
    ReservationDefinition r) {
  return ((ReservationDefinitionPBImpl) r).getProto();
}
项目:hadoop    文件:ReservationUpdateRequestPBImpl.java   
private ReservationDefinitionPBImpl convertFromProtoFormat(
    ReservationDefinitionProto r) {
  return new ReservationDefinitionPBImpl(r);
}
项目:hadoop    文件:ReservationDefinitionPBImpl.java   
public ReservationDefinitionPBImpl() {
  builder = ReservationDefinitionProto.newBuilder();
}
项目:hadoop    文件:ReservationDefinitionPBImpl.java   
public ReservationDefinitionPBImpl(ReservationDefinitionProto proto) {
  this.proto = proto;
  viaProto = true;
}
项目:hadoop    文件:ReservationDefinitionPBImpl.java   
public ReservationDefinitionProto getProto() {
  mergeLocalToProto();
  proto = viaProto ? proto : builder.build();
  viaProto = true;
  return proto;
}
项目:hadoop    文件:ReservationDefinitionPBImpl.java   
private void maybeInitBuilder() {
  if (viaProto || builder == null) {
    builder = ReservationDefinitionProto.newBuilder(proto);
  }
  viaProto = false;
}
项目:aliyun-oss-hadoop-fs    文件:ReservationSubmissionRequestPBImpl.java   
private ReservationDefinitionProto convertToProtoFormat(
    ReservationDefinition r) {
  return ((ReservationDefinitionPBImpl) r).getProto();
}
项目:aliyun-oss-hadoop-fs    文件:ReservationSubmissionRequestPBImpl.java   
private ReservationDefinitionPBImpl convertFromProtoFormat(
    ReservationDefinitionProto r) {
  return new ReservationDefinitionPBImpl(r);
}
项目:aliyun-oss-hadoop-fs    文件:ReservationUpdateRequestPBImpl.java   
private ReservationDefinitionProto convertToProtoFormat(
    ReservationDefinition r) {
  return ((ReservationDefinitionPBImpl) r).getProto();
}
项目:aliyun-oss-hadoop-fs    文件:ReservationUpdateRequestPBImpl.java   
private ReservationDefinitionPBImpl convertFromProtoFormat(
    ReservationDefinitionProto r) {
  return new ReservationDefinitionPBImpl(r);
}
项目:aliyun-oss-hadoop-fs    文件:ReservationDefinitionPBImpl.java   
public ReservationDefinitionPBImpl() {
  builder = ReservationDefinitionProto.newBuilder();
}
项目:aliyun-oss-hadoop-fs    文件:ReservationDefinitionPBImpl.java   
public ReservationDefinitionPBImpl(ReservationDefinitionProto proto) {
  this.proto = proto;
  viaProto = true;
}
项目:aliyun-oss-hadoop-fs    文件:ReservationDefinitionPBImpl.java   
public ReservationDefinitionProto getProto() {
  mergeLocalToProto();
  proto = viaProto ? proto : builder.build();
  viaProto = true;
  return proto;
}
项目:aliyun-oss-hadoop-fs    文件:ReservationDefinitionPBImpl.java   
private void maybeInitBuilder() {
  if (viaProto || builder == null) {
    builder = ReservationDefinitionProto.newBuilder(proto);
  }
  viaProto = false;
}
项目:aliyun-oss-hadoop-fs    文件:ReservationSystemUtil.java   
private static ReservationDefinitionProto convertToProtoFormat(
    ReservationDefinition reservationDefinition) {
  return ((ReservationDefinitionPBImpl)reservationDefinition).getProto();
}
项目:aliyun-oss-hadoop-fs    文件:ReservationSystemUtil.java   
public static ReservationDefinitionPBImpl convertFromProtoFormat(
    ReservationDefinitionProto r) {
  return new ReservationDefinitionPBImpl(r);
}
项目:big-c    文件:ReservationSubmissionRequestPBImpl.java   
private ReservationDefinitionProto convertToProtoFormat(
    ReservationDefinition r) {
  return ((ReservationDefinitionPBImpl) r).getProto();
}
项目:big-c    文件:ReservationSubmissionRequestPBImpl.java   
private ReservationDefinitionPBImpl convertFromProtoFormat(
    ReservationDefinitionProto r) {
  return new ReservationDefinitionPBImpl(r);
}
项目:big-c    文件:ReservationUpdateRequestPBImpl.java   
private ReservationDefinitionProto convertToProtoFormat(
    ReservationDefinition r) {
  return ((ReservationDefinitionPBImpl) r).getProto();
}
项目:big-c    文件:ReservationUpdateRequestPBImpl.java   
private ReservationDefinitionPBImpl convertFromProtoFormat(
    ReservationDefinitionProto r) {
  return new ReservationDefinitionPBImpl(r);
}
项目:big-c    文件:ReservationDefinitionPBImpl.java   
public ReservationDefinitionPBImpl() {
  builder = ReservationDefinitionProto.newBuilder();
}
项目:big-c    文件:ReservationDefinitionPBImpl.java   
public ReservationDefinitionPBImpl(ReservationDefinitionProto proto) {
  this.proto = proto;
  viaProto = true;
}
项目:big-c    文件:ReservationDefinitionPBImpl.java   
public ReservationDefinitionProto getProto() {
  mergeLocalToProto();
  proto = viaProto ? proto : builder.build();
  viaProto = true;
  return proto;
}
项目:big-c    文件:ReservationDefinitionPBImpl.java   
private void maybeInitBuilder() {
  if (viaProto || builder == null) {
    builder = ReservationDefinitionProto.newBuilder(proto);
  }
  viaProto = false;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ReservationSubmissionRequestPBImpl.java   
private ReservationDefinitionProto convertToProtoFormat(
    ReservationDefinition r) {
  return ((ReservationDefinitionPBImpl) r).getProto();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ReservationSubmissionRequestPBImpl.java   
private ReservationDefinitionPBImpl convertFromProtoFormat(
    ReservationDefinitionProto r) {
  return new ReservationDefinitionPBImpl(r);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ReservationUpdateRequestPBImpl.java   
private ReservationDefinitionProto convertToProtoFormat(
    ReservationDefinition r) {
  return ((ReservationDefinitionPBImpl) r).getProto();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ReservationUpdateRequestPBImpl.java   
private ReservationDefinitionPBImpl convertFromProtoFormat(
    ReservationDefinitionProto r) {
  return new ReservationDefinitionPBImpl(r);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ReservationDefinitionPBImpl.java   
public ReservationDefinitionPBImpl() {
  builder = ReservationDefinitionProto.newBuilder();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ReservationDefinitionPBImpl.java   
public ReservationDefinitionPBImpl(ReservationDefinitionProto proto) {
  this.proto = proto;
  viaProto = true;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ReservationDefinitionPBImpl.java   
public ReservationDefinitionProto getProto() {
  mergeLocalToProto();
  proto = viaProto ? proto : builder.build();
  viaProto = true;
  return proto;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ReservationDefinitionPBImpl.java   
private void maybeInitBuilder() {
  if (viaProto || builder == null) {
    builder = ReservationDefinitionProto.newBuilder(proto);
  }
  viaProto = false;
}
项目:hops    文件:ReservationSubmissionRequestPBImpl.java   
private ReservationDefinitionProto convertToProtoFormat(
    ReservationDefinition r) {
  return ((ReservationDefinitionPBImpl) r).getProto();
}
项目:hops    文件:ReservationSubmissionRequestPBImpl.java   
private ReservationDefinitionPBImpl convertFromProtoFormat(
    ReservationDefinitionProto r) {
  return new ReservationDefinitionPBImpl(r);
}
项目:hops    文件:ReservationUpdateRequestPBImpl.java   
private ReservationDefinitionProto convertToProtoFormat(
    ReservationDefinition r) {
  return ((ReservationDefinitionPBImpl) r).getProto();
}
项目:hops    文件:ReservationUpdateRequestPBImpl.java   
private ReservationDefinitionPBImpl convertFromProtoFormat(
    ReservationDefinitionProto r) {
  return new ReservationDefinitionPBImpl(r);
}