Package org.apache.hadoop.yarn.proto.YarnServiceProtos

Examples of org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder


    this.amResponse = aMResponse;
  }
 
  @Override
  public int getNumClusterNodes() {
    AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
    return p.getNumClusterNodes();
  }
View Full Code Here


  }
   
 
  @Override
  public AMResponse getAMResponse() {
    AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
    if (this.amResponse != null) {
      return this.amResponse;
    }
    if (!p.hasAMResponse()) {
      return null;
    }
    this.amResponse= convertFromProtoFormat(p.getAMResponse());
    return this.amResponse;
  }
View Full Code Here

    viaProto = false;
  }
 
  @Override
  public synchronized AMCommand getAMCommand() {
    AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
    if (!p.hasAMCommand()) {
      return null;
    }
    return ProtoUtils.convertFromProtoFormat(p.getAMCommand());
  }
View Full Code Here

    builder.setAMCommand(ProtoUtils.convertToProtoFormat(command));
  }

  @Override
  public synchronized int getResponseId() {
    AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
    return (p.getResponseId());
  }
View Full Code Here

  public synchronized Resource getAvailableResources() {
    if (this.limit != null) {
      return this.limit;
    }

    AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
    if (!p.hasLimit()) {
      return null;
    }
    this.limit = convertFromProtoFormat(p.getLimit());
    return this.limit;
  }
View Full Code Here

    return nmTokens;
  }
 
  @Override
  public synchronized int getNumClusterNodes() {
    AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
    return p.getNumClusterNodes();
  }
View Full Code Here

    builder.setNumClusterNodes(numNodes);
  }

  @Override
  public synchronized PreemptionMessage getPreemptionMessage() {
    AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
    if (this.preempt != null) {
      return this.preempt;
    }
    if (!p.hasPreempt()) {
      return null;
    }
    this.preempt = convertFromProtoFormat(p.getPreempt());
    return this.preempt;
  }
View Full Code Here

  private synchronized void initLocalIncreasedContainerList() {
    if (this.increasedContainers != null) {
      return;
    }
    AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<ContainerResourceIncreaseProto> list = p.getIncreasedContainersList();
    increasedContainers = new ArrayList<ContainerResourceIncrease>();

    for (ContainerResourceIncreaseProto c : list) {
      increasedContainers.add(convertFromProtoFormat(c));
    }
View Full Code Here

  private synchronized void initLocalDecreasedContainerList() {
    if (this.decreasedContainers != null) {
      return;
    }
    AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<ContainerResourceDecreaseProto> list = p.getDecreasedContainersList();
    decreasedContainers = new ArrayList<ContainerResourceDecrease>();

    for (ContainerResourceDecreaseProto c : list) {
      decreasedContainers.add(convertFromProtoFormat(c));
    }
View Full Code Here

  // called.
  private synchronized void initLocalNewNodeReportList() {
    if (this.updatedNodes != null) {
      return;
    }
    AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<NodeReportProto> list = p.getUpdatedNodesList();
    updatedNodes = new ArrayList<NodeReport>(list.size());

    for (NodeReportProto n : list) {
      updatedNodes.add(convertFromProtoFormat(n));
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.yarn.proto.YarnServiceProtos.AllocateResponseProtoOrBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.