Java Code Examples for org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils#convertToProtoFormat()

The following examples show how to use org.apache.hadoop.yarn.api.records.impl.pb.ProtoUtils#convertToProtoFormat() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GetClusterNodesRequestPBImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
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);
  }
}
 
Example 2
Source File: GetClusterNodesRequestPBImpl.java    From big-c with Apache License 2.0 5 votes vote down vote up
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);
  }
}
 
Example 3
Source File: ContainerFinishDataPBImpl.java    From hadoop with Apache License 2.0 4 votes vote down vote up
private ContainerStateProto convertToProtoFormat(ContainerState state) {
  return ProtoUtils.convertToProtoFormat(state);
}
 
Example 4
Source File: ApplicationAttemptFinishDataPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private YarnApplicationAttemptStateProto convertToProtoFormat(
    YarnApplicationAttemptState state) {
  return ProtoUtils.convertToProtoFormat(state);
}
 
Example 5
Source File: NMContainerStatusPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ContainerStateProto
    convertToProtoFormat(ContainerState containerState) {
  return ProtoUtils.convertToProtoFormat(containerState);
}
 
Example 6
Source File: ApplicationFinishDataPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private FinalApplicationStatusProto convertToProtoFormat(
    FinalApplicationStatus finalApplicationStatus) {
  return ProtoUtils.convertToProtoFormat(finalApplicationStatus);
}
 
Example 7
Source File: FinishApplicationMasterRequestPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private FinalApplicationStatusProto convertToProtoFormat(FinalApplicationStatus s) {
  return ProtoUtils.convertToProtoFormat(s);
}
 
Example 8
Source File: ApplicationAttemptFinishDataPBImpl.java    From hadoop with Apache License 2.0 4 votes vote down vote up
private YarnApplicationAttemptStateProto convertToProtoFormat(
    YarnApplicationAttemptState state) {
  return ProtoUtils.convertToProtoFormat(state);
}
 
Example 9
Source File: ApplicationAttemptFinishDataPBImpl.java    From hadoop with Apache License 2.0 4 votes vote down vote up
private FinalApplicationStatusProto convertToProtoFormat(
    FinalApplicationStatus finalApplicationStatus) {
  return ProtoUtils.convertToProtoFormat(finalApplicationStatus);
}
 
Example 10
Source File: ApplicationFinishDataPBImpl.java    From hadoop with Apache License 2.0 4 votes vote down vote up
private YarnApplicationStateProto convertToProtoFormat(
    YarnApplicationState state) {
  return ProtoUtils.convertToProtoFormat(state);
}
 
Example 11
Source File: ApplicationFinishDataPBImpl.java    From hadoop with Apache License 2.0 4 votes vote down vote up
private FinalApplicationStatusProto convertToProtoFormat(
    FinalApplicationStatus finalApplicationStatus) {
  return ProtoUtils.convertToProtoFormat(finalApplicationStatus);
}
 
Example 12
Source File: ContainerFinishDataPBImpl.java    From ambari-metrics with Apache License 2.0 4 votes vote down vote up
private ContainerStateProto convertToProtoFormat(ContainerState state) {
  return ProtoUtils.convertToProtoFormat(state);
}
 
Example 13
Source File: ApplicationAttemptStateDataPBImpl.java    From hadoop with Apache License 2.0 4 votes vote down vote up
private FinalApplicationStatusProto convertToProtoFormat(FinalApplicationStatus s) {
  return ProtoUtils.convertToProtoFormat(s);
}
 
Example 14
Source File: NMContainerStatusPBImpl.java    From hadoop with Apache License 2.0 4 votes vote down vote up
private ContainerStateProto
    convertToProtoFormat(ContainerState containerState) {
  return ProtoUtils.convertToProtoFormat(containerState);
}
 
Example 15
Source File: StartContainersResponsePBImpl.java    From hadoop with Apache License 2.0 4 votes vote down vote up
protected final ByteString convertToProtoFormat(ByteBuffer byteBuffer) {
  return ProtoUtils.convertToProtoFormat(byteBuffer);
}
 
Example 16
Source File: FinishApplicationMasterRequestPBImpl.java    From hadoop with Apache License 2.0 4 votes vote down vote up
private FinalApplicationStatusProto convertToProtoFormat(FinalApplicationStatus s) {
  return ProtoUtils.convertToProtoFormat(s);
}
 
Example 17
Source File: ContainerFinishDataPBImpl.java    From big-c with Apache License 2.0 4 votes vote down vote up
private ContainerStateProto convertToProtoFormat(ContainerState state) {
  return ProtoUtils.convertToProtoFormat(state);
}
 
Example 18
Source File: ApplicationAttemptFinishDataPBImpl.java    From ambari-metrics with Apache License 2.0 4 votes vote down vote up
private FinalApplicationStatusProto convertToProtoFormat(
    FinalApplicationStatus finalApplicationStatus) {
  return ProtoUtils.convertToProtoFormat(finalApplicationStatus);
}
 
Example 19
Source File: ApplicationFinishDataPBImpl.java    From ambari-metrics with Apache License 2.0 4 votes vote down vote up
private YarnApplicationStateProto convertToProtoFormat(
    YarnApplicationState state) {
  return ProtoUtils.convertToProtoFormat(state);
}
 
Example 20
Source File: ApplicationFinishDataPBImpl.java    From ambari-metrics with Apache License 2.0 4 votes vote down vote up
private FinalApplicationStatusProto convertToProtoFormat(
    FinalApplicationStatus finalApplicationStatus) {
  return ProtoUtils.convertToProtoFormat(finalApplicationStatus);
}