This project has retired. For details please refer to its Attic page.
Source code
001// Generated by the protocol buffer compiler.  DO NOT EDIT!
002// source: driver_runtime.proto
003
004package org.apache.reef.proto;
005
006public final class DriverRuntimeProtocol {
007  private DriverRuntimeProtocol() {}
008  public static void registerAllExtensions(
009      com.google.protobuf.ExtensionRegistry registry) {
010  }
011  public interface DriverProcessRegistrationProtoOrBuilder
012      extends com.google.protobuf.MessageOrBuilder {
013
014    // required string remote_identifier = 1;
015    /**
016     * <code>required string remote_identifier = 1;</code>
017     */
018    boolean hasRemoteIdentifier();
019    /**
020     * <code>required string remote_identifier = 1;</code>
021     */
022    java.lang.String getRemoteIdentifier();
023    /**
024     * <code>required string remote_identifier = 1;</code>
025     */
026    com.google.protobuf.ByteString
027        getRemoteIdentifierBytes();
028  }
029  /**
030   * Protobuf type {@code DriverProcessRegistrationProto}
031   */
032  public static final class DriverProcessRegistrationProto extends
033      com.google.protobuf.GeneratedMessage
034      implements DriverProcessRegistrationProtoOrBuilder {
035    // Use DriverProcessRegistrationProto.newBuilder() to construct.
036    private DriverProcessRegistrationProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
037      super(builder);
038      this.unknownFields = builder.getUnknownFields();
039    }
040    private DriverProcessRegistrationProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
041
042    private static final DriverProcessRegistrationProto defaultInstance;
043    public static DriverProcessRegistrationProto getDefaultInstance() {
044      return defaultInstance;
045    }
046
047    public DriverProcessRegistrationProto getDefaultInstanceForType() {
048      return defaultInstance;
049    }
050
051    private final com.google.protobuf.UnknownFieldSet unknownFields;
052    @java.lang.Override
053    public final com.google.protobuf.UnknownFieldSet
054        getUnknownFields() {
055      return this.unknownFields;
056    }
057    private DriverProcessRegistrationProto(
058        com.google.protobuf.CodedInputStream input,
059        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
060        throws com.google.protobuf.InvalidProtocolBufferException {
061      initFields();
062      int mutable_bitField0_ = 0;
063      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
064          com.google.protobuf.UnknownFieldSet.newBuilder();
065      try {
066        boolean done = false;
067        while (!done) {
068          int tag = input.readTag();
069          switch (tag) {
070            case 0:
071              done = true;
072              break;
073            default: {
074              if (!parseUnknownField(input, unknownFields,
075                                     extensionRegistry, tag)) {
076                done = true;
077              }
078              break;
079            }
080            case 10: {
081              bitField0_ |= 0x00000001;
082              remoteIdentifier_ = input.readBytes();
083              break;
084            }
085          }
086        }
087      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
088        throw e.setUnfinishedMessage(this);
089      } catch (java.io.IOException e) {
090        throw new com.google.protobuf.InvalidProtocolBufferException(
091            e.getMessage()).setUnfinishedMessage(this);
092      } finally {
093        this.unknownFields = unknownFields.build();
094        makeExtensionsImmutable();
095      }
096    }
097    public static final com.google.protobuf.Descriptors.Descriptor
098        getDescriptor() {
099      return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_DriverProcessRegistrationProto_descriptor;
100    }
101
102    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
103        internalGetFieldAccessorTable() {
104      return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_DriverProcessRegistrationProto_fieldAccessorTable
105          .ensureFieldAccessorsInitialized(
106              org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto.class, org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto.Builder.class);
107    }
108
109    public static com.google.protobuf.Parser<DriverProcessRegistrationProto> PARSER =
110        new com.google.protobuf.AbstractParser<DriverProcessRegistrationProto>() {
111      public DriverProcessRegistrationProto parsePartialFrom(
112          com.google.protobuf.CodedInputStream input,
113          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
114          throws com.google.protobuf.InvalidProtocolBufferException {
115        return new DriverProcessRegistrationProto(input, extensionRegistry);
116      }
117    };
118
119    @java.lang.Override
120    public com.google.protobuf.Parser<DriverProcessRegistrationProto> getParserForType() {
121      return PARSER;
122    }
123
124    private int bitField0_;
125    // required string remote_identifier = 1;
126    public static final int REMOTE_IDENTIFIER_FIELD_NUMBER = 1;
127    private java.lang.Object remoteIdentifier_;
128    /**
129     * <code>required string remote_identifier = 1;</code>
130     */
131    public boolean hasRemoteIdentifier() {
132      return ((bitField0_ & 0x00000001) == 0x00000001);
133    }
134    /**
135     * <code>required string remote_identifier = 1;</code>
136     */
137    public java.lang.String getRemoteIdentifier() {
138      java.lang.Object ref = remoteIdentifier_;
139      if (ref instanceof java.lang.String) {
140        return (java.lang.String) ref;
141      } else {
142        com.google.protobuf.ByteString bs = 
143            (com.google.protobuf.ByteString) ref;
144        java.lang.String s = bs.toStringUtf8();
145        if (bs.isValidUtf8()) {
146          remoteIdentifier_ = s;
147        }
148        return s;
149      }
150    }
151    /**
152     * <code>required string remote_identifier = 1;</code>
153     */
154    public com.google.protobuf.ByteString
155        getRemoteIdentifierBytes() {
156      java.lang.Object ref = remoteIdentifier_;
157      if (ref instanceof java.lang.String) {
158        com.google.protobuf.ByteString b = 
159            com.google.protobuf.ByteString.copyFromUtf8(
160                (java.lang.String) ref);
161        remoteIdentifier_ = b;
162        return b;
163      } else {
164        return (com.google.protobuf.ByteString) ref;
165      }
166    }
167
168    private void initFields() {
169      remoteIdentifier_ = "";
170    }
171    private byte memoizedIsInitialized = -1;
172    public final boolean isInitialized() {
173      byte isInitialized = memoizedIsInitialized;
174      if (isInitialized != -1) return isInitialized == 1;
175
176      if (!hasRemoteIdentifier()) {
177        memoizedIsInitialized = 0;
178        return false;
179      }
180      memoizedIsInitialized = 1;
181      return true;
182    }
183
184    public void writeTo(com.google.protobuf.CodedOutputStream output)
185                        throws java.io.IOException {
186      getSerializedSize();
187      if (((bitField0_ & 0x00000001) == 0x00000001)) {
188        output.writeBytes(1, getRemoteIdentifierBytes());
189      }
190      getUnknownFields().writeTo(output);
191    }
192
193    private int memoizedSerializedSize = -1;
194    public int getSerializedSize() {
195      int size = memoizedSerializedSize;
196      if (size != -1) return size;
197
198      size = 0;
199      if (((bitField0_ & 0x00000001) == 0x00000001)) {
200        size += com.google.protobuf.CodedOutputStream
201          .computeBytesSize(1, getRemoteIdentifierBytes());
202      }
203      size += getUnknownFields().getSerializedSize();
204      memoizedSerializedSize = size;
205      return size;
206    }
207
208    private static final long serialVersionUID = 0L;
209    @java.lang.Override
210    protected java.lang.Object writeReplace()
211        throws java.io.ObjectStreamException {
212      return super.writeReplace();
213    }
214
215    @java.lang.Override
216    public boolean equals(final java.lang.Object obj) {
217      if (obj == this) {
218       return true;
219      }
220      if (!(obj instanceof org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto)) {
221        return super.equals(obj);
222      }
223      org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto other = (org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto) obj;
224
225      boolean result = true;
226      result = result && (hasRemoteIdentifier() == other.hasRemoteIdentifier());
227      if (hasRemoteIdentifier()) {
228        result = result && getRemoteIdentifier()
229            .equals(other.getRemoteIdentifier());
230      }
231      result = result &&
232          getUnknownFields().equals(other.getUnknownFields());
233      return result;
234    }
235
236    private int memoizedHashCode = 0;
237    @java.lang.Override
238    public int hashCode() {
239      if (memoizedHashCode != 0) {
240        return memoizedHashCode;
241      }
242      int hash = 41;
243      hash = (19 * hash) + getDescriptorForType().hashCode();
244      if (hasRemoteIdentifier()) {
245        hash = (37 * hash) + REMOTE_IDENTIFIER_FIELD_NUMBER;
246        hash = (53 * hash) + getRemoteIdentifier().hashCode();
247      }
248      hash = (29 * hash) + getUnknownFields().hashCode();
249      memoizedHashCode = hash;
250      return hash;
251    }
252
253    public static org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto parseFrom(
254        com.google.protobuf.ByteString data)
255        throws com.google.protobuf.InvalidProtocolBufferException {
256      return PARSER.parseFrom(data);
257    }
258    public static org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto parseFrom(
259        com.google.protobuf.ByteString data,
260        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
261        throws com.google.protobuf.InvalidProtocolBufferException {
262      return PARSER.parseFrom(data, extensionRegistry);
263    }
264    public static org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto parseFrom(byte[] data)
265        throws com.google.protobuf.InvalidProtocolBufferException {
266      return PARSER.parseFrom(data);
267    }
268    public static org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto parseFrom(
269        byte[] data,
270        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
271        throws com.google.protobuf.InvalidProtocolBufferException {
272      return PARSER.parseFrom(data, extensionRegistry);
273    }
274    public static org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto parseFrom(java.io.InputStream input)
275        throws java.io.IOException {
276      return PARSER.parseFrom(input);
277    }
278    public static org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto parseFrom(
279        java.io.InputStream input,
280        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
281        throws java.io.IOException {
282      return PARSER.parseFrom(input, extensionRegistry);
283    }
284    public static org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto parseDelimitedFrom(java.io.InputStream input)
285        throws java.io.IOException {
286      return PARSER.parseDelimitedFrom(input);
287    }
288    public static org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto parseDelimitedFrom(
289        java.io.InputStream input,
290        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
291        throws java.io.IOException {
292      return PARSER.parseDelimitedFrom(input, extensionRegistry);
293    }
294    public static org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto parseFrom(
295        com.google.protobuf.CodedInputStream input)
296        throws java.io.IOException {
297      return PARSER.parseFrom(input);
298    }
299    public static org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto parseFrom(
300        com.google.protobuf.CodedInputStream input,
301        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
302        throws java.io.IOException {
303      return PARSER.parseFrom(input, extensionRegistry);
304    }
305
306    public static Builder newBuilder() { return Builder.create(); }
307    public Builder newBuilderForType() { return newBuilder(); }
308    public static Builder newBuilder(org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto prototype) {
309      return newBuilder().mergeFrom(prototype);
310    }
311    public Builder toBuilder() { return newBuilder(this); }
312
313    @java.lang.Override
314    protected Builder newBuilderForType(
315        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
316      Builder builder = new Builder(parent);
317      return builder;
318    }
319    /**
320     * Protobuf type {@code DriverProcessRegistrationProto}
321     */
322    public static final class Builder extends
323        com.google.protobuf.GeneratedMessage.Builder<Builder>
324       implements org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProtoOrBuilder {
325      public static final com.google.protobuf.Descriptors.Descriptor
326          getDescriptor() {
327        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_DriverProcessRegistrationProto_descriptor;
328      }
329
330      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
331          internalGetFieldAccessorTable() {
332        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_DriverProcessRegistrationProto_fieldAccessorTable
333            .ensureFieldAccessorsInitialized(
334                org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto.class, org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto.Builder.class);
335      }
336
337      // Construct using org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto.newBuilder()
338      private Builder() {
339        maybeForceBuilderInitialization();
340      }
341
342      private Builder(
343          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
344        super(parent);
345        maybeForceBuilderInitialization();
346      }
347      private void maybeForceBuilderInitialization() {
348        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
349        }
350      }
351      private static Builder create() {
352        return new Builder();
353      }
354
355      public Builder clear() {
356        super.clear();
357        remoteIdentifier_ = "";
358        bitField0_ = (bitField0_ & ~0x00000001);
359        return this;
360      }
361
362      public Builder clone() {
363        return create().mergeFrom(buildPartial());
364      }
365
366      public com.google.protobuf.Descriptors.Descriptor
367          getDescriptorForType() {
368        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_DriverProcessRegistrationProto_descriptor;
369      }
370
371      public org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto getDefaultInstanceForType() {
372        return org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto.getDefaultInstance();
373      }
374
375      public org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto build() {
376        org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto result = buildPartial();
377        if (!result.isInitialized()) {
378          throw newUninitializedMessageException(result);
379        }
380        return result;
381      }
382
383      public org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto buildPartial() {
384        org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto result = new org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto(this);
385        int from_bitField0_ = bitField0_;
386        int to_bitField0_ = 0;
387        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
388          to_bitField0_ |= 0x00000001;
389        }
390        result.remoteIdentifier_ = remoteIdentifier_;
391        result.bitField0_ = to_bitField0_;
392        onBuilt();
393        return result;
394      }
395
396      public Builder mergeFrom(com.google.protobuf.Message other) {
397        if (other instanceof org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto) {
398          return mergeFrom((org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto)other);
399        } else {
400          super.mergeFrom(other);
401          return this;
402        }
403      }
404
405      public Builder mergeFrom(org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto other) {
406        if (other == org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto.getDefaultInstance()) return this;
407        if (other.hasRemoteIdentifier()) {
408          bitField0_ |= 0x00000001;
409          remoteIdentifier_ = other.remoteIdentifier_;
410          onChanged();
411        }
412        this.mergeUnknownFields(other.getUnknownFields());
413        return this;
414      }
415
416      public final boolean isInitialized() {
417        if (!hasRemoteIdentifier()) {
418          
419          return false;
420        }
421        return true;
422      }
423
424      public Builder mergeFrom(
425          com.google.protobuf.CodedInputStream input,
426          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
427          throws java.io.IOException {
428        org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto parsedMessage = null;
429        try {
430          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
431        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
432          parsedMessage = (org.apache.reef.proto.DriverRuntimeProtocol.DriverProcessRegistrationProto) e.getUnfinishedMessage();
433          throw e;
434        } finally {
435          if (parsedMessage != null) {
436            mergeFrom(parsedMessage);
437          }
438        }
439        return this;
440      }
441      private int bitField0_;
442
443      // required string remote_identifier = 1;
444      private java.lang.Object remoteIdentifier_ = "";
445      /**
446       * <code>required string remote_identifier = 1;</code>
447       */
448      public boolean hasRemoteIdentifier() {
449        return ((bitField0_ & 0x00000001) == 0x00000001);
450      }
451      /**
452       * <code>required string remote_identifier = 1;</code>
453       */
454      public java.lang.String getRemoteIdentifier() {
455        java.lang.Object ref = remoteIdentifier_;
456        if (!(ref instanceof java.lang.String)) {
457          java.lang.String s = ((com.google.protobuf.ByteString) ref)
458              .toStringUtf8();
459          remoteIdentifier_ = s;
460          return s;
461        } else {
462          return (java.lang.String) ref;
463        }
464      }
465      /**
466       * <code>required string remote_identifier = 1;</code>
467       */
468      public com.google.protobuf.ByteString
469          getRemoteIdentifierBytes() {
470        java.lang.Object ref = remoteIdentifier_;
471        if (ref instanceof String) {
472          com.google.protobuf.ByteString b = 
473              com.google.protobuf.ByteString.copyFromUtf8(
474                  (java.lang.String) ref);
475          remoteIdentifier_ = b;
476          return b;
477        } else {
478          return (com.google.protobuf.ByteString) ref;
479        }
480      }
481      /**
482       * <code>required string remote_identifier = 1;</code>
483       */
484      public Builder setRemoteIdentifier(
485          java.lang.String value) {
486        if (value == null) {
487    throw new NullPointerException();
488  }
489  bitField0_ |= 0x00000001;
490        remoteIdentifier_ = value;
491        onChanged();
492        return this;
493      }
494      /**
495       * <code>required string remote_identifier = 1;</code>
496       */
497      public Builder clearRemoteIdentifier() {
498        bitField0_ = (bitField0_ & ~0x00000001);
499        remoteIdentifier_ = getDefaultInstance().getRemoteIdentifier();
500        onChanged();
501        return this;
502      }
503      /**
504       * <code>required string remote_identifier = 1;</code>
505       */
506      public Builder setRemoteIdentifierBytes(
507          com.google.protobuf.ByteString value) {
508        if (value == null) {
509    throw new NullPointerException();
510  }
511  bitField0_ |= 0x00000001;
512        remoteIdentifier_ = value;
513        onChanged();
514        return this;
515      }
516
517      // @@protoc_insertion_point(builder_scope:DriverProcessRegistrationProto)
518    }
519
520    static {
521      defaultInstance = new DriverProcessRegistrationProto(true);
522      defaultInstance.initFields();
523    }
524
525    // @@protoc_insertion_point(class_scope:DriverProcessRegistrationProto)
526  }
527
528  public interface NodeDescriptorProtoOrBuilder
529      extends com.google.protobuf.MessageOrBuilder {
530
531    // required string identifier = 1;
532    /**
533     * <code>required string identifier = 1;</code>
534     */
535    boolean hasIdentifier();
536    /**
537     * <code>required string identifier = 1;</code>
538     */
539    java.lang.String getIdentifier();
540    /**
541     * <code>required string identifier = 1;</code>
542     */
543    com.google.protobuf.ByteString
544        getIdentifierBytes();
545
546    // required string host_name = 2;
547    /**
548     * <code>required string host_name = 2;</code>
549     *
550     * <pre>
551     * e.g., IP address
552     * </pre>
553     */
554    boolean hasHostName();
555    /**
556     * <code>required string host_name = 2;</code>
557     *
558     * <pre>
559     * e.g., IP address
560     * </pre>
561     */
562    java.lang.String getHostName();
563    /**
564     * <code>required string host_name = 2;</code>
565     *
566     * <pre>
567     * e.g., IP address
568     * </pre>
569     */
570    com.google.protobuf.ByteString
571        getHostNameBytes();
572
573    // required int32 port = 3;
574    /**
575     * <code>required int32 port = 3;</code>
576     *
577     * <pre>
578     * e.g., IP port
579     * </pre>
580     */
581    boolean hasPort();
582    /**
583     * <code>required int32 port = 3;</code>
584     *
585     * <pre>
586     * e.g., IP port
587     * </pre>
588     */
589    int getPort();
590
591    // required int32 memory_size = 4;
592    /**
593     * <code>required int32 memory_size = 4;</code>
594     */
595    boolean hasMemorySize();
596    /**
597     * <code>required int32 memory_size = 4;</code>
598     */
599    int getMemorySize();
600
601    // optional string rack_name = 5;
602    /**
603     * <code>optional string rack_name = 5;</code>
604     *
605     * <pre>
606     * e.g., /default-rack
607     * </pre>
608     */
609    boolean hasRackName();
610    /**
611     * <code>optional string rack_name = 5;</code>
612     *
613     * <pre>
614     * e.g., /default-rack
615     * </pre>
616     */
617    java.lang.String getRackName();
618    /**
619     * <code>optional string rack_name = 5;</code>
620     *
621     * <pre>
622     * e.g., /default-rack
623     * </pre>
624     */
625    com.google.protobuf.ByteString
626        getRackNameBytes();
627  }
628  /**
629   * Protobuf type {@code NodeDescriptorProto}
630   */
631  public static final class NodeDescriptorProto extends
632      com.google.protobuf.GeneratedMessage
633      implements NodeDescriptorProtoOrBuilder {
634    // Use NodeDescriptorProto.newBuilder() to construct.
635    private NodeDescriptorProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
636      super(builder);
637      this.unknownFields = builder.getUnknownFields();
638    }
639    private NodeDescriptorProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
640
641    private static final NodeDescriptorProto defaultInstance;
642    public static NodeDescriptorProto getDefaultInstance() {
643      return defaultInstance;
644    }
645
646    public NodeDescriptorProto getDefaultInstanceForType() {
647      return defaultInstance;
648    }
649
650    private final com.google.protobuf.UnknownFieldSet unknownFields;
651    @java.lang.Override
652    public final com.google.protobuf.UnknownFieldSet
653        getUnknownFields() {
654      return this.unknownFields;
655    }
656    private NodeDescriptorProto(
657        com.google.protobuf.CodedInputStream input,
658        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
659        throws com.google.protobuf.InvalidProtocolBufferException {
660      initFields();
661      int mutable_bitField0_ = 0;
662      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
663          com.google.protobuf.UnknownFieldSet.newBuilder();
664      try {
665        boolean done = false;
666        while (!done) {
667          int tag = input.readTag();
668          switch (tag) {
669            case 0:
670              done = true;
671              break;
672            default: {
673              if (!parseUnknownField(input, unknownFields,
674                                     extensionRegistry, tag)) {
675                done = true;
676              }
677              break;
678            }
679            case 10: {
680              bitField0_ |= 0x00000001;
681              identifier_ = input.readBytes();
682              break;
683            }
684            case 18: {
685              bitField0_ |= 0x00000002;
686              hostName_ = input.readBytes();
687              break;
688            }
689            case 24: {
690              bitField0_ |= 0x00000004;
691              port_ = input.readInt32();
692              break;
693            }
694            case 32: {
695              bitField0_ |= 0x00000008;
696              memorySize_ = input.readInt32();
697              break;
698            }
699            case 42: {
700              bitField0_ |= 0x00000010;
701              rackName_ = input.readBytes();
702              break;
703            }
704          }
705        }
706      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
707        throw e.setUnfinishedMessage(this);
708      } catch (java.io.IOException e) {
709        throw new com.google.protobuf.InvalidProtocolBufferException(
710            e.getMessage()).setUnfinishedMessage(this);
711      } finally {
712        this.unknownFields = unknownFields.build();
713        makeExtensionsImmutable();
714      }
715    }
716    public static final com.google.protobuf.Descriptors.Descriptor
717        getDescriptor() {
718      return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_NodeDescriptorProto_descriptor;
719    }
720
721    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
722        internalGetFieldAccessorTable() {
723      return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_NodeDescriptorProto_fieldAccessorTable
724          .ensureFieldAccessorsInitialized(
725              org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto.class, org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto.Builder.class);
726    }
727
728    public static com.google.protobuf.Parser<NodeDescriptorProto> PARSER =
729        new com.google.protobuf.AbstractParser<NodeDescriptorProto>() {
730      public NodeDescriptorProto parsePartialFrom(
731          com.google.protobuf.CodedInputStream input,
732          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
733          throws com.google.protobuf.InvalidProtocolBufferException {
734        return new NodeDescriptorProto(input, extensionRegistry);
735      }
736    };
737
738    @java.lang.Override
739    public com.google.protobuf.Parser<NodeDescriptorProto> getParserForType() {
740      return PARSER;
741    }
742
743    private int bitField0_;
744    // required string identifier = 1;
745    public static final int IDENTIFIER_FIELD_NUMBER = 1;
746    private java.lang.Object identifier_;
747    /**
748     * <code>required string identifier = 1;</code>
749     */
750    public boolean hasIdentifier() {
751      return ((bitField0_ & 0x00000001) == 0x00000001);
752    }
753    /**
754     * <code>required string identifier = 1;</code>
755     */
756    public java.lang.String getIdentifier() {
757      java.lang.Object ref = identifier_;
758      if (ref instanceof java.lang.String) {
759        return (java.lang.String) ref;
760      } else {
761        com.google.protobuf.ByteString bs = 
762            (com.google.protobuf.ByteString) ref;
763        java.lang.String s = bs.toStringUtf8();
764        if (bs.isValidUtf8()) {
765          identifier_ = s;
766        }
767        return s;
768      }
769    }
770    /**
771     * <code>required string identifier = 1;</code>
772     */
773    public com.google.protobuf.ByteString
774        getIdentifierBytes() {
775      java.lang.Object ref = identifier_;
776      if (ref instanceof java.lang.String) {
777        com.google.protobuf.ByteString b = 
778            com.google.protobuf.ByteString.copyFromUtf8(
779                (java.lang.String) ref);
780        identifier_ = b;
781        return b;
782      } else {
783        return (com.google.protobuf.ByteString) ref;
784      }
785    }
786
787    // required string host_name = 2;
788    public static final int HOST_NAME_FIELD_NUMBER = 2;
789    private java.lang.Object hostName_;
790    /**
791     * <code>required string host_name = 2;</code>
792     *
793     * <pre>
794     * e.g., IP address
795     * </pre>
796     */
797    public boolean hasHostName() {
798      return ((bitField0_ & 0x00000002) == 0x00000002);
799    }
800    /**
801     * <code>required string host_name = 2;</code>
802     *
803     * <pre>
804     * e.g., IP address
805     * </pre>
806     */
807    public java.lang.String getHostName() {
808      java.lang.Object ref = hostName_;
809      if (ref instanceof java.lang.String) {
810        return (java.lang.String) ref;
811      } else {
812        com.google.protobuf.ByteString bs = 
813            (com.google.protobuf.ByteString) ref;
814        java.lang.String s = bs.toStringUtf8();
815        if (bs.isValidUtf8()) {
816          hostName_ = s;
817        }
818        return s;
819      }
820    }
821    /**
822     * <code>required string host_name = 2;</code>
823     *
824     * <pre>
825     * e.g., IP address
826     * </pre>
827     */
828    public com.google.protobuf.ByteString
829        getHostNameBytes() {
830      java.lang.Object ref = hostName_;
831      if (ref instanceof java.lang.String) {
832        com.google.protobuf.ByteString b = 
833            com.google.protobuf.ByteString.copyFromUtf8(
834                (java.lang.String) ref);
835        hostName_ = b;
836        return b;
837      } else {
838        return (com.google.protobuf.ByteString) ref;
839      }
840    }
841
842    // required int32 port = 3;
843    public static final int PORT_FIELD_NUMBER = 3;
844    private int port_;
845    /**
846     * <code>required int32 port = 3;</code>
847     *
848     * <pre>
849     * e.g., IP port
850     * </pre>
851     */
852    public boolean hasPort() {
853      return ((bitField0_ & 0x00000004) == 0x00000004);
854    }
855    /**
856     * <code>required int32 port = 3;</code>
857     *
858     * <pre>
859     * e.g., IP port
860     * </pre>
861     */
862    public int getPort() {
863      return port_;
864    }
865
866    // required int32 memory_size = 4;
867    public static final int MEMORY_SIZE_FIELD_NUMBER = 4;
868    private int memorySize_;
869    /**
870     * <code>required int32 memory_size = 4;</code>
871     */
872    public boolean hasMemorySize() {
873      return ((bitField0_ & 0x00000008) == 0x00000008);
874    }
875    /**
876     * <code>required int32 memory_size = 4;</code>
877     */
878    public int getMemorySize() {
879      return memorySize_;
880    }
881
882    // optional string rack_name = 5;
883    public static final int RACK_NAME_FIELD_NUMBER = 5;
884    private java.lang.Object rackName_;
885    /**
886     * <code>optional string rack_name = 5;</code>
887     *
888     * <pre>
889     * e.g., /default-rack
890     * </pre>
891     */
892    public boolean hasRackName() {
893      return ((bitField0_ & 0x00000010) == 0x00000010);
894    }
895    /**
896     * <code>optional string rack_name = 5;</code>
897     *
898     * <pre>
899     * e.g., /default-rack
900     * </pre>
901     */
902    public java.lang.String getRackName() {
903      java.lang.Object ref = rackName_;
904      if (ref instanceof java.lang.String) {
905        return (java.lang.String) ref;
906      } else {
907        com.google.protobuf.ByteString bs = 
908            (com.google.protobuf.ByteString) ref;
909        java.lang.String s = bs.toStringUtf8();
910        if (bs.isValidUtf8()) {
911          rackName_ = s;
912        }
913        return s;
914      }
915    }
916    /**
917     * <code>optional string rack_name = 5;</code>
918     *
919     * <pre>
920     * e.g., /default-rack
921     * </pre>
922     */
923    public com.google.protobuf.ByteString
924        getRackNameBytes() {
925      java.lang.Object ref = rackName_;
926      if (ref instanceof java.lang.String) {
927        com.google.protobuf.ByteString b = 
928            com.google.protobuf.ByteString.copyFromUtf8(
929                (java.lang.String) ref);
930        rackName_ = b;
931        return b;
932      } else {
933        return (com.google.protobuf.ByteString) ref;
934      }
935    }
936
937    private void initFields() {
938      identifier_ = "";
939      hostName_ = "";
940      port_ = 0;
941      memorySize_ = 0;
942      rackName_ = "";
943    }
944    private byte memoizedIsInitialized = -1;
945    public final boolean isInitialized() {
946      byte isInitialized = memoizedIsInitialized;
947      if (isInitialized != -1) return isInitialized == 1;
948
949      if (!hasIdentifier()) {
950        memoizedIsInitialized = 0;
951        return false;
952      }
953      if (!hasHostName()) {
954        memoizedIsInitialized = 0;
955        return false;
956      }
957      if (!hasPort()) {
958        memoizedIsInitialized = 0;
959        return false;
960      }
961      if (!hasMemorySize()) {
962        memoizedIsInitialized = 0;
963        return false;
964      }
965      memoizedIsInitialized = 1;
966      return true;
967    }
968
969    public void writeTo(com.google.protobuf.CodedOutputStream output)
970                        throws java.io.IOException {
971      getSerializedSize();
972      if (((bitField0_ & 0x00000001) == 0x00000001)) {
973        output.writeBytes(1, getIdentifierBytes());
974      }
975      if (((bitField0_ & 0x00000002) == 0x00000002)) {
976        output.writeBytes(2, getHostNameBytes());
977      }
978      if (((bitField0_ & 0x00000004) == 0x00000004)) {
979        output.writeInt32(3, port_);
980      }
981      if (((bitField0_ & 0x00000008) == 0x00000008)) {
982        output.writeInt32(4, memorySize_);
983      }
984      if (((bitField0_ & 0x00000010) == 0x00000010)) {
985        output.writeBytes(5, getRackNameBytes());
986      }
987      getUnknownFields().writeTo(output);
988    }
989
990    private int memoizedSerializedSize = -1;
991    public int getSerializedSize() {
992      int size = memoizedSerializedSize;
993      if (size != -1) return size;
994
995      size = 0;
996      if (((bitField0_ & 0x00000001) == 0x00000001)) {
997        size += com.google.protobuf.CodedOutputStream
998          .computeBytesSize(1, getIdentifierBytes());
999      }
1000      if (((bitField0_ & 0x00000002) == 0x00000002)) {
1001        size += com.google.protobuf.CodedOutputStream
1002          .computeBytesSize(2, getHostNameBytes());
1003      }
1004      if (((bitField0_ & 0x00000004) == 0x00000004)) {
1005        size += com.google.protobuf.CodedOutputStream
1006          .computeInt32Size(3, port_);
1007      }
1008      if (((bitField0_ & 0x00000008) == 0x00000008)) {
1009        size += com.google.protobuf.CodedOutputStream
1010          .computeInt32Size(4, memorySize_);
1011      }
1012      if (((bitField0_ & 0x00000010) == 0x00000010)) {
1013        size += com.google.protobuf.CodedOutputStream
1014          .computeBytesSize(5, getRackNameBytes());
1015      }
1016      size += getUnknownFields().getSerializedSize();
1017      memoizedSerializedSize = size;
1018      return size;
1019    }
1020
1021    private static final long serialVersionUID = 0L;
1022    @java.lang.Override
1023    protected java.lang.Object writeReplace()
1024        throws java.io.ObjectStreamException {
1025      return super.writeReplace();
1026    }
1027
1028    @java.lang.Override
1029    public boolean equals(final java.lang.Object obj) {
1030      if (obj == this) {
1031       return true;
1032      }
1033      if (!(obj instanceof org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto)) {
1034        return super.equals(obj);
1035      }
1036      org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto other = (org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto) obj;
1037
1038      boolean result = true;
1039      result = result && (hasIdentifier() == other.hasIdentifier());
1040      if (hasIdentifier()) {
1041        result = result && getIdentifier()
1042            .equals(other.getIdentifier());
1043      }
1044      result = result && (hasHostName() == other.hasHostName());
1045      if (hasHostName()) {
1046        result = result && getHostName()
1047            .equals(other.getHostName());
1048      }
1049      result = result && (hasPort() == other.hasPort());
1050      if (hasPort()) {
1051        result = result && (getPort()
1052            == other.getPort());
1053      }
1054      result = result && (hasMemorySize() == other.hasMemorySize());
1055      if (hasMemorySize()) {
1056        result = result && (getMemorySize()
1057            == other.getMemorySize());
1058      }
1059      result = result && (hasRackName() == other.hasRackName());
1060      if (hasRackName()) {
1061        result = result && getRackName()
1062            .equals(other.getRackName());
1063      }
1064      result = result &&
1065          getUnknownFields().equals(other.getUnknownFields());
1066      return result;
1067    }
1068
1069    private int memoizedHashCode = 0;
1070    @java.lang.Override
1071    public int hashCode() {
1072      if (memoizedHashCode != 0) {
1073        return memoizedHashCode;
1074      }
1075      int hash = 41;
1076      hash = (19 * hash) + getDescriptorForType().hashCode();
1077      if (hasIdentifier()) {
1078        hash = (37 * hash) + IDENTIFIER_FIELD_NUMBER;
1079        hash = (53 * hash) + getIdentifier().hashCode();
1080      }
1081      if (hasHostName()) {
1082        hash = (37 * hash) + HOST_NAME_FIELD_NUMBER;
1083        hash = (53 * hash) + getHostName().hashCode();
1084      }
1085      if (hasPort()) {
1086        hash = (37 * hash) + PORT_FIELD_NUMBER;
1087        hash = (53 * hash) + getPort();
1088      }
1089      if (hasMemorySize()) {
1090        hash = (37 * hash) + MEMORY_SIZE_FIELD_NUMBER;
1091        hash = (53 * hash) + getMemorySize();
1092      }
1093      if (hasRackName()) {
1094        hash = (37 * hash) + RACK_NAME_FIELD_NUMBER;
1095        hash = (53 * hash) + getRackName().hashCode();
1096      }
1097      hash = (29 * hash) + getUnknownFields().hashCode();
1098      memoizedHashCode = hash;
1099      return hash;
1100    }
1101
1102    public static org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto parseFrom(
1103        com.google.protobuf.ByteString data)
1104        throws com.google.protobuf.InvalidProtocolBufferException {
1105      return PARSER.parseFrom(data);
1106    }
1107    public static org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto parseFrom(
1108        com.google.protobuf.ByteString data,
1109        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1110        throws com.google.protobuf.InvalidProtocolBufferException {
1111      return PARSER.parseFrom(data, extensionRegistry);
1112    }
1113    public static org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto parseFrom(byte[] data)
1114        throws com.google.protobuf.InvalidProtocolBufferException {
1115      return PARSER.parseFrom(data);
1116    }
1117    public static org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto parseFrom(
1118        byte[] data,
1119        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1120        throws com.google.protobuf.InvalidProtocolBufferException {
1121      return PARSER.parseFrom(data, extensionRegistry);
1122    }
1123    public static org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto parseFrom(java.io.InputStream input)
1124        throws java.io.IOException {
1125      return PARSER.parseFrom(input);
1126    }
1127    public static org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto parseFrom(
1128        java.io.InputStream input,
1129        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1130        throws java.io.IOException {
1131      return PARSER.parseFrom(input, extensionRegistry);
1132    }
1133    public static org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto parseDelimitedFrom(java.io.InputStream input)
1134        throws java.io.IOException {
1135      return PARSER.parseDelimitedFrom(input);
1136    }
1137    public static org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto parseDelimitedFrom(
1138        java.io.InputStream input,
1139        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1140        throws java.io.IOException {
1141      return PARSER.parseDelimitedFrom(input, extensionRegistry);
1142    }
1143    public static org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto parseFrom(
1144        com.google.protobuf.CodedInputStream input)
1145        throws java.io.IOException {
1146      return PARSER.parseFrom(input);
1147    }
1148    public static org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto parseFrom(
1149        com.google.protobuf.CodedInputStream input,
1150        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1151        throws java.io.IOException {
1152      return PARSER.parseFrom(input, extensionRegistry);
1153    }
1154
1155    public static Builder newBuilder() { return Builder.create(); }
1156    public Builder newBuilderForType() { return newBuilder(); }
1157    public static Builder newBuilder(org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto prototype) {
1158      return newBuilder().mergeFrom(prototype);
1159    }
1160    public Builder toBuilder() { return newBuilder(this); }
1161
1162    @java.lang.Override
1163    protected Builder newBuilderForType(
1164        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1165      Builder builder = new Builder(parent);
1166      return builder;
1167    }
1168    /**
1169     * Protobuf type {@code NodeDescriptorProto}
1170     */
1171    public static final class Builder extends
1172        com.google.protobuf.GeneratedMessage.Builder<Builder>
1173       implements org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProtoOrBuilder {
1174      public static final com.google.protobuf.Descriptors.Descriptor
1175          getDescriptor() {
1176        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_NodeDescriptorProto_descriptor;
1177      }
1178
1179      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1180          internalGetFieldAccessorTable() {
1181        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_NodeDescriptorProto_fieldAccessorTable
1182            .ensureFieldAccessorsInitialized(
1183                org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto.class, org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto.Builder.class);
1184      }
1185
1186      // Construct using org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto.newBuilder()
1187      private Builder() {
1188        maybeForceBuilderInitialization();
1189      }
1190
1191      private Builder(
1192          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1193        super(parent);
1194        maybeForceBuilderInitialization();
1195      }
1196      private void maybeForceBuilderInitialization() {
1197        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
1198        }
1199      }
1200      private static Builder create() {
1201        return new Builder();
1202      }
1203
1204      public Builder clear() {
1205        super.clear();
1206        identifier_ = "";
1207        bitField0_ = (bitField0_ & ~0x00000001);
1208        hostName_ = "";
1209        bitField0_ = (bitField0_ & ~0x00000002);
1210        port_ = 0;
1211        bitField0_ = (bitField0_ & ~0x00000004);
1212        memorySize_ = 0;
1213        bitField0_ = (bitField0_ & ~0x00000008);
1214        rackName_ = "";
1215        bitField0_ = (bitField0_ & ~0x00000010);
1216        return this;
1217      }
1218
1219      public Builder clone() {
1220        return create().mergeFrom(buildPartial());
1221      }
1222
1223      public com.google.protobuf.Descriptors.Descriptor
1224          getDescriptorForType() {
1225        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_NodeDescriptorProto_descriptor;
1226      }
1227
1228      public org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto getDefaultInstanceForType() {
1229        return org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto.getDefaultInstance();
1230      }
1231
1232      public org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto build() {
1233        org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto result = buildPartial();
1234        if (!result.isInitialized()) {
1235          throw newUninitializedMessageException(result);
1236        }
1237        return result;
1238      }
1239
1240      public org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto buildPartial() {
1241        org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto result = new org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto(this);
1242        int from_bitField0_ = bitField0_;
1243        int to_bitField0_ = 0;
1244        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
1245          to_bitField0_ |= 0x00000001;
1246        }
1247        result.identifier_ = identifier_;
1248        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
1249          to_bitField0_ |= 0x00000002;
1250        }
1251        result.hostName_ = hostName_;
1252        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
1253          to_bitField0_ |= 0x00000004;
1254        }
1255        result.port_ = port_;
1256        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
1257          to_bitField0_ |= 0x00000008;
1258        }
1259        result.memorySize_ = memorySize_;
1260        if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
1261          to_bitField0_ |= 0x00000010;
1262        }
1263        result.rackName_ = rackName_;
1264        result.bitField0_ = to_bitField0_;
1265        onBuilt();
1266        return result;
1267      }
1268
1269      public Builder mergeFrom(com.google.protobuf.Message other) {
1270        if (other instanceof org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto) {
1271          return mergeFrom((org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto)other);
1272        } else {
1273          super.mergeFrom(other);
1274          return this;
1275        }
1276      }
1277
1278      public Builder mergeFrom(org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto other) {
1279        if (other == org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto.getDefaultInstance()) return this;
1280        if (other.hasIdentifier()) {
1281          bitField0_ |= 0x00000001;
1282          identifier_ = other.identifier_;
1283          onChanged();
1284        }
1285        if (other.hasHostName()) {
1286          bitField0_ |= 0x00000002;
1287          hostName_ = other.hostName_;
1288          onChanged();
1289        }
1290        if (other.hasPort()) {
1291          setPort(other.getPort());
1292        }
1293        if (other.hasMemorySize()) {
1294          setMemorySize(other.getMemorySize());
1295        }
1296        if (other.hasRackName()) {
1297          bitField0_ |= 0x00000010;
1298          rackName_ = other.rackName_;
1299          onChanged();
1300        }
1301        this.mergeUnknownFields(other.getUnknownFields());
1302        return this;
1303      }
1304
1305      public final boolean isInitialized() {
1306        if (!hasIdentifier()) {
1307          
1308          return false;
1309        }
1310        if (!hasHostName()) {
1311          
1312          return false;
1313        }
1314        if (!hasPort()) {
1315          
1316          return false;
1317        }
1318        if (!hasMemorySize()) {
1319          
1320          return false;
1321        }
1322        return true;
1323      }
1324
1325      public Builder mergeFrom(
1326          com.google.protobuf.CodedInputStream input,
1327          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1328          throws java.io.IOException {
1329        org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto parsedMessage = null;
1330        try {
1331          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1332        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1333          parsedMessage = (org.apache.reef.proto.DriverRuntimeProtocol.NodeDescriptorProto) e.getUnfinishedMessage();
1334          throw e;
1335        } finally {
1336          if (parsedMessage != null) {
1337            mergeFrom(parsedMessage);
1338          }
1339        }
1340        return this;
1341      }
1342      private int bitField0_;
1343
1344      // required string identifier = 1;
1345      private java.lang.Object identifier_ = "";
1346      /**
1347       * <code>required string identifier = 1;</code>
1348       */
1349      public boolean hasIdentifier() {
1350        return ((bitField0_ & 0x00000001) == 0x00000001);
1351      }
1352      /**
1353       * <code>required string identifier = 1;</code>
1354       */
1355      public java.lang.String getIdentifier() {
1356        java.lang.Object ref = identifier_;
1357        if (!(ref instanceof java.lang.String)) {
1358          java.lang.String s = ((com.google.protobuf.ByteString) ref)
1359              .toStringUtf8();
1360          identifier_ = s;
1361          return s;
1362        } else {
1363          return (java.lang.String) ref;
1364        }
1365      }
1366      /**
1367       * <code>required string identifier = 1;</code>
1368       */
1369      public com.google.protobuf.ByteString
1370          getIdentifierBytes() {
1371        java.lang.Object ref = identifier_;
1372        if (ref instanceof String) {
1373          com.google.protobuf.ByteString b = 
1374              com.google.protobuf.ByteString.copyFromUtf8(
1375                  (java.lang.String) ref);
1376          identifier_ = b;
1377          return b;
1378        } else {
1379          return (com.google.protobuf.ByteString) ref;
1380        }
1381      }
1382      /**
1383       * <code>required string identifier = 1;</code>
1384       */
1385      public Builder setIdentifier(
1386          java.lang.String value) {
1387        if (value == null) {
1388    throw new NullPointerException();
1389  }
1390  bitField0_ |= 0x00000001;
1391        identifier_ = value;
1392        onChanged();
1393        return this;
1394      }
1395      /**
1396       * <code>required string identifier = 1;</code>
1397       */
1398      public Builder clearIdentifier() {
1399        bitField0_ = (bitField0_ & ~0x00000001);
1400        identifier_ = getDefaultInstance().getIdentifier();
1401        onChanged();
1402        return this;
1403      }
1404      /**
1405       * <code>required string identifier = 1;</code>
1406       */
1407      public Builder setIdentifierBytes(
1408          com.google.protobuf.ByteString value) {
1409        if (value == null) {
1410    throw new NullPointerException();
1411  }
1412  bitField0_ |= 0x00000001;
1413        identifier_ = value;
1414        onChanged();
1415        return this;
1416      }
1417
1418      // required string host_name = 2;
1419      private java.lang.Object hostName_ = "";
1420      /**
1421       * <code>required string host_name = 2;</code>
1422       *
1423       * <pre>
1424       * e.g., IP address
1425       * </pre>
1426       */
1427      public boolean hasHostName() {
1428        return ((bitField0_ & 0x00000002) == 0x00000002);
1429      }
1430      /**
1431       * <code>required string host_name = 2;</code>
1432       *
1433       * <pre>
1434       * e.g., IP address
1435       * </pre>
1436       */
1437      public java.lang.String getHostName() {
1438        java.lang.Object ref = hostName_;
1439        if (!(ref instanceof java.lang.String)) {
1440          java.lang.String s = ((com.google.protobuf.ByteString) ref)
1441              .toStringUtf8();
1442          hostName_ = s;
1443          return s;
1444        } else {
1445          return (java.lang.String) ref;
1446        }
1447      }
1448      /**
1449       * <code>required string host_name = 2;</code>
1450       *
1451       * <pre>
1452       * e.g., IP address
1453       * </pre>
1454       */
1455      public com.google.protobuf.ByteString
1456          getHostNameBytes() {
1457        java.lang.Object ref = hostName_;
1458        if (ref instanceof String) {
1459          com.google.protobuf.ByteString b = 
1460              com.google.protobuf.ByteString.copyFromUtf8(
1461                  (java.lang.String) ref);
1462          hostName_ = b;
1463          return b;
1464        } else {
1465          return (com.google.protobuf.ByteString) ref;
1466        }
1467      }
1468      /**
1469       * <code>required string host_name = 2;</code>
1470       *
1471       * <pre>
1472       * e.g., IP address
1473       * </pre>
1474       */
1475      public Builder setHostName(
1476          java.lang.String value) {
1477        if (value == null) {
1478    throw new NullPointerException();
1479  }
1480  bitField0_ |= 0x00000002;
1481        hostName_ = value;
1482        onChanged();
1483        return this;
1484      }
1485      /**
1486       * <code>required string host_name = 2;</code>
1487       *
1488       * <pre>
1489       * e.g., IP address
1490       * </pre>
1491       */
1492      public Builder clearHostName() {
1493        bitField0_ = (bitField0_ & ~0x00000002);
1494        hostName_ = getDefaultInstance().getHostName();
1495        onChanged();
1496        return this;
1497      }
1498      /**
1499       * <code>required string host_name = 2;</code>
1500       *
1501       * <pre>
1502       * e.g., IP address
1503       * </pre>
1504       */
1505      public Builder setHostNameBytes(
1506          com.google.protobuf.ByteString value) {
1507        if (value == null) {
1508    throw new NullPointerException();
1509  }
1510  bitField0_ |= 0x00000002;
1511        hostName_ = value;
1512        onChanged();
1513        return this;
1514      }
1515
1516      // required int32 port = 3;
1517      private int port_ ;
1518      /**
1519       * <code>required int32 port = 3;</code>
1520       *
1521       * <pre>
1522       * e.g., IP port
1523       * </pre>
1524       */
1525      public boolean hasPort() {
1526        return ((bitField0_ & 0x00000004) == 0x00000004);
1527      }
1528      /**
1529       * <code>required int32 port = 3;</code>
1530       *
1531       * <pre>
1532       * e.g., IP port
1533       * </pre>
1534       */
1535      public int getPort() {
1536        return port_;
1537      }
1538      /**
1539       * <code>required int32 port = 3;</code>
1540       *
1541       * <pre>
1542       * e.g., IP port
1543       * </pre>
1544       */
1545      public Builder setPort(int value) {
1546        bitField0_ |= 0x00000004;
1547        port_ = value;
1548        onChanged();
1549        return this;
1550      }
1551      /**
1552       * <code>required int32 port = 3;</code>
1553       *
1554       * <pre>
1555       * e.g., IP port
1556       * </pre>
1557       */
1558      public Builder clearPort() {
1559        bitField0_ = (bitField0_ & ~0x00000004);
1560        port_ = 0;
1561        onChanged();
1562        return this;
1563      }
1564
1565      // required int32 memory_size = 4;
1566      private int memorySize_ ;
1567      /**
1568       * <code>required int32 memory_size = 4;</code>
1569       */
1570      public boolean hasMemorySize() {
1571        return ((bitField0_ & 0x00000008) == 0x00000008);
1572      }
1573      /**
1574       * <code>required int32 memory_size = 4;</code>
1575       */
1576      public int getMemorySize() {
1577        return memorySize_;
1578      }
1579      /**
1580       * <code>required int32 memory_size = 4;</code>
1581       */
1582      public Builder setMemorySize(int value) {
1583        bitField0_ |= 0x00000008;
1584        memorySize_ = value;
1585        onChanged();
1586        return this;
1587      }
1588      /**
1589       * <code>required int32 memory_size = 4;</code>
1590       */
1591      public Builder clearMemorySize() {
1592        bitField0_ = (bitField0_ & ~0x00000008);
1593        memorySize_ = 0;
1594        onChanged();
1595        return this;
1596      }
1597
1598      // optional string rack_name = 5;
1599      private java.lang.Object rackName_ = "";
1600      /**
1601       * <code>optional string rack_name = 5;</code>
1602       *
1603       * <pre>
1604       * e.g., /default-rack
1605       * </pre>
1606       */
1607      public boolean hasRackName() {
1608        return ((bitField0_ & 0x00000010) == 0x00000010);
1609      }
1610      /**
1611       * <code>optional string rack_name = 5;</code>
1612       *
1613       * <pre>
1614       * e.g., /default-rack
1615       * </pre>
1616       */
1617      public java.lang.String getRackName() {
1618        java.lang.Object ref = rackName_;
1619        if (!(ref instanceof java.lang.String)) {
1620          java.lang.String s = ((com.google.protobuf.ByteString) ref)
1621              .toStringUtf8();
1622          rackName_ = s;
1623          return s;
1624        } else {
1625          return (java.lang.String) ref;
1626        }
1627      }
1628      /**
1629       * <code>optional string rack_name = 5;</code>
1630       *
1631       * <pre>
1632       * e.g., /default-rack
1633       * </pre>
1634       */
1635      public com.google.protobuf.ByteString
1636          getRackNameBytes() {
1637        java.lang.Object ref = rackName_;
1638        if (ref instanceof String) {
1639          com.google.protobuf.ByteString b = 
1640              com.google.protobuf.ByteString.copyFromUtf8(
1641                  (java.lang.String) ref);
1642          rackName_ = b;
1643          return b;
1644        } else {
1645          return (com.google.protobuf.ByteString) ref;
1646        }
1647      }
1648      /**
1649       * <code>optional string rack_name = 5;</code>
1650       *
1651       * <pre>
1652       * e.g., /default-rack
1653       * </pre>
1654       */
1655      public Builder setRackName(
1656          java.lang.String value) {
1657        if (value == null) {
1658    throw new NullPointerException();
1659  }
1660  bitField0_ |= 0x00000010;
1661        rackName_ = value;
1662        onChanged();
1663        return this;
1664      }
1665      /**
1666       * <code>optional string rack_name = 5;</code>
1667       *
1668       * <pre>
1669       * e.g., /default-rack
1670       * </pre>
1671       */
1672      public Builder clearRackName() {
1673        bitField0_ = (bitField0_ & ~0x00000010);
1674        rackName_ = getDefaultInstance().getRackName();
1675        onChanged();
1676        return this;
1677      }
1678      /**
1679       * <code>optional string rack_name = 5;</code>
1680       *
1681       * <pre>
1682       * e.g., /default-rack
1683       * </pre>
1684       */
1685      public Builder setRackNameBytes(
1686          com.google.protobuf.ByteString value) {
1687        if (value == null) {
1688    throw new NullPointerException();
1689  }
1690  bitField0_ |= 0x00000010;
1691        rackName_ = value;
1692        onChanged();
1693        return this;
1694      }
1695
1696      // @@protoc_insertion_point(builder_scope:NodeDescriptorProto)
1697    }
1698
1699    static {
1700      defaultInstance = new NodeDescriptorProto(true);
1701      defaultInstance.initFields();
1702    }
1703
1704    // @@protoc_insertion_point(class_scope:NodeDescriptorProto)
1705  }
1706
1707  public interface ResourceAllocationProtoOrBuilder
1708      extends com.google.protobuf.MessageOrBuilder {
1709
1710    // required string identifier = 1;
1711    /**
1712     * <code>required string identifier = 1;</code>
1713     *
1714     * <pre>
1715     * e.g., the container id, or the thread id
1716     * </pre>
1717     */
1718    boolean hasIdentifier();
1719    /**
1720     * <code>required string identifier = 1;</code>
1721     *
1722     * <pre>
1723     * e.g., the container id, or the thread id
1724     * </pre>
1725     */
1726    java.lang.String getIdentifier();
1727    /**
1728     * <code>required string identifier = 1;</code>
1729     *
1730     * <pre>
1731     * e.g., the container id, or the thread id
1732     * </pre>
1733     */
1734    com.google.protobuf.ByteString
1735        getIdentifierBytes();
1736
1737    // required int32 resource_memory = 2;
1738    /**
1739     * <code>required int32 resource_memory = 2;</code>
1740     *
1741     * <pre>
1742     * megabytes
1743     * </pre>
1744     */
1745    boolean hasResourceMemory();
1746    /**
1747     * <code>required int32 resource_memory = 2;</code>
1748     *
1749     * <pre>
1750     * megabytes
1751     * </pre>
1752     */
1753    int getResourceMemory();
1754
1755    // required string node_id = 3;
1756    /**
1757     * <code>required string node_id = 3;</code>
1758     */
1759    boolean hasNodeId();
1760    /**
1761     * <code>required string node_id = 3;</code>
1762     */
1763    java.lang.String getNodeId();
1764    /**
1765     * <code>required string node_id = 3;</code>
1766     */
1767    com.google.protobuf.ByteString
1768        getNodeIdBytes();
1769
1770    // optional int32 virtual_cores = 4;
1771    /**
1772     * <code>optional int32 virtual_cores = 4;</code>
1773     */
1774    boolean hasVirtualCores();
1775    /**
1776     * <code>optional int32 virtual_cores = 4;</code>
1777     */
1778    int getVirtualCores();
1779  }
1780  /**
1781   * Protobuf type {@code ResourceAllocationProto}
1782   */
1783  public static final class ResourceAllocationProto extends
1784      com.google.protobuf.GeneratedMessage
1785      implements ResourceAllocationProtoOrBuilder {
1786    // Use ResourceAllocationProto.newBuilder() to construct.
1787    private ResourceAllocationProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
1788      super(builder);
1789      this.unknownFields = builder.getUnknownFields();
1790    }
1791    private ResourceAllocationProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
1792
1793    private static final ResourceAllocationProto defaultInstance;
1794    public static ResourceAllocationProto getDefaultInstance() {
1795      return defaultInstance;
1796    }
1797
1798    public ResourceAllocationProto getDefaultInstanceForType() {
1799      return defaultInstance;
1800    }
1801
1802    private final com.google.protobuf.UnknownFieldSet unknownFields;
1803    @java.lang.Override
1804    public final com.google.protobuf.UnknownFieldSet
1805        getUnknownFields() {
1806      return this.unknownFields;
1807    }
1808    private ResourceAllocationProto(
1809        com.google.protobuf.CodedInputStream input,
1810        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1811        throws com.google.protobuf.InvalidProtocolBufferException {
1812      initFields();
1813      int mutable_bitField0_ = 0;
1814      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
1815          com.google.protobuf.UnknownFieldSet.newBuilder();
1816      try {
1817        boolean done = false;
1818        while (!done) {
1819          int tag = input.readTag();
1820          switch (tag) {
1821            case 0:
1822              done = true;
1823              break;
1824            default: {
1825              if (!parseUnknownField(input, unknownFields,
1826                                     extensionRegistry, tag)) {
1827                done = true;
1828              }
1829              break;
1830            }
1831            case 10: {
1832              bitField0_ |= 0x00000001;
1833              identifier_ = input.readBytes();
1834              break;
1835            }
1836            case 16: {
1837              bitField0_ |= 0x00000002;
1838              resourceMemory_ = input.readInt32();
1839              break;
1840            }
1841            case 26: {
1842              bitField0_ |= 0x00000004;
1843              nodeId_ = input.readBytes();
1844              break;
1845            }
1846            case 32: {
1847              bitField0_ |= 0x00000008;
1848              virtualCores_ = input.readInt32();
1849              break;
1850            }
1851          }
1852        }
1853      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1854        throw e.setUnfinishedMessage(this);
1855      } catch (java.io.IOException e) {
1856        throw new com.google.protobuf.InvalidProtocolBufferException(
1857            e.getMessage()).setUnfinishedMessage(this);
1858      } finally {
1859        this.unknownFields = unknownFields.build();
1860        makeExtensionsImmutable();
1861      }
1862    }
1863    public static final com.google.protobuf.Descriptors.Descriptor
1864        getDescriptor() {
1865      return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceAllocationProto_descriptor;
1866    }
1867
1868    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1869        internalGetFieldAccessorTable() {
1870      return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceAllocationProto_fieldAccessorTable
1871          .ensureFieldAccessorsInitialized(
1872              org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto.class, org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto.Builder.class);
1873    }
1874
1875    public static com.google.protobuf.Parser<ResourceAllocationProto> PARSER =
1876        new com.google.protobuf.AbstractParser<ResourceAllocationProto>() {
1877      public ResourceAllocationProto parsePartialFrom(
1878          com.google.protobuf.CodedInputStream input,
1879          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1880          throws com.google.protobuf.InvalidProtocolBufferException {
1881        return new ResourceAllocationProto(input, extensionRegistry);
1882      }
1883    };
1884
1885    @java.lang.Override
1886    public com.google.protobuf.Parser<ResourceAllocationProto> getParserForType() {
1887      return PARSER;
1888    }
1889
1890    private int bitField0_;
1891    // required string identifier = 1;
1892    public static final int IDENTIFIER_FIELD_NUMBER = 1;
1893    private java.lang.Object identifier_;
1894    /**
1895     * <code>required string identifier = 1;</code>
1896     *
1897     * <pre>
1898     * e.g., the container id, or the thread id
1899     * </pre>
1900     */
1901    public boolean hasIdentifier() {
1902      return ((bitField0_ & 0x00000001) == 0x00000001);
1903    }
1904    /**
1905     * <code>required string identifier = 1;</code>
1906     *
1907     * <pre>
1908     * e.g., the container id, or the thread id
1909     * </pre>
1910     */
1911    public java.lang.String getIdentifier() {
1912      java.lang.Object ref = identifier_;
1913      if (ref instanceof java.lang.String) {
1914        return (java.lang.String) ref;
1915      } else {
1916        com.google.protobuf.ByteString bs = 
1917            (com.google.protobuf.ByteString) ref;
1918        java.lang.String s = bs.toStringUtf8();
1919        if (bs.isValidUtf8()) {
1920          identifier_ = s;
1921        }
1922        return s;
1923      }
1924    }
1925    /**
1926     * <code>required string identifier = 1;</code>
1927     *
1928     * <pre>
1929     * e.g., the container id, or the thread id
1930     * </pre>
1931     */
1932    public com.google.protobuf.ByteString
1933        getIdentifierBytes() {
1934      java.lang.Object ref = identifier_;
1935      if (ref instanceof java.lang.String) {
1936        com.google.protobuf.ByteString b = 
1937            com.google.protobuf.ByteString.copyFromUtf8(
1938                (java.lang.String) ref);
1939        identifier_ = b;
1940        return b;
1941      } else {
1942        return (com.google.protobuf.ByteString) ref;
1943      }
1944    }
1945
1946    // required int32 resource_memory = 2;
1947    public static final int RESOURCE_MEMORY_FIELD_NUMBER = 2;
1948    private int resourceMemory_;
1949    /**
1950     * <code>required int32 resource_memory = 2;</code>
1951     *
1952     * <pre>
1953     * megabytes
1954     * </pre>
1955     */
1956    public boolean hasResourceMemory() {
1957      return ((bitField0_ & 0x00000002) == 0x00000002);
1958    }
1959    /**
1960     * <code>required int32 resource_memory = 2;</code>
1961     *
1962     * <pre>
1963     * megabytes
1964     * </pre>
1965     */
1966    public int getResourceMemory() {
1967      return resourceMemory_;
1968    }
1969
1970    // required string node_id = 3;
1971    public static final int NODE_ID_FIELD_NUMBER = 3;
1972    private java.lang.Object nodeId_;
1973    /**
1974     * <code>required string node_id = 3;</code>
1975     */
1976    public boolean hasNodeId() {
1977      return ((bitField0_ & 0x00000004) == 0x00000004);
1978    }
1979    /**
1980     * <code>required string node_id = 3;</code>
1981     */
1982    public java.lang.String getNodeId() {
1983      java.lang.Object ref = nodeId_;
1984      if (ref instanceof java.lang.String) {
1985        return (java.lang.String) ref;
1986      } else {
1987        com.google.protobuf.ByteString bs = 
1988            (com.google.protobuf.ByteString) ref;
1989        java.lang.String s = bs.toStringUtf8();
1990        if (bs.isValidUtf8()) {
1991          nodeId_ = s;
1992        }
1993        return s;
1994      }
1995    }
1996    /**
1997     * <code>required string node_id = 3;</code>
1998     */
1999    public com.google.protobuf.ByteString
2000        getNodeIdBytes() {
2001      java.lang.Object ref = nodeId_;
2002      if (ref instanceof java.lang.String) {
2003        com.google.protobuf.ByteString b = 
2004            com.google.protobuf.ByteString.copyFromUtf8(
2005                (java.lang.String) ref);
2006        nodeId_ = b;
2007        return b;
2008      } else {
2009        return (com.google.protobuf.ByteString) ref;
2010      }
2011    }
2012
2013    // optional int32 virtual_cores = 4;
2014    public static final int VIRTUAL_CORES_FIELD_NUMBER = 4;
2015    private int virtualCores_;
2016    /**
2017     * <code>optional int32 virtual_cores = 4;</code>
2018     */
2019    public boolean hasVirtualCores() {
2020      return ((bitField0_ & 0x00000008) == 0x00000008);
2021    }
2022    /**
2023     * <code>optional int32 virtual_cores = 4;</code>
2024     */
2025    public int getVirtualCores() {
2026      return virtualCores_;
2027    }
2028
2029    private void initFields() {
2030      identifier_ = "";
2031      resourceMemory_ = 0;
2032      nodeId_ = "";
2033      virtualCores_ = 0;
2034    }
2035    private byte memoizedIsInitialized = -1;
2036    public final boolean isInitialized() {
2037      byte isInitialized = memoizedIsInitialized;
2038      if (isInitialized != -1) return isInitialized == 1;
2039
2040      if (!hasIdentifier()) {
2041        memoizedIsInitialized = 0;
2042        return false;
2043      }
2044      if (!hasResourceMemory()) {
2045        memoizedIsInitialized = 0;
2046        return false;
2047      }
2048      if (!hasNodeId()) {
2049        memoizedIsInitialized = 0;
2050        return false;
2051      }
2052      memoizedIsInitialized = 1;
2053      return true;
2054    }
2055
2056    public void writeTo(com.google.protobuf.CodedOutputStream output)
2057                        throws java.io.IOException {
2058      getSerializedSize();
2059      if (((bitField0_ & 0x00000001) == 0x00000001)) {
2060        output.writeBytes(1, getIdentifierBytes());
2061      }
2062      if (((bitField0_ & 0x00000002) == 0x00000002)) {
2063        output.writeInt32(2, resourceMemory_);
2064      }
2065      if (((bitField0_ & 0x00000004) == 0x00000004)) {
2066        output.writeBytes(3, getNodeIdBytes());
2067      }
2068      if (((bitField0_ & 0x00000008) == 0x00000008)) {
2069        output.writeInt32(4, virtualCores_);
2070      }
2071      getUnknownFields().writeTo(output);
2072    }
2073
2074    private int memoizedSerializedSize = -1;
2075    public int getSerializedSize() {
2076      int size = memoizedSerializedSize;
2077      if (size != -1) return size;
2078
2079      size = 0;
2080      if (((bitField0_ & 0x00000001) == 0x00000001)) {
2081        size += com.google.protobuf.CodedOutputStream
2082          .computeBytesSize(1, getIdentifierBytes());
2083      }
2084      if (((bitField0_ & 0x00000002) == 0x00000002)) {
2085        size += com.google.protobuf.CodedOutputStream
2086          .computeInt32Size(2, resourceMemory_);
2087      }
2088      if (((bitField0_ & 0x00000004) == 0x00000004)) {
2089        size += com.google.protobuf.CodedOutputStream
2090          .computeBytesSize(3, getNodeIdBytes());
2091      }
2092      if (((bitField0_ & 0x00000008) == 0x00000008)) {
2093        size += com.google.protobuf.CodedOutputStream
2094          .computeInt32Size(4, virtualCores_);
2095      }
2096      size += getUnknownFields().getSerializedSize();
2097      memoizedSerializedSize = size;
2098      return size;
2099    }
2100
2101    private static final long serialVersionUID = 0L;
2102    @java.lang.Override
2103    protected java.lang.Object writeReplace()
2104        throws java.io.ObjectStreamException {
2105      return super.writeReplace();
2106    }
2107
2108    @java.lang.Override
2109    public boolean equals(final java.lang.Object obj) {
2110      if (obj == this) {
2111       return true;
2112      }
2113      if (!(obj instanceof org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto)) {
2114        return super.equals(obj);
2115      }
2116      org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto other = (org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto) obj;
2117
2118      boolean result = true;
2119      result = result && (hasIdentifier() == other.hasIdentifier());
2120      if (hasIdentifier()) {
2121        result = result && getIdentifier()
2122            .equals(other.getIdentifier());
2123      }
2124      result = result && (hasResourceMemory() == other.hasResourceMemory());
2125      if (hasResourceMemory()) {
2126        result = result && (getResourceMemory()
2127            == other.getResourceMemory());
2128      }
2129      result = result && (hasNodeId() == other.hasNodeId());
2130      if (hasNodeId()) {
2131        result = result && getNodeId()
2132            .equals(other.getNodeId());
2133      }
2134      result = result && (hasVirtualCores() == other.hasVirtualCores());
2135      if (hasVirtualCores()) {
2136        result = result && (getVirtualCores()
2137            == other.getVirtualCores());
2138      }
2139      result = result &&
2140          getUnknownFields().equals(other.getUnknownFields());
2141      return result;
2142    }
2143
2144    private int memoizedHashCode = 0;
2145    @java.lang.Override
2146    public int hashCode() {
2147      if (memoizedHashCode != 0) {
2148        return memoizedHashCode;
2149      }
2150      int hash = 41;
2151      hash = (19 * hash) + getDescriptorForType().hashCode();
2152      if (hasIdentifier()) {
2153        hash = (37 * hash) + IDENTIFIER_FIELD_NUMBER;
2154        hash = (53 * hash) + getIdentifier().hashCode();
2155      }
2156      if (hasResourceMemory()) {
2157        hash = (37 * hash) + RESOURCE_MEMORY_FIELD_NUMBER;
2158        hash = (53 * hash) + getResourceMemory();
2159      }
2160      if (hasNodeId()) {
2161        hash = (37 * hash) + NODE_ID_FIELD_NUMBER;
2162        hash = (53 * hash) + getNodeId().hashCode();
2163      }
2164      if (hasVirtualCores()) {
2165        hash = (37 * hash) + VIRTUAL_CORES_FIELD_NUMBER;
2166        hash = (53 * hash) + getVirtualCores();
2167      }
2168      hash = (29 * hash) + getUnknownFields().hashCode();
2169      memoizedHashCode = hash;
2170      return hash;
2171    }
2172
2173    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto parseFrom(
2174        com.google.protobuf.ByteString data)
2175        throws com.google.protobuf.InvalidProtocolBufferException {
2176      return PARSER.parseFrom(data);
2177    }
2178    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto parseFrom(
2179        com.google.protobuf.ByteString data,
2180        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2181        throws com.google.protobuf.InvalidProtocolBufferException {
2182      return PARSER.parseFrom(data, extensionRegistry);
2183    }
2184    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto parseFrom(byte[] data)
2185        throws com.google.protobuf.InvalidProtocolBufferException {
2186      return PARSER.parseFrom(data);
2187    }
2188    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto parseFrom(
2189        byte[] data,
2190        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2191        throws com.google.protobuf.InvalidProtocolBufferException {
2192      return PARSER.parseFrom(data, extensionRegistry);
2193    }
2194    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto parseFrom(java.io.InputStream input)
2195        throws java.io.IOException {
2196      return PARSER.parseFrom(input);
2197    }
2198    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto parseFrom(
2199        java.io.InputStream input,
2200        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2201        throws java.io.IOException {
2202      return PARSER.parseFrom(input, extensionRegistry);
2203    }
2204    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto parseDelimitedFrom(java.io.InputStream input)
2205        throws java.io.IOException {
2206      return PARSER.parseDelimitedFrom(input);
2207    }
2208    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto parseDelimitedFrom(
2209        java.io.InputStream input,
2210        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2211        throws java.io.IOException {
2212      return PARSER.parseDelimitedFrom(input, extensionRegistry);
2213    }
2214    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto parseFrom(
2215        com.google.protobuf.CodedInputStream input)
2216        throws java.io.IOException {
2217      return PARSER.parseFrom(input);
2218    }
2219    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto parseFrom(
2220        com.google.protobuf.CodedInputStream input,
2221        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2222        throws java.io.IOException {
2223      return PARSER.parseFrom(input, extensionRegistry);
2224    }
2225
2226    public static Builder newBuilder() { return Builder.create(); }
2227    public Builder newBuilderForType() { return newBuilder(); }
2228    public static Builder newBuilder(org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto prototype) {
2229      return newBuilder().mergeFrom(prototype);
2230    }
2231    public Builder toBuilder() { return newBuilder(this); }
2232
2233    @java.lang.Override
2234    protected Builder newBuilderForType(
2235        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2236      Builder builder = new Builder(parent);
2237      return builder;
2238    }
2239    /**
2240     * Protobuf type {@code ResourceAllocationProto}
2241     */
2242    public static final class Builder extends
2243        com.google.protobuf.GeneratedMessage.Builder<Builder>
2244       implements org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProtoOrBuilder {
2245      public static final com.google.protobuf.Descriptors.Descriptor
2246          getDescriptor() {
2247        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceAllocationProto_descriptor;
2248      }
2249
2250      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2251          internalGetFieldAccessorTable() {
2252        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceAllocationProto_fieldAccessorTable
2253            .ensureFieldAccessorsInitialized(
2254                org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto.class, org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto.Builder.class);
2255      }
2256
2257      // Construct using org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto.newBuilder()
2258      private Builder() {
2259        maybeForceBuilderInitialization();
2260      }
2261
2262      private Builder(
2263          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2264        super(parent);
2265        maybeForceBuilderInitialization();
2266      }
2267      private void maybeForceBuilderInitialization() {
2268        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
2269        }
2270      }
2271      private static Builder create() {
2272        return new Builder();
2273      }
2274
2275      public Builder clear() {
2276        super.clear();
2277        identifier_ = "";
2278        bitField0_ = (bitField0_ & ~0x00000001);
2279        resourceMemory_ = 0;
2280        bitField0_ = (bitField0_ & ~0x00000002);
2281        nodeId_ = "";
2282        bitField0_ = (bitField0_ & ~0x00000004);
2283        virtualCores_ = 0;
2284        bitField0_ = (bitField0_ & ~0x00000008);
2285        return this;
2286      }
2287
2288      public Builder clone() {
2289        return create().mergeFrom(buildPartial());
2290      }
2291
2292      public com.google.protobuf.Descriptors.Descriptor
2293          getDescriptorForType() {
2294        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceAllocationProto_descriptor;
2295      }
2296
2297      public org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto getDefaultInstanceForType() {
2298        return org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto.getDefaultInstance();
2299      }
2300
2301      public org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto build() {
2302        org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto result = buildPartial();
2303        if (!result.isInitialized()) {
2304          throw newUninitializedMessageException(result);
2305        }
2306        return result;
2307      }
2308
2309      public org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto buildPartial() {
2310        org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto result = new org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto(this);
2311        int from_bitField0_ = bitField0_;
2312        int to_bitField0_ = 0;
2313        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
2314          to_bitField0_ |= 0x00000001;
2315        }
2316        result.identifier_ = identifier_;
2317        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
2318          to_bitField0_ |= 0x00000002;
2319        }
2320        result.resourceMemory_ = resourceMemory_;
2321        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
2322          to_bitField0_ |= 0x00000004;
2323        }
2324        result.nodeId_ = nodeId_;
2325        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
2326          to_bitField0_ |= 0x00000008;
2327        }
2328        result.virtualCores_ = virtualCores_;
2329        result.bitField0_ = to_bitField0_;
2330        onBuilt();
2331        return result;
2332      }
2333
2334      public Builder mergeFrom(com.google.protobuf.Message other) {
2335        if (other instanceof org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto) {
2336          return mergeFrom((org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto)other);
2337        } else {
2338          super.mergeFrom(other);
2339          return this;
2340        }
2341      }
2342
2343      public Builder mergeFrom(org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto other) {
2344        if (other == org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto.getDefaultInstance()) return this;
2345        if (other.hasIdentifier()) {
2346          bitField0_ |= 0x00000001;
2347          identifier_ = other.identifier_;
2348          onChanged();
2349        }
2350        if (other.hasResourceMemory()) {
2351          setResourceMemory(other.getResourceMemory());
2352        }
2353        if (other.hasNodeId()) {
2354          bitField0_ |= 0x00000004;
2355          nodeId_ = other.nodeId_;
2356          onChanged();
2357        }
2358        if (other.hasVirtualCores()) {
2359          setVirtualCores(other.getVirtualCores());
2360        }
2361        this.mergeUnknownFields(other.getUnknownFields());
2362        return this;
2363      }
2364
2365      public final boolean isInitialized() {
2366        if (!hasIdentifier()) {
2367          
2368          return false;
2369        }
2370        if (!hasResourceMemory()) {
2371          
2372          return false;
2373        }
2374        if (!hasNodeId()) {
2375          
2376          return false;
2377        }
2378        return true;
2379      }
2380
2381      public Builder mergeFrom(
2382          com.google.protobuf.CodedInputStream input,
2383          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2384          throws java.io.IOException {
2385        org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto parsedMessage = null;
2386        try {
2387          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
2388        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2389          parsedMessage = (org.apache.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto) e.getUnfinishedMessage();
2390          throw e;
2391        } finally {
2392          if (parsedMessage != null) {
2393            mergeFrom(parsedMessage);
2394          }
2395        }
2396        return this;
2397      }
2398      private int bitField0_;
2399
2400      // required string identifier = 1;
2401      private java.lang.Object identifier_ = "";
2402      /**
2403       * <code>required string identifier = 1;</code>
2404       *
2405       * <pre>
2406       * e.g., the container id, or the thread id
2407       * </pre>
2408       */
2409      public boolean hasIdentifier() {
2410        return ((bitField0_ & 0x00000001) == 0x00000001);
2411      }
2412      /**
2413       * <code>required string identifier = 1;</code>
2414       *
2415       * <pre>
2416       * e.g., the container id, or the thread id
2417       * </pre>
2418       */
2419      public java.lang.String getIdentifier() {
2420        java.lang.Object ref = identifier_;
2421        if (!(ref instanceof java.lang.String)) {
2422          java.lang.String s = ((com.google.protobuf.ByteString) ref)
2423              .toStringUtf8();
2424          identifier_ = s;
2425          return s;
2426        } else {
2427          return (java.lang.String) ref;
2428        }
2429      }
2430      /**
2431       * <code>required string identifier = 1;</code>
2432       *
2433       * <pre>
2434       * e.g., the container id, or the thread id
2435       * </pre>
2436       */
2437      public com.google.protobuf.ByteString
2438          getIdentifierBytes() {
2439        java.lang.Object ref = identifier_;
2440        if (ref instanceof String) {
2441          com.google.protobuf.ByteString b = 
2442              com.google.protobuf.ByteString.copyFromUtf8(
2443                  (java.lang.String) ref);
2444          identifier_ = b;
2445          return b;
2446        } else {
2447          return (com.google.protobuf.ByteString) ref;
2448        }
2449      }
2450      /**
2451       * <code>required string identifier = 1;</code>
2452       *
2453       * <pre>
2454       * e.g., the container id, or the thread id
2455       * </pre>
2456       */
2457      public Builder setIdentifier(
2458          java.lang.String value) {
2459        if (value == null) {
2460    throw new NullPointerException();
2461  }
2462  bitField0_ |= 0x00000001;
2463        identifier_ = value;
2464        onChanged();
2465        return this;
2466      }
2467      /**
2468       * <code>required string identifier = 1;</code>
2469       *
2470       * <pre>
2471       * e.g., the container id, or the thread id
2472       * </pre>
2473       */
2474      public Builder clearIdentifier() {
2475        bitField0_ = (bitField0_ & ~0x00000001);
2476        identifier_ = getDefaultInstance().getIdentifier();
2477        onChanged();
2478        return this;
2479      }
2480      /**
2481       * <code>required string identifier = 1;</code>
2482       *
2483       * <pre>
2484       * e.g., the container id, or the thread id
2485       * </pre>
2486       */
2487      public Builder setIdentifierBytes(
2488          com.google.protobuf.ByteString value) {
2489        if (value == null) {
2490    throw new NullPointerException();
2491  }
2492  bitField0_ |= 0x00000001;
2493        identifier_ = value;
2494        onChanged();
2495        return this;
2496      }
2497
2498      // required int32 resource_memory = 2;
2499      private int resourceMemory_ ;
2500      /**
2501       * <code>required int32 resource_memory = 2;</code>
2502       *
2503       * <pre>
2504       * megabytes
2505       * </pre>
2506       */
2507      public boolean hasResourceMemory() {
2508        return ((bitField0_ & 0x00000002) == 0x00000002);
2509      }
2510      /**
2511       * <code>required int32 resource_memory = 2;</code>
2512       *
2513       * <pre>
2514       * megabytes
2515       * </pre>
2516       */
2517      public int getResourceMemory() {
2518        return resourceMemory_;
2519      }
2520      /**
2521       * <code>required int32 resource_memory = 2;</code>
2522       *
2523       * <pre>
2524       * megabytes
2525       * </pre>
2526       */
2527      public Builder setResourceMemory(int value) {
2528        bitField0_ |= 0x00000002;
2529        resourceMemory_ = value;
2530        onChanged();
2531        return this;
2532      }
2533      /**
2534       * <code>required int32 resource_memory = 2;</code>
2535       *
2536       * <pre>
2537       * megabytes
2538       * </pre>
2539       */
2540      public Builder clearResourceMemory() {
2541        bitField0_ = (bitField0_ & ~0x00000002);
2542        resourceMemory_ = 0;
2543        onChanged();
2544        return this;
2545      }
2546
2547      // required string node_id = 3;
2548      private java.lang.Object nodeId_ = "";
2549      /**
2550       * <code>required string node_id = 3;</code>
2551       */
2552      public boolean hasNodeId() {
2553        return ((bitField0_ & 0x00000004) == 0x00000004);
2554      }
2555      /**
2556       * <code>required string node_id = 3;</code>
2557       */
2558      public java.lang.String getNodeId() {
2559        java.lang.Object ref = nodeId_;
2560        if (!(ref instanceof java.lang.String)) {
2561          java.lang.String s = ((com.google.protobuf.ByteString) ref)
2562              .toStringUtf8();
2563          nodeId_ = s;
2564          return s;
2565        } else {
2566          return (java.lang.String) ref;
2567        }
2568      }
2569      /**
2570       * <code>required string node_id = 3;</code>
2571       */
2572      public com.google.protobuf.ByteString
2573          getNodeIdBytes() {
2574        java.lang.Object ref = nodeId_;
2575        if (ref instanceof String) {
2576          com.google.protobuf.ByteString b = 
2577              com.google.protobuf.ByteString.copyFromUtf8(
2578                  (java.lang.String) ref);
2579          nodeId_ = b;
2580          return b;
2581        } else {
2582          return (com.google.protobuf.ByteString) ref;
2583        }
2584      }
2585      /**
2586       * <code>required string node_id = 3;</code>
2587       */
2588      public Builder setNodeId(
2589          java.lang.String value) {
2590        if (value == null) {
2591    throw new NullPointerException();
2592  }
2593  bitField0_ |= 0x00000004;
2594        nodeId_ = value;
2595        onChanged();
2596        return this;
2597      }
2598      /**
2599       * <code>required string node_id = 3;</code>
2600       */
2601      public Builder clearNodeId() {
2602        bitField0_ = (bitField0_ & ~0x00000004);
2603        nodeId_ = getDefaultInstance().getNodeId();
2604        onChanged();
2605        return this;
2606      }
2607      /**
2608       * <code>required string node_id = 3;</code>
2609       */
2610      public Builder setNodeIdBytes(
2611          com.google.protobuf.ByteString value) {
2612        if (value == null) {
2613    throw new NullPointerException();
2614  }
2615  bitField0_ |= 0x00000004;
2616        nodeId_ = value;
2617        onChanged();
2618        return this;
2619      }
2620
2621      // optional int32 virtual_cores = 4;
2622      private int virtualCores_ ;
2623      /**
2624       * <code>optional int32 virtual_cores = 4;</code>
2625       */
2626      public boolean hasVirtualCores() {
2627        return ((bitField0_ & 0x00000008) == 0x00000008);
2628      }
2629      /**
2630       * <code>optional int32 virtual_cores = 4;</code>
2631       */
2632      public int getVirtualCores() {
2633        return virtualCores_;
2634      }
2635      /**
2636       * <code>optional int32 virtual_cores = 4;</code>
2637       */
2638      public Builder setVirtualCores(int value) {
2639        bitField0_ |= 0x00000008;
2640        virtualCores_ = value;
2641        onChanged();
2642        return this;
2643      }
2644      /**
2645       * <code>optional int32 virtual_cores = 4;</code>
2646       */
2647      public Builder clearVirtualCores() {
2648        bitField0_ = (bitField0_ & ~0x00000008);
2649        virtualCores_ = 0;
2650        onChanged();
2651        return this;
2652      }
2653
2654      // @@protoc_insertion_point(builder_scope:ResourceAllocationProto)
2655    }
2656
2657    static {
2658      defaultInstance = new ResourceAllocationProto(true);
2659      defaultInstance.initFields();
2660    }
2661
2662    // @@protoc_insertion_point(class_scope:ResourceAllocationProto)
2663  }
2664
2665  public interface ResourceStatusProtoOrBuilder
2666      extends com.google.protobuf.MessageOrBuilder {
2667
2668    // required string identifier = 1;
2669    /**
2670     * <code>required string identifier = 1;</code>
2671     */
2672    boolean hasIdentifier();
2673    /**
2674     * <code>required string identifier = 1;</code>
2675     */
2676    java.lang.String getIdentifier();
2677    /**
2678     * <code>required string identifier = 1;</code>
2679     */
2680    com.google.protobuf.ByteString
2681        getIdentifierBytes();
2682
2683    // required .State state = 2;
2684    /**
2685     * <code>required .State state = 2;</code>
2686     */
2687    boolean hasState();
2688    /**
2689     * <code>required .State state = 2;</code>
2690     */
2691    org.apache.reef.proto.ReefServiceProtos.State getState();
2692
2693    // optional string diagnostics = 3;
2694    /**
2695     * <code>optional string diagnostics = 3;</code>
2696     */
2697    boolean hasDiagnostics();
2698    /**
2699     * <code>optional string diagnostics = 3;</code>
2700     */
2701    java.lang.String getDiagnostics();
2702    /**
2703     * <code>optional string diagnostics = 3;</code>
2704     */
2705    com.google.protobuf.ByteString
2706        getDiagnosticsBytes();
2707
2708    // optional int32 exit_code = 4;
2709    /**
2710     * <code>optional int32 exit_code = 4;</code>
2711     */
2712    boolean hasExitCode();
2713    /**
2714     * <code>optional int32 exit_code = 4;</code>
2715     */
2716    int getExitCode();
2717
2718    // optional bool is_from_previous_driver = 5;
2719    /**
2720     * <code>optional bool is_from_previous_driver = 5;</code>
2721     */
2722    boolean hasIsFromPreviousDriver();
2723    /**
2724     * <code>optional bool is_from_previous_driver = 5;</code>
2725     */
2726    boolean getIsFromPreviousDriver();
2727  }
2728  /**
2729   * Protobuf type {@code ResourceStatusProto}
2730   */
2731  public static final class ResourceStatusProto extends
2732      com.google.protobuf.GeneratedMessage
2733      implements ResourceStatusProtoOrBuilder {
2734    // Use ResourceStatusProto.newBuilder() to construct.
2735    private ResourceStatusProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
2736      super(builder);
2737      this.unknownFields = builder.getUnknownFields();
2738    }
2739    private ResourceStatusProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
2740
2741    private static final ResourceStatusProto defaultInstance;
2742    public static ResourceStatusProto getDefaultInstance() {
2743      return defaultInstance;
2744    }
2745
2746    public ResourceStatusProto getDefaultInstanceForType() {
2747      return defaultInstance;
2748    }
2749
2750    private final com.google.protobuf.UnknownFieldSet unknownFields;
2751    @java.lang.Override
2752    public final com.google.protobuf.UnknownFieldSet
2753        getUnknownFields() {
2754      return this.unknownFields;
2755    }
2756    private ResourceStatusProto(
2757        com.google.protobuf.CodedInputStream input,
2758        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2759        throws com.google.protobuf.InvalidProtocolBufferException {
2760      initFields();
2761      int mutable_bitField0_ = 0;
2762      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
2763          com.google.protobuf.UnknownFieldSet.newBuilder();
2764      try {
2765        boolean done = false;
2766        while (!done) {
2767          int tag = input.readTag();
2768          switch (tag) {
2769            case 0:
2770              done = true;
2771              break;
2772            default: {
2773              if (!parseUnknownField(input, unknownFields,
2774                                     extensionRegistry, tag)) {
2775                done = true;
2776              }
2777              break;
2778            }
2779            case 10: {
2780              bitField0_ |= 0x00000001;
2781              identifier_ = input.readBytes();
2782              break;
2783            }
2784            case 16: {
2785              int rawValue = input.readEnum();
2786              org.apache.reef.proto.ReefServiceProtos.State value = org.apache.reef.proto.ReefServiceProtos.State.valueOf(rawValue);
2787              if (value == null) {
2788                unknownFields.mergeVarintField(2, rawValue);
2789              } else {
2790                bitField0_ |= 0x00000002;
2791                state_ = value;
2792              }
2793              break;
2794            }
2795            case 26: {
2796              bitField0_ |= 0x00000004;
2797              diagnostics_ = input.readBytes();
2798              break;
2799            }
2800            case 32: {
2801              bitField0_ |= 0x00000008;
2802              exitCode_ = input.readInt32();
2803              break;
2804            }
2805            case 40: {
2806              bitField0_ |= 0x00000010;
2807              isFromPreviousDriver_ = input.readBool();
2808              break;
2809            }
2810          }
2811        }
2812      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2813        throw e.setUnfinishedMessage(this);
2814      } catch (java.io.IOException e) {
2815        throw new com.google.protobuf.InvalidProtocolBufferException(
2816            e.getMessage()).setUnfinishedMessage(this);
2817      } finally {
2818        this.unknownFields = unknownFields.build();
2819        makeExtensionsImmutable();
2820      }
2821    }
2822    public static final com.google.protobuf.Descriptors.Descriptor
2823        getDescriptor() {
2824      return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceStatusProto_descriptor;
2825    }
2826
2827    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2828        internalGetFieldAccessorTable() {
2829      return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceStatusProto_fieldAccessorTable
2830          .ensureFieldAccessorsInitialized(
2831              org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto.class, org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto.Builder.class);
2832    }
2833
2834    public static com.google.protobuf.Parser<ResourceStatusProto> PARSER =
2835        new com.google.protobuf.AbstractParser<ResourceStatusProto>() {
2836      public ResourceStatusProto parsePartialFrom(
2837          com.google.protobuf.CodedInputStream input,
2838          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2839          throws com.google.protobuf.InvalidProtocolBufferException {
2840        return new ResourceStatusProto(input, extensionRegistry);
2841      }
2842    };
2843
2844    @java.lang.Override
2845    public com.google.protobuf.Parser<ResourceStatusProto> getParserForType() {
2846      return PARSER;
2847    }
2848
2849    private int bitField0_;
2850    // required string identifier = 1;
2851    public static final int IDENTIFIER_FIELD_NUMBER = 1;
2852    private java.lang.Object identifier_;
2853    /**
2854     * <code>required string identifier = 1;</code>
2855     */
2856    public boolean hasIdentifier() {
2857      return ((bitField0_ & 0x00000001) == 0x00000001);
2858    }
2859    /**
2860     * <code>required string identifier = 1;</code>
2861     */
2862    public java.lang.String getIdentifier() {
2863      java.lang.Object ref = identifier_;
2864      if (ref instanceof java.lang.String) {
2865        return (java.lang.String) ref;
2866      } else {
2867        com.google.protobuf.ByteString bs = 
2868            (com.google.protobuf.ByteString) ref;
2869        java.lang.String s = bs.toStringUtf8();
2870        if (bs.isValidUtf8()) {
2871          identifier_ = s;
2872        }
2873        return s;
2874      }
2875    }
2876    /**
2877     * <code>required string identifier = 1;</code>
2878     */
2879    public com.google.protobuf.ByteString
2880        getIdentifierBytes() {
2881      java.lang.Object ref = identifier_;
2882      if (ref instanceof java.lang.String) {
2883        com.google.protobuf.ByteString b = 
2884            com.google.protobuf.ByteString.copyFromUtf8(
2885                (java.lang.String) ref);
2886        identifier_ = b;
2887        return b;
2888      } else {
2889        return (com.google.protobuf.ByteString) ref;
2890      }
2891    }
2892
2893    // required .State state = 2;
2894    public static final int STATE_FIELD_NUMBER = 2;
2895    private org.apache.reef.proto.ReefServiceProtos.State state_;
2896    /**
2897     * <code>required .State state = 2;</code>
2898     */
2899    public boolean hasState() {
2900      return ((bitField0_ & 0x00000002) == 0x00000002);
2901    }
2902    /**
2903     * <code>required .State state = 2;</code>
2904     */
2905    public org.apache.reef.proto.ReefServiceProtos.State getState() {
2906      return state_;
2907    }
2908
2909    // optional string diagnostics = 3;
2910    public static final int DIAGNOSTICS_FIELD_NUMBER = 3;
2911    private java.lang.Object diagnostics_;
2912    /**
2913     * <code>optional string diagnostics = 3;</code>
2914     */
2915    public boolean hasDiagnostics() {
2916      return ((bitField0_ & 0x00000004) == 0x00000004);
2917    }
2918    /**
2919     * <code>optional string diagnostics = 3;</code>
2920     */
2921    public java.lang.String getDiagnostics() {
2922      java.lang.Object ref = diagnostics_;
2923      if (ref instanceof java.lang.String) {
2924        return (java.lang.String) ref;
2925      } else {
2926        com.google.protobuf.ByteString bs = 
2927            (com.google.protobuf.ByteString) ref;
2928        java.lang.String s = bs.toStringUtf8();
2929        if (bs.isValidUtf8()) {
2930          diagnostics_ = s;
2931        }
2932        return s;
2933      }
2934    }
2935    /**
2936     * <code>optional string diagnostics = 3;</code>
2937     */
2938    public com.google.protobuf.ByteString
2939        getDiagnosticsBytes() {
2940      java.lang.Object ref = diagnostics_;
2941      if (ref instanceof java.lang.String) {
2942        com.google.protobuf.ByteString b = 
2943            com.google.protobuf.ByteString.copyFromUtf8(
2944                (java.lang.String) ref);
2945        diagnostics_ = b;
2946        return b;
2947      } else {
2948        return (com.google.protobuf.ByteString) ref;
2949      }
2950    }
2951
2952    // optional int32 exit_code = 4;
2953    public static final int EXIT_CODE_FIELD_NUMBER = 4;
2954    private int exitCode_;
2955    /**
2956     * <code>optional int32 exit_code = 4;</code>
2957     */
2958    public boolean hasExitCode() {
2959      return ((bitField0_ & 0x00000008) == 0x00000008);
2960    }
2961    /**
2962     * <code>optional int32 exit_code = 4;</code>
2963     */
2964    public int getExitCode() {
2965      return exitCode_;
2966    }
2967
2968    // optional bool is_from_previous_driver = 5;
2969    public static final int IS_FROM_PREVIOUS_DRIVER_FIELD_NUMBER = 5;
2970    private boolean isFromPreviousDriver_;
2971    /**
2972     * <code>optional bool is_from_previous_driver = 5;</code>
2973     */
2974    public boolean hasIsFromPreviousDriver() {
2975      return ((bitField0_ & 0x00000010) == 0x00000010);
2976    }
2977    /**
2978     * <code>optional bool is_from_previous_driver = 5;</code>
2979     */
2980    public boolean getIsFromPreviousDriver() {
2981      return isFromPreviousDriver_;
2982    }
2983
2984    private void initFields() {
2985      identifier_ = "";
2986      state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT;
2987      diagnostics_ = "";
2988      exitCode_ = 0;
2989      isFromPreviousDriver_ = false;
2990    }
2991    private byte memoizedIsInitialized = -1;
2992    public final boolean isInitialized() {
2993      byte isInitialized = memoizedIsInitialized;
2994      if (isInitialized != -1) return isInitialized == 1;
2995
2996      if (!hasIdentifier()) {
2997        memoizedIsInitialized = 0;
2998        return false;
2999      }
3000      if (!hasState()) {
3001        memoizedIsInitialized = 0;
3002        return false;
3003      }
3004      memoizedIsInitialized = 1;
3005      return true;
3006    }
3007
3008    public void writeTo(com.google.protobuf.CodedOutputStream output)
3009                        throws java.io.IOException {
3010      getSerializedSize();
3011      if (((bitField0_ & 0x00000001) == 0x00000001)) {
3012        output.writeBytes(1, getIdentifierBytes());
3013      }
3014      if (((bitField0_ & 0x00000002) == 0x00000002)) {
3015        output.writeEnum(2, state_.getNumber());
3016      }
3017      if (((bitField0_ & 0x00000004) == 0x00000004)) {
3018        output.writeBytes(3, getDiagnosticsBytes());
3019      }
3020      if (((bitField0_ & 0x00000008) == 0x00000008)) {
3021        output.writeInt32(4, exitCode_);
3022      }
3023      if (((bitField0_ & 0x00000010) == 0x00000010)) {
3024        output.writeBool(5, isFromPreviousDriver_);
3025      }
3026      getUnknownFields().writeTo(output);
3027    }
3028
3029    private int memoizedSerializedSize = -1;
3030    public int getSerializedSize() {
3031      int size = memoizedSerializedSize;
3032      if (size != -1) return size;
3033
3034      size = 0;
3035      if (((bitField0_ & 0x00000001) == 0x00000001)) {
3036        size += com.google.protobuf.CodedOutputStream
3037          .computeBytesSize(1, getIdentifierBytes());
3038      }
3039      if (((bitField0_ & 0x00000002) == 0x00000002)) {
3040        size += com.google.protobuf.CodedOutputStream
3041          .computeEnumSize(2, state_.getNumber());
3042      }
3043      if (((bitField0_ & 0x00000004) == 0x00000004)) {
3044        size += com.google.protobuf.CodedOutputStream
3045          .computeBytesSize(3, getDiagnosticsBytes());
3046      }
3047      if (((bitField0_ & 0x00000008) == 0x00000008)) {
3048        size += com.google.protobuf.CodedOutputStream
3049          .computeInt32Size(4, exitCode_);
3050      }
3051      if (((bitField0_ & 0x00000010) == 0x00000010)) {
3052        size += com.google.protobuf.CodedOutputStream
3053          .computeBoolSize(5, isFromPreviousDriver_);
3054      }
3055      size += getUnknownFields().getSerializedSize();
3056      memoizedSerializedSize = size;
3057      return size;
3058    }
3059
3060    private static final long serialVersionUID = 0L;
3061    @java.lang.Override
3062    protected java.lang.Object writeReplace()
3063        throws java.io.ObjectStreamException {
3064      return super.writeReplace();
3065    }
3066
3067    @java.lang.Override
3068    public boolean equals(final java.lang.Object obj) {
3069      if (obj == this) {
3070       return true;
3071      }
3072      if (!(obj instanceof org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto)) {
3073        return super.equals(obj);
3074      }
3075      org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto other = (org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto) obj;
3076
3077      boolean result = true;
3078      result = result && (hasIdentifier() == other.hasIdentifier());
3079      if (hasIdentifier()) {
3080        result = result && getIdentifier()
3081            .equals(other.getIdentifier());
3082      }
3083      result = result && (hasState() == other.hasState());
3084      if (hasState()) {
3085        result = result &&
3086            (getState() == other.getState());
3087      }
3088      result = result && (hasDiagnostics() == other.hasDiagnostics());
3089      if (hasDiagnostics()) {
3090        result = result && getDiagnostics()
3091            .equals(other.getDiagnostics());
3092      }
3093      result = result && (hasExitCode() == other.hasExitCode());
3094      if (hasExitCode()) {
3095        result = result && (getExitCode()
3096            == other.getExitCode());
3097      }
3098      result = result && (hasIsFromPreviousDriver() == other.hasIsFromPreviousDriver());
3099      if (hasIsFromPreviousDriver()) {
3100        result = result && (getIsFromPreviousDriver()
3101            == other.getIsFromPreviousDriver());
3102      }
3103      result = result &&
3104          getUnknownFields().equals(other.getUnknownFields());
3105      return result;
3106    }
3107
3108    private int memoizedHashCode = 0;
3109    @java.lang.Override
3110    public int hashCode() {
3111      if (memoizedHashCode != 0) {
3112        return memoizedHashCode;
3113      }
3114      int hash = 41;
3115      hash = (19 * hash) + getDescriptorForType().hashCode();
3116      if (hasIdentifier()) {
3117        hash = (37 * hash) + IDENTIFIER_FIELD_NUMBER;
3118        hash = (53 * hash) + getIdentifier().hashCode();
3119      }
3120      if (hasState()) {
3121        hash = (37 * hash) + STATE_FIELD_NUMBER;
3122        hash = (53 * hash) + hashEnum(getState());
3123      }
3124      if (hasDiagnostics()) {
3125        hash = (37 * hash) + DIAGNOSTICS_FIELD_NUMBER;
3126        hash = (53 * hash) + getDiagnostics().hashCode();
3127      }
3128      if (hasExitCode()) {
3129        hash = (37 * hash) + EXIT_CODE_FIELD_NUMBER;
3130        hash = (53 * hash) + getExitCode();
3131      }
3132      if (hasIsFromPreviousDriver()) {
3133        hash = (37 * hash) + IS_FROM_PREVIOUS_DRIVER_FIELD_NUMBER;
3134        hash = (53 * hash) + hashBoolean(getIsFromPreviousDriver());
3135      }
3136      hash = (29 * hash) + getUnknownFields().hashCode();
3137      memoizedHashCode = hash;
3138      return hash;
3139    }
3140
3141    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto parseFrom(
3142        com.google.protobuf.ByteString data)
3143        throws com.google.protobuf.InvalidProtocolBufferException {
3144      return PARSER.parseFrom(data);
3145    }
3146    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto parseFrom(
3147        com.google.protobuf.ByteString data,
3148        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3149        throws com.google.protobuf.InvalidProtocolBufferException {
3150      return PARSER.parseFrom(data, extensionRegistry);
3151    }
3152    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto parseFrom(byte[] data)
3153        throws com.google.protobuf.InvalidProtocolBufferException {
3154      return PARSER.parseFrom(data);
3155    }
3156    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto parseFrom(
3157        byte[] data,
3158        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3159        throws com.google.protobuf.InvalidProtocolBufferException {
3160      return PARSER.parseFrom(data, extensionRegistry);
3161    }
3162    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto parseFrom(java.io.InputStream input)
3163        throws java.io.IOException {
3164      return PARSER.parseFrom(input);
3165    }
3166    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto parseFrom(
3167        java.io.InputStream input,
3168        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3169        throws java.io.IOException {
3170      return PARSER.parseFrom(input, extensionRegistry);
3171    }
3172    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto parseDelimitedFrom(java.io.InputStream input)
3173        throws java.io.IOException {
3174      return PARSER.parseDelimitedFrom(input);
3175    }
3176    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto parseDelimitedFrom(
3177        java.io.InputStream input,
3178        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3179        throws java.io.IOException {
3180      return PARSER.parseDelimitedFrom(input, extensionRegistry);
3181    }
3182    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto parseFrom(
3183        com.google.protobuf.CodedInputStream input)
3184        throws java.io.IOException {
3185      return PARSER.parseFrom(input);
3186    }
3187    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto parseFrom(
3188        com.google.protobuf.CodedInputStream input,
3189        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3190        throws java.io.IOException {
3191      return PARSER.parseFrom(input, extensionRegistry);
3192    }
3193
3194    public static Builder newBuilder() { return Builder.create(); }
3195    public Builder newBuilderForType() { return newBuilder(); }
3196    public static Builder newBuilder(org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto prototype) {
3197      return newBuilder().mergeFrom(prototype);
3198    }
3199    public Builder toBuilder() { return newBuilder(this); }
3200
3201    @java.lang.Override
3202    protected Builder newBuilderForType(
3203        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3204      Builder builder = new Builder(parent);
3205      return builder;
3206    }
3207    /**
3208     * Protobuf type {@code ResourceStatusProto}
3209     */
3210    public static final class Builder extends
3211        com.google.protobuf.GeneratedMessage.Builder<Builder>
3212       implements org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProtoOrBuilder {
3213      public static final com.google.protobuf.Descriptors.Descriptor
3214          getDescriptor() {
3215        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceStatusProto_descriptor;
3216      }
3217
3218      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3219          internalGetFieldAccessorTable() {
3220        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceStatusProto_fieldAccessorTable
3221            .ensureFieldAccessorsInitialized(
3222                org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto.class, org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto.Builder.class);
3223      }
3224
3225      // Construct using org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto.newBuilder()
3226      private Builder() {
3227        maybeForceBuilderInitialization();
3228      }
3229
3230      private Builder(
3231          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3232        super(parent);
3233        maybeForceBuilderInitialization();
3234      }
3235      private void maybeForceBuilderInitialization() {
3236        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
3237        }
3238      }
3239      private static Builder create() {
3240        return new Builder();
3241      }
3242
3243      public Builder clear() {
3244        super.clear();
3245        identifier_ = "";
3246        bitField0_ = (bitField0_ & ~0x00000001);
3247        state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT;
3248        bitField0_ = (bitField0_ & ~0x00000002);
3249        diagnostics_ = "";
3250        bitField0_ = (bitField0_ & ~0x00000004);
3251        exitCode_ = 0;
3252        bitField0_ = (bitField0_ & ~0x00000008);
3253        isFromPreviousDriver_ = false;
3254        bitField0_ = (bitField0_ & ~0x00000010);
3255        return this;
3256      }
3257
3258      public Builder clone() {
3259        return create().mergeFrom(buildPartial());
3260      }
3261
3262      public com.google.protobuf.Descriptors.Descriptor
3263          getDescriptorForType() {
3264        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceStatusProto_descriptor;
3265      }
3266
3267      public org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto getDefaultInstanceForType() {
3268        return org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto.getDefaultInstance();
3269      }
3270
3271      public org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto build() {
3272        org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto result = buildPartial();
3273        if (!result.isInitialized()) {
3274          throw newUninitializedMessageException(result);
3275        }
3276        return result;
3277      }
3278
3279      public org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto buildPartial() {
3280        org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto result = new org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto(this);
3281        int from_bitField0_ = bitField0_;
3282        int to_bitField0_ = 0;
3283        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
3284          to_bitField0_ |= 0x00000001;
3285        }
3286        result.identifier_ = identifier_;
3287        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
3288          to_bitField0_ |= 0x00000002;
3289        }
3290        result.state_ = state_;
3291        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
3292          to_bitField0_ |= 0x00000004;
3293        }
3294        result.diagnostics_ = diagnostics_;
3295        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
3296          to_bitField0_ |= 0x00000008;
3297        }
3298        result.exitCode_ = exitCode_;
3299        if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
3300          to_bitField0_ |= 0x00000010;
3301        }
3302        result.isFromPreviousDriver_ = isFromPreviousDriver_;
3303        result.bitField0_ = to_bitField0_;
3304        onBuilt();
3305        return result;
3306      }
3307
3308      public Builder mergeFrom(com.google.protobuf.Message other) {
3309        if (other instanceof org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto) {
3310          return mergeFrom((org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto)other);
3311        } else {
3312          super.mergeFrom(other);
3313          return this;
3314        }
3315      }
3316
3317      public Builder mergeFrom(org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto other) {
3318        if (other == org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto.getDefaultInstance()) return this;
3319        if (other.hasIdentifier()) {
3320          bitField0_ |= 0x00000001;
3321          identifier_ = other.identifier_;
3322          onChanged();
3323        }
3324        if (other.hasState()) {
3325          setState(other.getState());
3326        }
3327        if (other.hasDiagnostics()) {
3328          bitField0_ |= 0x00000004;
3329          diagnostics_ = other.diagnostics_;
3330          onChanged();
3331        }
3332        if (other.hasExitCode()) {
3333          setExitCode(other.getExitCode());
3334        }
3335        if (other.hasIsFromPreviousDriver()) {
3336          setIsFromPreviousDriver(other.getIsFromPreviousDriver());
3337        }
3338        this.mergeUnknownFields(other.getUnknownFields());
3339        return this;
3340      }
3341
3342      public final boolean isInitialized() {
3343        if (!hasIdentifier()) {
3344          
3345          return false;
3346        }
3347        if (!hasState()) {
3348          
3349          return false;
3350        }
3351        return true;
3352      }
3353
3354      public Builder mergeFrom(
3355          com.google.protobuf.CodedInputStream input,
3356          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3357          throws java.io.IOException {
3358        org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto parsedMessage = null;
3359        try {
3360          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
3361        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3362          parsedMessage = (org.apache.reef.proto.DriverRuntimeProtocol.ResourceStatusProto) e.getUnfinishedMessage();
3363          throw e;
3364        } finally {
3365          if (parsedMessage != null) {
3366            mergeFrom(parsedMessage);
3367          }
3368        }
3369        return this;
3370      }
3371      private int bitField0_;
3372
3373      // required string identifier = 1;
3374      private java.lang.Object identifier_ = "";
3375      /**
3376       * <code>required string identifier = 1;</code>
3377       */
3378      public boolean hasIdentifier() {
3379        return ((bitField0_ & 0x00000001) == 0x00000001);
3380      }
3381      /**
3382       * <code>required string identifier = 1;</code>
3383       */
3384      public java.lang.String getIdentifier() {
3385        java.lang.Object ref = identifier_;
3386        if (!(ref instanceof java.lang.String)) {
3387          java.lang.String s = ((com.google.protobuf.ByteString) ref)
3388              .toStringUtf8();
3389          identifier_ = s;
3390          return s;
3391        } else {
3392          return (java.lang.String) ref;
3393        }
3394      }
3395      /**
3396       * <code>required string identifier = 1;</code>
3397       */
3398      public com.google.protobuf.ByteString
3399          getIdentifierBytes() {
3400        java.lang.Object ref = identifier_;
3401        if (ref instanceof String) {
3402          com.google.protobuf.ByteString b = 
3403              com.google.protobuf.ByteString.copyFromUtf8(
3404                  (java.lang.String) ref);
3405          identifier_ = b;
3406          return b;
3407        } else {
3408          return (com.google.protobuf.ByteString) ref;
3409        }
3410      }
3411      /**
3412       * <code>required string identifier = 1;</code>
3413       */
3414      public Builder setIdentifier(
3415          java.lang.String value) {
3416        if (value == null) {
3417    throw new NullPointerException();
3418  }
3419  bitField0_ |= 0x00000001;
3420        identifier_ = value;
3421        onChanged();
3422        return this;
3423      }
3424      /**
3425       * <code>required string identifier = 1;</code>
3426       */
3427      public Builder clearIdentifier() {
3428        bitField0_ = (bitField0_ & ~0x00000001);
3429        identifier_ = getDefaultInstance().getIdentifier();
3430        onChanged();
3431        return this;
3432      }
3433      /**
3434       * <code>required string identifier = 1;</code>
3435       */
3436      public Builder setIdentifierBytes(
3437          com.google.protobuf.ByteString value) {
3438        if (value == null) {
3439    throw new NullPointerException();
3440  }
3441  bitField0_ |= 0x00000001;
3442        identifier_ = value;
3443        onChanged();
3444        return this;
3445      }
3446
3447      // required .State state = 2;
3448      private org.apache.reef.proto.ReefServiceProtos.State state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT;
3449      /**
3450       * <code>required .State state = 2;</code>
3451       */
3452      public boolean hasState() {
3453        return ((bitField0_ & 0x00000002) == 0x00000002);
3454      }
3455      /**
3456       * <code>required .State state = 2;</code>
3457       */
3458      public org.apache.reef.proto.ReefServiceProtos.State getState() {
3459        return state_;
3460      }
3461      /**
3462       * <code>required .State state = 2;</code>
3463       */
3464      public Builder setState(org.apache.reef.proto.ReefServiceProtos.State value) {
3465        if (value == null) {
3466          throw new NullPointerException();
3467        }
3468        bitField0_ |= 0x00000002;
3469        state_ = value;
3470        onChanged();
3471        return this;
3472      }
3473      /**
3474       * <code>required .State state = 2;</code>
3475       */
3476      public Builder clearState() {
3477        bitField0_ = (bitField0_ & ~0x00000002);
3478        state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT;
3479        onChanged();
3480        return this;
3481      }
3482
3483      // optional string diagnostics = 3;
3484      private java.lang.Object diagnostics_ = "";
3485      /**
3486       * <code>optional string diagnostics = 3;</code>
3487       */
3488      public boolean hasDiagnostics() {
3489        return ((bitField0_ & 0x00000004) == 0x00000004);
3490      }
3491      /**
3492       * <code>optional string diagnostics = 3;</code>
3493       */
3494      public java.lang.String getDiagnostics() {
3495        java.lang.Object ref = diagnostics_;
3496        if (!(ref instanceof java.lang.String)) {
3497          java.lang.String s = ((com.google.protobuf.ByteString) ref)
3498              .toStringUtf8();
3499          diagnostics_ = s;
3500          return s;
3501        } else {
3502          return (java.lang.String) ref;
3503        }
3504      }
3505      /**
3506       * <code>optional string diagnostics = 3;</code>
3507       */
3508      public com.google.protobuf.ByteString
3509          getDiagnosticsBytes() {
3510        java.lang.Object ref = diagnostics_;
3511        if (ref instanceof String) {
3512          com.google.protobuf.ByteString b = 
3513              com.google.protobuf.ByteString.copyFromUtf8(
3514                  (java.lang.String) ref);
3515          diagnostics_ = b;
3516          return b;
3517        } else {
3518          return (com.google.protobuf.ByteString) ref;
3519        }
3520      }
3521      /**
3522       * <code>optional string diagnostics = 3;</code>
3523       */
3524      public Builder setDiagnostics(
3525          java.lang.String value) {
3526        if (value == null) {
3527    throw new NullPointerException();
3528  }
3529  bitField0_ |= 0x00000004;
3530        diagnostics_ = value;
3531        onChanged();
3532        return this;
3533      }
3534      /**
3535       * <code>optional string diagnostics = 3;</code>
3536       */
3537      public Builder clearDiagnostics() {
3538        bitField0_ = (bitField0_ & ~0x00000004);
3539        diagnostics_ = getDefaultInstance().getDiagnostics();
3540        onChanged();
3541        return this;
3542      }
3543      /**
3544       * <code>optional string diagnostics = 3;</code>
3545       */
3546      public Builder setDiagnosticsBytes(
3547          com.google.protobuf.ByteString value) {
3548        if (value == null) {
3549    throw new NullPointerException();
3550  }
3551  bitField0_ |= 0x00000004;
3552        diagnostics_ = value;
3553        onChanged();
3554        return this;
3555      }
3556
3557      // optional int32 exit_code = 4;
3558      private int exitCode_ ;
3559      /**
3560       * <code>optional int32 exit_code = 4;</code>
3561       */
3562      public boolean hasExitCode() {
3563        return ((bitField0_ & 0x00000008) == 0x00000008);
3564      }
3565      /**
3566       * <code>optional int32 exit_code = 4;</code>
3567       */
3568      public int getExitCode() {
3569        return exitCode_;
3570      }
3571      /**
3572       * <code>optional int32 exit_code = 4;</code>
3573       */
3574      public Builder setExitCode(int value) {
3575        bitField0_ |= 0x00000008;
3576        exitCode_ = value;
3577        onChanged();
3578        return this;
3579      }
3580      /**
3581       * <code>optional int32 exit_code = 4;</code>
3582       */
3583      public Builder clearExitCode() {
3584        bitField0_ = (bitField0_ & ~0x00000008);
3585        exitCode_ = 0;
3586        onChanged();
3587        return this;
3588      }
3589
3590      // optional bool is_from_previous_driver = 5;
3591      private boolean isFromPreviousDriver_ ;
3592      /**
3593       * <code>optional bool is_from_previous_driver = 5;</code>
3594       */
3595      public boolean hasIsFromPreviousDriver() {
3596        return ((bitField0_ & 0x00000010) == 0x00000010);
3597      }
3598      /**
3599       * <code>optional bool is_from_previous_driver = 5;</code>
3600       */
3601      public boolean getIsFromPreviousDriver() {
3602        return isFromPreviousDriver_;
3603      }
3604      /**
3605       * <code>optional bool is_from_previous_driver = 5;</code>
3606       */
3607      public Builder setIsFromPreviousDriver(boolean value) {
3608        bitField0_ |= 0x00000010;
3609        isFromPreviousDriver_ = value;
3610        onChanged();
3611        return this;
3612      }
3613      /**
3614       * <code>optional bool is_from_previous_driver = 5;</code>
3615       */
3616      public Builder clearIsFromPreviousDriver() {
3617        bitField0_ = (bitField0_ & ~0x00000010);
3618        isFromPreviousDriver_ = false;
3619        onChanged();
3620        return this;
3621      }
3622
3623      // @@protoc_insertion_point(builder_scope:ResourceStatusProto)
3624    }
3625
3626    static {
3627      defaultInstance = new ResourceStatusProto(true);
3628      defaultInstance.initFields();
3629    }
3630
3631    // @@protoc_insertion_point(class_scope:ResourceStatusProto)
3632  }
3633
3634  public interface RuntimeStatusProtoOrBuilder
3635      extends com.google.protobuf.MessageOrBuilder {
3636
3637    // required string name = 1;
3638    /**
3639     * <code>required string name = 1;</code>
3640     *
3641     * <pre>
3642     * e.g., local, yarn21
3643     * </pre>
3644     */
3645    boolean hasName();
3646    /**
3647     * <code>required string name = 1;</code>
3648     *
3649     * <pre>
3650     * e.g., local, yarn21
3651     * </pre>
3652     */
3653    java.lang.String getName();
3654    /**
3655     * <code>required string name = 1;</code>
3656     *
3657     * <pre>
3658     * e.g., local, yarn21
3659     * </pre>
3660     */
3661    com.google.protobuf.ByteString
3662        getNameBytes();
3663
3664    // required .State state = 2;
3665    /**
3666     * <code>required .State state = 2;</code>
3667     */
3668    boolean hasState();
3669    /**
3670     * <code>required .State state = 2;</code>
3671     */
3672    org.apache.reef.proto.ReefServiceProtos.State getState();
3673
3674    // optional .RuntimeErrorProto error = 3;
3675    /**
3676     * <code>optional .RuntimeErrorProto error = 3;</code>
3677     *
3678     * <pre>
3679     * runtime (e.g., YARN) error
3680     * </pre>
3681     */
3682    boolean hasError();
3683    /**
3684     * <code>optional .RuntimeErrorProto error = 3;</code>
3685     *
3686     * <pre>
3687     * runtime (e.g., YARN) error
3688     * </pre>
3689     */
3690    org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto getError();
3691    /**
3692     * <code>optional .RuntimeErrorProto error = 3;</code>
3693     *
3694     * <pre>
3695     * runtime (e.g., YARN) error
3696     * </pre>
3697     */
3698    org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProtoOrBuilder getErrorOrBuilder();
3699
3700    // optional int32 outstanding_container_requests = 5;
3701    /**
3702     * <code>optional int32 outstanding_container_requests = 5;</code>
3703     */
3704    boolean hasOutstandingContainerRequests();
3705    /**
3706     * <code>optional int32 outstanding_container_requests = 5;</code>
3707     */
3708    int getOutstandingContainerRequests();
3709
3710    // repeated string container_allocation = 6;
3711    /**
3712     * <code>repeated string container_allocation = 6;</code>
3713     */
3714    java.util.List<java.lang.String>
3715    getContainerAllocationList();
3716    /**
3717     * <code>repeated string container_allocation = 6;</code>
3718     */
3719    int getContainerAllocationCount();
3720    /**
3721     * <code>repeated string container_allocation = 6;</code>
3722     */
3723    java.lang.String getContainerAllocation(int index);
3724    /**
3725     * <code>repeated string container_allocation = 6;</code>
3726     */
3727    com.google.protobuf.ByteString
3728        getContainerAllocationBytes(int index);
3729  }
3730  /**
3731   * Protobuf type {@code RuntimeStatusProto}
3732   */
3733  public static final class RuntimeStatusProto extends
3734      com.google.protobuf.GeneratedMessage
3735      implements RuntimeStatusProtoOrBuilder {
3736    // Use RuntimeStatusProto.newBuilder() to construct.
3737    private RuntimeStatusProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
3738      super(builder);
3739      this.unknownFields = builder.getUnknownFields();
3740    }
3741    private RuntimeStatusProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
3742
3743    private static final RuntimeStatusProto defaultInstance;
3744    public static RuntimeStatusProto getDefaultInstance() {
3745      return defaultInstance;
3746    }
3747
3748    public RuntimeStatusProto getDefaultInstanceForType() {
3749      return defaultInstance;
3750    }
3751
3752    private final com.google.protobuf.UnknownFieldSet unknownFields;
3753    @java.lang.Override
3754    public final com.google.protobuf.UnknownFieldSet
3755        getUnknownFields() {
3756      return this.unknownFields;
3757    }
3758    private RuntimeStatusProto(
3759        com.google.protobuf.CodedInputStream input,
3760        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3761        throws com.google.protobuf.InvalidProtocolBufferException {
3762      initFields();
3763      int mutable_bitField0_ = 0;
3764      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
3765          com.google.protobuf.UnknownFieldSet.newBuilder();
3766      try {
3767        boolean done = false;
3768        while (!done) {
3769          int tag = input.readTag();
3770          switch (tag) {
3771            case 0:
3772              done = true;
3773              break;
3774            default: {
3775              if (!parseUnknownField(input, unknownFields,
3776                                     extensionRegistry, tag)) {
3777                done = true;
3778              }
3779              break;
3780            }
3781            case 10: {
3782              bitField0_ |= 0x00000001;
3783              name_ = input.readBytes();
3784              break;
3785            }
3786            case 16: {
3787              int rawValue = input.readEnum();
3788              org.apache.reef.proto.ReefServiceProtos.State value = org.apache.reef.proto.ReefServiceProtos.State.valueOf(rawValue);
3789              if (value == null) {
3790                unknownFields.mergeVarintField(2, rawValue);
3791              } else {
3792                bitField0_ |= 0x00000002;
3793                state_ = value;
3794              }
3795              break;
3796            }
3797            case 26: {
3798              org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.Builder subBuilder = null;
3799              if (((bitField0_ & 0x00000004) == 0x00000004)) {
3800                subBuilder = error_.toBuilder();
3801              }
3802              error_ = input.readMessage(org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.PARSER, extensionRegistry);
3803              if (subBuilder != null) {
3804                subBuilder.mergeFrom(error_);
3805                error_ = subBuilder.buildPartial();
3806              }
3807              bitField0_ |= 0x00000004;
3808              break;
3809            }
3810            case 40: {
3811              bitField0_ |= 0x00000008;
3812              outstandingContainerRequests_ = input.readInt32();
3813              break;
3814            }
3815            case 50: {
3816              if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
3817                containerAllocation_ = new com.google.protobuf.LazyStringArrayList();
3818                mutable_bitField0_ |= 0x00000010;
3819              }
3820              containerAllocation_.add(input.readBytes());
3821              break;
3822            }
3823          }
3824        }
3825      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3826        throw e.setUnfinishedMessage(this);
3827      } catch (java.io.IOException e) {
3828        throw new com.google.protobuf.InvalidProtocolBufferException(
3829            e.getMessage()).setUnfinishedMessage(this);
3830      } finally {
3831        if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
3832          containerAllocation_ = new com.google.protobuf.UnmodifiableLazyStringList(containerAllocation_);
3833        }
3834        this.unknownFields = unknownFields.build();
3835        makeExtensionsImmutable();
3836      }
3837    }
3838    public static final com.google.protobuf.Descriptors.Descriptor
3839        getDescriptor() {
3840      return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_RuntimeStatusProto_descriptor;
3841    }
3842
3843    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3844        internalGetFieldAccessorTable() {
3845      return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_RuntimeStatusProto_fieldAccessorTable
3846          .ensureFieldAccessorsInitialized(
3847              org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto.class, org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto.Builder.class);
3848    }
3849
3850    public static com.google.protobuf.Parser<RuntimeStatusProto> PARSER =
3851        new com.google.protobuf.AbstractParser<RuntimeStatusProto>() {
3852      public RuntimeStatusProto parsePartialFrom(
3853          com.google.protobuf.CodedInputStream input,
3854          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3855          throws com.google.protobuf.InvalidProtocolBufferException {
3856        return new RuntimeStatusProto(input, extensionRegistry);
3857      }
3858    };
3859
3860    @java.lang.Override
3861    public com.google.protobuf.Parser<RuntimeStatusProto> getParserForType() {
3862      return PARSER;
3863    }
3864
3865    private int bitField0_;
3866    // required string name = 1;
3867    public static final int NAME_FIELD_NUMBER = 1;
3868    private java.lang.Object name_;
3869    /**
3870     * <code>required string name = 1;</code>
3871     *
3872     * <pre>
3873     * e.g., local, yarn21
3874     * </pre>
3875     */
3876    public boolean hasName() {
3877      return ((bitField0_ & 0x00000001) == 0x00000001);
3878    }
3879    /**
3880     * <code>required string name = 1;</code>
3881     *
3882     * <pre>
3883     * e.g., local, yarn21
3884     * </pre>
3885     */
3886    public java.lang.String getName() {
3887      java.lang.Object ref = name_;
3888      if (ref instanceof java.lang.String) {
3889        return (java.lang.String) ref;
3890      } else {
3891        com.google.protobuf.ByteString bs = 
3892            (com.google.protobuf.ByteString) ref;
3893        java.lang.String s = bs.toStringUtf8();
3894        if (bs.isValidUtf8()) {
3895          name_ = s;
3896        }
3897        return s;
3898      }
3899    }
3900    /**
3901     * <code>required string name = 1;</code>
3902     *
3903     * <pre>
3904     * e.g., local, yarn21
3905     * </pre>
3906     */
3907    public com.google.protobuf.ByteString
3908        getNameBytes() {
3909      java.lang.Object ref = name_;
3910      if (ref instanceof java.lang.String) {
3911        com.google.protobuf.ByteString b = 
3912            com.google.protobuf.ByteString.copyFromUtf8(
3913                (java.lang.String) ref);
3914        name_ = b;
3915        return b;
3916      } else {
3917        return (com.google.protobuf.ByteString) ref;
3918      }
3919    }
3920
3921    // required .State state = 2;
3922    public static final int STATE_FIELD_NUMBER = 2;
3923    private org.apache.reef.proto.ReefServiceProtos.State state_;
3924    /**
3925     * <code>required .State state = 2;</code>
3926     */
3927    public boolean hasState() {
3928      return ((bitField0_ & 0x00000002) == 0x00000002);
3929    }
3930    /**
3931     * <code>required .State state = 2;</code>
3932     */
3933    public org.apache.reef.proto.ReefServiceProtos.State getState() {
3934      return state_;
3935    }
3936
3937    // optional .RuntimeErrorProto error = 3;
3938    public static final int ERROR_FIELD_NUMBER = 3;
3939    private org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto error_;
3940    /**
3941     * <code>optional .RuntimeErrorProto error = 3;</code>
3942     *
3943     * <pre>
3944     * runtime (e.g., YARN) error
3945     * </pre>
3946     */
3947    public boolean hasError() {
3948      return ((bitField0_ & 0x00000004) == 0x00000004);
3949    }
3950    /**
3951     * <code>optional .RuntimeErrorProto error = 3;</code>
3952     *
3953     * <pre>
3954     * runtime (e.g., YARN) error
3955     * </pre>
3956     */
3957    public org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto getError() {
3958      return error_;
3959    }
3960    /**
3961     * <code>optional .RuntimeErrorProto error = 3;</code>
3962     *
3963     * <pre>
3964     * runtime (e.g., YARN) error
3965     * </pre>
3966     */
3967    public org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProtoOrBuilder getErrorOrBuilder() {
3968      return error_;
3969    }
3970
3971    // optional int32 outstanding_container_requests = 5;
3972    public static final int OUTSTANDING_CONTAINER_REQUESTS_FIELD_NUMBER = 5;
3973    private int outstandingContainerRequests_;
3974    /**
3975     * <code>optional int32 outstanding_container_requests = 5;</code>
3976     */
3977    public boolean hasOutstandingContainerRequests() {
3978      return ((bitField0_ & 0x00000008) == 0x00000008);
3979    }
3980    /**
3981     * <code>optional int32 outstanding_container_requests = 5;</code>
3982     */
3983    public int getOutstandingContainerRequests() {
3984      return outstandingContainerRequests_;
3985    }
3986
3987    // repeated string container_allocation = 6;
3988    public static final int CONTAINER_ALLOCATION_FIELD_NUMBER = 6;
3989    private com.google.protobuf.LazyStringList containerAllocation_;
3990    /**
3991     * <code>repeated string container_allocation = 6;</code>
3992     */
3993    public java.util.List<java.lang.String>
3994        getContainerAllocationList() {
3995      return containerAllocation_;
3996    }
3997    /**
3998     * <code>repeated string container_allocation = 6;</code>
3999     */
4000    public int getContainerAllocationCount() {
4001      return containerAllocation_.size();
4002    }
4003    /**
4004     * <code>repeated string container_allocation = 6;</code>
4005     */
4006    public java.lang.String getContainerAllocation(int index) {
4007      return containerAllocation_.get(index);
4008    }
4009    /**
4010     * <code>repeated string container_allocation = 6;</code>
4011     */
4012    public com.google.protobuf.ByteString
4013        getContainerAllocationBytes(int index) {
4014      return containerAllocation_.getByteString(index);
4015    }
4016
4017    private void initFields() {
4018      name_ = "";
4019      state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT;
4020      error_ = org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.getDefaultInstance();
4021      outstandingContainerRequests_ = 0;
4022      containerAllocation_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4023    }
4024    private byte memoizedIsInitialized = -1;
4025    public final boolean isInitialized() {
4026      byte isInitialized = memoizedIsInitialized;
4027      if (isInitialized != -1) return isInitialized == 1;
4028
4029      if (!hasName()) {
4030        memoizedIsInitialized = 0;
4031        return false;
4032      }
4033      if (!hasState()) {
4034        memoizedIsInitialized = 0;
4035        return false;
4036      }
4037      if (hasError()) {
4038        if (!getError().isInitialized()) {
4039          memoizedIsInitialized = 0;
4040          return false;
4041        }
4042      }
4043      memoizedIsInitialized = 1;
4044      return true;
4045    }
4046
4047    public void writeTo(com.google.protobuf.CodedOutputStream output)
4048                        throws java.io.IOException {
4049      getSerializedSize();
4050      if (((bitField0_ & 0x00000001) == 0x00000001)) {
4051        output.writeBytes(1, getNameBytes());
4052      }
4053      if (((bitField0_ & 0x00000002) == 0x00000002)) {
4054        output.writeEnum(2, state_.getNumber());
4055      }
4056      if (((bitField0_ & 0x00000004) == 0x00000004)) {
4057        output.writeMessage(3, error_);
4058      }
4059      if (((bitField0_ & 0x00000008) == 0x00000008)) {
4060        output.writeInt32(5, outstandingContainerRequests_);
4061      }
4062      for (int i = 0; i < containerAllocation_.size(); i++) {
4063        output.writeBytes(6, containerAllocation_.getByteString(i));
4064      }
4065      getUnknownFields().writeTo(output);
4066    }
4067
4068    private int memoizedSerializedSize = -1;
4069    public int getSerializedSize() {
4070      int size = memoizedSerializedSize;
4071      if (size != -1) return size;
4072
4073      size = 0;
4074      if (((bitField0_ & 0x00000001) == 0x00000001)) {
4075        size += com.google.protobuf.CodedOutputStream
4076          .computeBytesSize(1, getNameBytes());
4077      }
4078      if (((bitField0_ & 0x00000002) == 0x00000002)) {
4079        size += com.google.protobuf.CodedOutputStream
4080          .computeEnumSize(2, state_.getNumber());
4081      }
4082      if (((bitField0_ & 0x00000004) == 0x00000004)) {
4083        size += com.google.protobuf.CodedOutputStream
4084          .computeMessageSize(3, error_);
4085      }
4086      if (((bitField0_ & 0x00000008) == 0x00000008)) {
4087        size += com.google.protobuf.CodedOutputStream
4088          .computeInt32Size(5, outstandingContainerRequests_);
4089      }
4090      {
4091        int dataSize = 0;
4092        for (int i = 0; i < containerAllocation_.size(); i++) {
4093          dataSize += com.google.protobuf.CodedOutputStream
4094            .computeBytesSizeNoTag(containerAllocation_.getByteString(i));
4095        }
4096        size += dataSize;
4097        size += 1 * getContainerAllocationList().size();
4098      }
4099      size += getUnknownFields().getSerializedSize();
4100      memoizedSerializedSize = size;
4101      return size;
4102    }
4103
4104    private static final long serialVersionUID = 0L;
4105    @java.lang.Override
4106    protected java.lang.Object writeReplace()
4107        throws java.io.ObjectStreamException {
4108      return super.writeReplace();
4109    }
4110
4111    @java.lang.Override
4112    public boolean equals(final java.lang.Object obj) {
4113      if (obj == this) {
4114       return true;
4115      }
4116      if (!(obj instanceof org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto)) {
4117        return super.equals(obj);
4118      }
4119      org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto other = (org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto) obj;
4120
4121      boolean result = true;
4122      result = result && (hasName() == other.hasName());
4123      if (hasName()) {
4124        result = result && getName()
4125            .equals(other.getName());
4126      }
4127      result = result && (hasState() == other.hasState());
4128      if (hasState()) {
4129        result = result &&
4130            (getState() == other.getState());
4131      }
4132      result = result && (hasError() == other.hasError());
4133      if (hasError()) {
4134        result = result && getError()
4135            .equals(other.getError());
4136      }
4137      result = result && (hasOutstandingContainerRequests() == other.hasOutstandingContainerRequests());
4138      if (hasOutstandingContainerRequests()) {
4139        result = result && (getOutstandingContainerRequests()
4140            == other.getOutstandingContainerRequests());
4141      }
4142      result = result && getContainerAllocationList()
4143          .equals(other.getContainerAllocationList());
4144      result = result &&
4145          getUnknownFields().equals(other.getUnknownFields());
4146      return result;
4147    }
4148
4149    private int memoizedHashCode = 0;
4150    @java.lang.Override
4151    public int hashCode() {
4152      if (memoizedHashCode != 0) {
4153        return memoizedHashCode;
4154      }
4155      int hash = 41;
4156      hash = (19 * hash) + getDescriptorForType().hashCode();
4157      if (hasName()) {
4158        hash = (37 * hash) + NAME_FIELD_NUMBER;
4159        hash = (53 * hash) + getName().hashCode();
4160      }
4161      if (hasState()) {
4162        hash = (37 * hash) + STATE_FIELD_NUMBER;
4163        hash = (53 * hash) + hashEnum(getState());
4164      }
4165      if (hasError()) {
4166        hash = (37 * hash) + ERROR_FIELD_NUMBER;
4167        hash = (53 * hash) + getError().hashCode();
4168      }
4169      if (hasOutstandingContainerRequests()) {
4170        hash = (37 * hash) + OUTSTANDING_CONTAINER_REQUESTS_FIELD_NUMBER;
4171        hash = (53 * hash) + getOutstandingContainerRequests();
4172      }
4173      if (getContainerAllocationCount() > 0) {
4174        hash = (37 * hash) + CONTAINER_ALLOCATION_FIELD_NUMBER;
4175        hash = (53 * hash) + getContainerAllocationList().hashCode();
4176      }
4177      hash = (29 * hash) + getUnknownFields().hashCode();
4178      memoizedHashCode = hash;
4179      return hash;
4180    }
4181
4182    public static org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto parseFrom(
4183        com.google.protobuf.ByteString data)
4184        throws com.google.protobuf.InvalidProtocolBufferException {
4185      return PARSER.parseFrom(data);
4186    }
4187    public static org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto parseFrom(
4188        com.google.protobuf.ByteString data,
4189        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4190        throws com.google.protobuf.InvalidProtocolBufferException {
4191      return PARSER.parseFrom(data, extensionRegistry);
4192    }
4193    public static org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto parseFrom(byte[] data)
4194        throws com.google.protobuf.InvalidProtocolBufferException {
4195      return PARSER.parseFrom(data);
4196    }
4197    public static org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto parseFrom(
4198        byte[] data,
4199        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4200        throws com.google.protobuf.InvalidProtocolBufferException {
4201      return PARSER.parseFrom(data, extensionRegistry);
4202    }
4203    public static org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto parseFrom(java.io.InputStream input)
4204        throws java.io.IOException {
4205      return PARSER.parseFrom(input);
4206    }
4207    public static org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto parseFrom(
4208        java.io.InputStream input,
4209        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4210        throws java.io.IOException {
4211      return PARSER.parseFrom(input, extensionRegistry);
4212    }
4213    public static org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto parseDelimitedFrom(java.io.InputStream input)
4214        throws java.io.IOException {
4215      return PARSER.parseDelimitedFrom(input);
4216    }
4217    public static org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto parseDelimitedFrom(
4218        java.io.InputStream input,
4219        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4220        throws java.io.IOException {
4221      return PARSER.parseDelimitedFrom(input, extensionRegistry);
4222    }
4223    public static org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto parseFrom(
4224        com.google.protobuf.CodedInputStream input)
4225        throws java.io.IOException {
4226      return PARSER.parseFrom(input);
4227    }
4228    public static org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto parseFrom(
4229        com.google.protobuf.CodedInputStream input,
4230        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4231        throws java.io.IOException {
4232      return PARSER.parseFrom(input, extensionRegistry);
4233    }
4234
4235    public static Builder newBuilder() { return Builder.create(); }
4236    public Builder newBuilderForType() { return newBuilder(); }
4237    public static Builder newBuilder(org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto prototype) {
4238      return newBuilder().mergeFrom(prototype);
4239    }
4240    public Builder toBuilder() { return newBuilder(this); }
4241
4242    @java.lang.Override
4243    protected Builder newBuilderForType(
4244        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
4245      Builder builder = new Builder(parent);
4246      return builder;
4247    }
4248    /**
4249     * Protobuf type {@code RuntimeStatusProto}
4250     */
4251    public static final class Builder extends
4252        com.google.protobuf.GeneratedMessage.Builder<Builder>
4253       implements org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProtoOrBuilder {
4254      public static final com.google.protobuf.Descriptors.Descriptor
4255          getDescriptor() {
4256        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_RuntimeStatusProto_descriptor;
4257      }
4258
4259      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
4260          internalGetFieldAccessorTable() {
4261        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_RuntimeStatusProto_fieldAccessorTable
4262            .ensureFieldAccessorsInitialized(
4263                org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto.class, org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto.Builder.class);
4264      }
4265
4266      // Construct using org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto.newBuilder()
4267      private Builder() {
4268        maybeForceBuilderInitialization();
4269      }
4270
4271      private Builder(
4272          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
4273        super(parent);
4274        maybeForceBuilderInitialization();
4275      }
4276      private void maybeForceBuilderInitialization() {
4277        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
4278          getErrorFieldBuilder();
4279        }
4280      }
4281      private static Builder create() {
4282        return new Builder();
4283      }
4284
4285      public Builder clear() {
4286        super.clear();
4287        name_ = "";
4288        bitField0_ = (bitField0_ & ~0x00000001);
4289        state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT;
4290        bitField0_ = (bitField0_ & ~0x00000002);
4291        if (errorBuilder_ == null) {
4292          error_ = org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.getDefaultInstance();
4293        } else {
4294          errorBuilder_.clear();
4295        }
4296        bitField0_ = (bitField0_ & ~0x00000004);
4297        outstandingContainerRequests_ = 0;
4298        bitField0_ = (bitField0_ & ~0x00000008);
4299        containerAllocation_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4300        bitField0_ = (bitField0_ & ~0x00000010);
4301        return this;
4302      }
4303
4304      public Builder clone() {
4305        return create().mergeFrom(buildPartial());
4306      }
4307
4308      public com.google.protobuf.Descriptors.Descriptor
4309          getDescriptorForType() {
4310        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_RuntimeStatusProto_descriptor;
4311      }
4312
4313      public org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto getDefaultInstanceForType() {
4314        return org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto.getDefaultInstance();
4315      }
4316
4317      public org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto build() {
4318        org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto result = buildPartial();
4319        if (!result.isInitialized()) {
4320          throw newUninitializedMessageException(result);
4321        }
4322        return result;
4323      }
4324
4325      public org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto buildPartial() {
4326        org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto result = new org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto(this);
4327        int from_bitField0_ = bitField0_;
4328        int to_bitField0_ = 0;
4329        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
4330          to_bitField0_ |= 0x00000001;
4331        }
4332        result.name_ = name_;
4333        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
4334          to_bitField0_ |= 0x00000002;
4335        }
4336        result.state_ = state_;
4337        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
4338          to_bitField0_ |= 0x00000004;
4339        }
4340        if (errorBuilder_ == null) {
4341          result.error_ = error_;
4342        } else {
4343          result.error_ = errorBuilder_.build();
4344        }
4345        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
4346          to_bitField0_ |= 0x00000008;
4347        }
4348        result.outstandingContainerRequests_ = outstandingContainerRequests_;
4349        if (((bitField0_ & 0x00000010) == 0x00000010)) {
4350          containerAllocation_ = new com.google.protobuf.UnmodifiableLazyStringList(
4351              containerAllocation_);
4352          bitField0_ = (bitField0_ & ~0x00000010);
4353        }
4354        result.containerAllocation_ = containerAllocation_;
4355        result.bitField0_ = to_bitField0_;
4356        onBuilt();
4357        return result;
4358      }
4359
4360      public Builder mergeFrom(com.google.protobuf.Message other) {
4361        if (other instanceof org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto) {
4362          return mergeFrom((org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto)other);
4363        } else {
4364          super.mergeFrom(other);
4365          return this;
4366        }
4367      }
4368
4369      public Builder mergeFrom(org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto other) {
4370        if (other == org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto.getDefaultInstance()) return this;
4371        if (other.hasName()) {
4372          bitField0_ |= 0x00000001;
4373          name_ = other.name_;
4374          onChanged();
4375        }
4376        if (other.hasState()) {
4377          setState(other.getState());
4378        }
4379        if (other.hasError()) {
4380          mergeError(other.getError());
4381        }
4382        if (other.hasOutstandingContainerRequests()) {
4383          setOutstandingContainerRequests(other.getOutstandingContainerRequests());
4384        }
4385        if (!other.containerAllocation_.isEmpty()) {
4386          if (containerAllocation_.isEmpty()) {
4387            containerAllocation_ = other.containerAllocation_;
4388            bitField0_ = (bitField0_ & ~0x00000010);
4389          } else {
4390            ensureContainerAllocationIsMutable();
4391            containerAllocation_.addAll(other.containerAllocation_);
4392          }
4393          onChanged();
4394        }
4395        this.mergeUnknownFields(other.getUnknownFields());
4396        return this;
4397      }
4398
4399      public final boolean isInitialized() {
4400        if (!hasName()) {
4401          
4402          return false;
4403        }
4404        if (!hasState()) {
4405          
4406          return false;
4407        }
4408        if (hasError()) {
4409          if (!getError().isInitialized()) {
4410            
4411            return false;
4412          }
4413        }
4414        return true;
4415      }
4416
4417      public Builder mergeFrom(
4418          com.google.protobuf.CodedInputStream input,
4419          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4420          throws java.io.IOException {
4421        org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto parsedMessage = null;
4422        try {
4423          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
4424        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4425          parsedMessage = (org.apache.reef.proto.DriverRuntimeProtocol.RuntimeStatusProto) e.getUnfinishedMessage();
4426          throw e;
4427        } finally {
4428          if (parsedMessage != null) {
4429            mergeFrom(parsedMessage);
4430          }
4431        }
4432        return this;
4433      }
4434      private int bitField0_;
4435
4436      // required string name = 1;
4437      private java.lang.Object name_ = "";
4438      /**
4439       * <code>required string name = 1;</code>
4440       *
4441       * <pre>
4442       * e.g., local, yarn21
4443       * </pre>
4444       */
4445      public boolean hasName() {
4446        return ((bitField0_ & 0x00000001) == 0x00000001);
4447      }
4448      /**
4449       * <code>required string name = 1;</code>
4450       *
4451       * <pre>
4452       * e.g., local, yarn21
4453       * </pre>
4454       */
4455      public java.lang.String getName() {
4456        java.lang.Object ref = name_;
4457        if (!(ref instanceof java.lang.String)) {
4458          java.lang.String s = ((com.google.protobuf.ByteString) ref)
4459              .toStringUtf8();
4460          name_ = s;
4461          return s;
4462        } else {
4463          return (java.lang.String) ref;
4464        }
4465      }
4466      /**
4467       * <code>required string name = 1;</code>
4468       *
4469       * <pre>
4470       * e.g., local, yarn21
4471       * </pre>
4472       */
4473      public com.google.protobuf.ByteString
4474          getNameBytes() {
4475        java.lang.Object ref = name_;
4476        if (ref instanceof String) {
4477          com.google.protobuf.ByteString b = 
4478              com.google.protobuf.ByteString.copyFromUtf8(
4479                  (java.lang.String) ref);
4480          name_ = b;
4481          return b;
4482        } else {
4483          return (com.google.protobuf.ByteString) ref;
4484        }
4485      }
4486      /**
4487       * <code>required string name = 1;</code>
4488       *
4489       * <pre>
4490       * e.g., local, yarn21
4491       * </pre>
4492       */
4493      public Builder setName(
4494          java.lang.String value) {
4495        if (value == null) {
4496    throw new NullPointerException();
4497  }
4498  bitField0_ |= 0x00000001;
4499        name_ = value;
4500        onChanged();
4501        return this;
4502      }
4503      /**
4504       * <code>required string name = 1;</code>
4505       *
4506       * <pre>
4507       * e.g., local, yarn21
4508       * </pre>
4509       */
4510      public Builder clearName() {
4511        bitField0_ = (bitField0_ & ~0x00000001);
4512        name_ = getDefaultInstance().getName();
4513        onChanged();
4514        return this;
4515      }
4516      /**
4517       * <code>required string name = 1;</code>
4518       *
4519       * <pre>
4520       * e.g., local, yarn21
4521       * </pre>
4522       */
4523      public Builder setNameBytes(
4524          com.google.protobuf.ByteString value) {
4525        if (value == null) {
4526    throw new NullPointerException();
4527  }
4528  bitField0_ |= 0x00000001;
4529        name_ = value;
4530        onChanged();
4531        return this;
4532      }
4533
4534      // required .State state = 2;
4535      private org.apache.reef.proto.ReefServiceProtos.State state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT;
4536      /**
4537       * <code>required .State state = 2;</code>
4538       */
4539      public boolean hasState() {
4540        return ((bitField0_ & 0x00000002) == 0x00000002);
4541      }
4542      /**
4543       * <code>required .State state = 2;</code>
4544       */
4545      public org.apache.reef.proto.ReefServiceProtos.State getState() {
4546        return state_;
4547      }
4548      /**
4549       * <code>required .State state = 2;</code>
4550       */
4551      public Builder setState(org.apache.reef.proto.ReefServiceProtos.State value) {
4552        if (value == null) {
4553          throw new NullPointerException();
4554        }
4555        bitField0_ |= 0x00000002;
4556        state_ = value;
4557        onChanged();
4558        return this;
4559      }
4560      /**
4561       * <code>required .State state = 2;</code>
4562       */
4563      public Builder clearState() {
4564        bitField0_ = (bitField0_ & ~0x00000002);
4565        state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT;
4566        onChanged();
4567        return this;
4568      }
4569
4570      // optional .RuntimeErrorProto error = 3;
4571      private org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto error_ = org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.getDefaultInstance();
4572      private com.google.protobuf.SingleFieldBuilder<
4573          org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto, org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.Builder, org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProtoOrBuilder> errorBuilder_;
4574      /**
4575       * <code>optional .RuntimeErrorProto error = 3;</code>
4576       *
4577       * <pre>
4578       * runtime (e.g., YARN) error
4579       * </pre>
4580       */
4581      public boolean hasError() {
4582        return ((bitField0_ & 0x00000004) == 0x00000004);
4583      }
4584      /**
4585       * <code>optional .RuntimeErrorProto error = 3;</code>
4586       *
4587       * <pre>
4588       * runtime (e.g., YARN) error
4589       * </pre>
4590       */
4591      public org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto getError() {
4592        if (errorBuilder_ == null) {
4593          return error_;
4594        } else {
4595          return errorBuilder_.getMessage();
4596        }
4597      }
4598      /**
4599       * <code>optional .RuntimeErrorProto error = 3;</code>
4600       *
4601       * <pre>
4602       * runtime (e.g., YARN) error
4603       * </pre>
4604       */
4605      public Builder setError(org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto value) {
4606        if (errorBuilder_ == null) {
4607          if (value == null) {
4608            throw new NullPointerException();
4609          }
4610          error_ = value;
4611          onChanged();
4612        } else {
4613          errorBuilder_.setMessage(value);
4614        }
4615        bitField0_ |= 0x00000004;
4616        return this;
4617      }
4618      /**
4619       * <code>optional .RuntimeErrorProto error = 3;</code>
4620       *
4621       * <pre>
4622       * runtime (e.g., YARN) error
4623       * </pre>
4624       */
4625      public Builder setError(
4626          org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.Builder builderForValue) {
4627        if (errorBuilder_ == null) {
4628          error_ = builderForValue.build();
4629          onChanged();
4630        } else {
4631          errorBuilder_.setMessage(builderForValue.build());
4632        }
4633        bitField0_ |= 0x00000004;
4634        return this;
4635      }
4636      /**
4637       * <code>optional .RuntimeErrorProto error = 3;</code>
4638       *
4639       * <pre>
4640       * runtime (e.g., YARN) error
4641       * </pre>
4642       */
4643      public Builder mergeError(org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto value) {
4644        if (errorBuilder_ == null) {
4645          if (((bitField0_ & 0x00000004) == 0x00000004) &&
4646              error_ != org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.getDefaultInstance()) {
4647            error_ =
4648              org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.newBuilder(error_).mergeFrom(value).buildPartial();
4649          } else {
4650            error_ = value;
4651          }
4652          onChanged();
4653        } else {
4654          errorBuilder_.mergeFrom(value);
4655        }
4656        bitField0_ |= 0x00000004;
4657        return this;
4658      }
4659      /**
4660       * <code>optional .RuntimeErrorProto error = 3;</code>
4661       *
4662       * <pre>
4663       * runtime (e.g., YARN) error
4664       * </pre>
4665       */
4666      public Builder clearError() {
4667        if (errorBuilder_ == null) {
4668          error_ = org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.getDefaultInstance();
4669          onChanged();
4670        } else {
4671          errorBuilder_.clear();
4672        }
4673        bitField0_ = (bitField0_ & ~0x00000004);
4674        return this;
4675      }
4676      /**
4677       * <code>optional .RuntimeErrorProto error = 3;</code>
4678       *
4679       * <pre>
4680       * runtime (e.g., YARN) error
4681       * </pre>
4682       */
4683      public org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.Builder getErrorBuilder() {
4684        bitField0_ |= 0x00000004;
4685        onChanged();
4686        return getErrorFieldBuilder().getBuilder();
4687      }
4688      /**
4689       * <code>optional .RuntimeErrorProto error = 3;</code>
4690       *
4691       * <pre>
4692       * runtime (e.g., YARN) error
4693       * </pre>
4694       */
4695      public org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProtoOrBuilder getErrorOrBuilder() {
4696        if (errorBuilder_ != null) {
4697          return errorBuilder_.getMessageOrBuilder();
4698        } else {
4699          return error_;
4700        }
4701      }
4702      /**
4703       * <code>optional .RuntimeErrorProto error = 3;</code>
4704       *
4705       * <pre>
4706       * runtime (e.g., YARN) error
4707       * </pre>
4708       */
4709      private com.google.protobuf.SingleFieldBuilder<
4710          org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto, org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.Builder, org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProtoOrBuilder> 
4711          getErrorFieldBuilder() {
4712        if (errorBuilder_ == null) {
4713          errorBuilder_ = new com.google.protobuf.SingleFieldBuilder<
4714              org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto, org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.Builder, org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProtoOrBuilder>(
4715                  error_,
4716                  getParentForChildren(),
4717                  isClean());
4718          error_ = null;
4719        }
4720        return errorBuilder_;
4721      }
4722
4723      // optional int32 outstanding_container_requests = 5;
4724      private int outstandingContainerRequests_ ;
4725      /**
4726       * <code>optional int32 outstanding_container_requests = 5;</code>
4727       */
4728      public boolean hasOutstandingContainerRequests() {
4729        return ((bitField0_ & 0x00000008) == 0x00000008);
4730      }
4731      /**
4732       * <code>optional int32 outstanding_container_requests = 5;</code>
4733       */
4734      public int getOutstandingContainerRequests() {
4735        return outstandingContainerRequests_;
4736      }
4737      /**
4738       * <code>optional int32 outstanding_container_requests = 5;</code>
4739       */
4740      public Builder setOutstandingContainerRequests(int value) {
4741        bitField0_ |= 0x00000008;
4742        outstandingContainerRequests_ = value;
4743        onChanged();
4744        return this;
4745      }
4746      /**
4747       * <code>optional int32 outstanding_container_requests = 5;</code>
4748       */
4749      public Builder clearOutstandingContainerRequests() {
4750        bitField0_ = (bitField0_ & ~0x00000008);
4751        outstandingContainerRequests_ = 0;
4752        onChanged();
4753        return this;
4754      }
4755
4756      // repeated string container_allocation = 6;
4757      private com.google.protobuf.LazyStringList containerAllocation_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4758      private void ensureContainerAllocationIsMutable() {
4759        if (!((bitField0_ & 0x00000010) == 0x00000010)) {
4760          containerAllocation_ = new com.google.protobuf.LazyStringArrayList(containerAllocation_);
4761          bitField0_ |= 0x00000010;
4762         }
4763      }
4764      /**
4765       * <code>repeated string container_allocation = 6;</code>
4766       */
4767      public java.util.List<java.lang.String>
4768          getContainerAllocationList() {
4769        return java.util.Collections.unmodifiableList(containerAllocation_);
4770      }
4771      /**
4772       * <code>repeated string container_allocation = 6;</code>
4773       */
4774      public int getContainerAllocationCount() {
4775        return containerAllocation_.size();
4776      }
4777      /**
4778       * <code>repeated string container_allocation = 6;</code>
4779       */
4780      public java.lang.String getContainerAllocation(int index) {
4781        return containerAllocation_.get(index);
4782      }
4783      /**
4784       * <code>repeated string container_allocation = 6;</code>
4785       */
4786      public com.google.protobuf.ByteString
4787          getContainerAllocationBytes(int index) {
4788        return containerAllocation_.getByteString(index);
4789      }
4790      /**
4791       * <code>repeated string container_allocation = 6;</code>
4792       */
4793      public Builder setContainerAllocation(
4794          int index, java.lang.String value) {
4795        if (value == null) {
4796    throw new NullPointerException();
4797  }
4798  ensureContainerAllocationIsMutable();
4799        containerAllocation_.set(index, value);
4800        onChanged();
4801        return this;
4802      }
4803      /**
4804       * <code>repeated string container_allocation = 6;</code>
4805       */
4806      public Builder addContainerAllocation(
4807          java.lang.String value) {
4808        if (value == null) {
4809    throw new NullPointerException();
4810  }
4811  ensureContainerAllocationIsMutable();
4812        containerAllocation_.add(value);
4813        onChanged();
4814        return this;
4815      }
4816      /**
4817       * <code>repeated string container_allocation = 6;</code>
4818       */
4819      public Builder addAllContainerAllocation(
4820          java.lang.Iterable<java.lang.String> values) {
4821        ensureContainerAllocationIsMutable();
4822        super.addAll(values, containerAllocation_);
4823        onChanged();
4824        return this;
4825      }
4826      /**
4827       * <code>repeated string container_allocation = 6;</code>
4828       */
4829      public Builder clearContainerAllocation() {
4830        containerAllocation_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4831        bitField0_ = (bitField0_ & ~0x00000010);
4832        onChanged();
4833        return this;
4834      }
4835      /**
4836       * <code>repeated string container_allocation = 6;</code>
4837       */
4838      public Builder addContainerAllocationBytes(
4839          com.google.protobuf.ByteString value) {
4840        if (value == null) {
4841    throw new NullPointerException();
4842  }
4843  ensureContainerAllocationIsMutable();
4844        containerAllocation_.add(value);
4845        onChanged();
4846        return this;
4847      }
4848
4849      // @@protoc_insertion_point(builder_scope:RuntimeStatusProto)
4850    }
4851
4852    static {
4853      defaultInstance = new RuntimeStatusProto(true);
4854      defaultInstance.initFields();
4855    }
4856
4857    // @@protoc_insertion_point(class_scope:RuntimeStatusProto)
4858  }
4859
4860  public interface ResourceRequestProtoOrBuilder
4861      extends com.google.protobuf.MessageOrBuilder {
4862
4863    // optional int32 memory_size = 2;
4864    /**
4865     * <code>optional int32 memory_size = 2;</code>
4866     *
4867     * <pre>
4868     * optional SIZE resource_size  = 1; // Removed in REEF 0.3 in favor of memory_size.
4869     * </pre>
4870     */
4871    boolean hasMemorySize();
4872    /**
4873     * <code>optional int32 memory_size = 2;</code>
4874     *
4875     * <pre>
4876     * optional SIZE resource_size  = 1; // Removed in REEF 0.3 in favor of memory_size.
4877     * </pre>
4878     */
4879    int getMemorySize();
4880
4881    // optional int32 priority = 3;
4882    /**
4883     * <code>optional int32 priority = 3;</code>
4884     */
4885    boolean hasPriority();
4886    /**
4887     * <code>optional int32 priority = 3;</code>
4888     */
4889    int getPriority();
4890
4891    // optional int32 virtual_cores = 4;
4892    /**
4893     * <code>optional int32 virtual_cores = 4;</code>
4894     */
4895    boolean hasVirtualCores();
4896    /**
4897     * <code>optional int32 virtual_cores = 4;</code>
4898     */
4899    int getVirtualCores();
4900
4901    // required int32 resource_count = 5;
4902    /**
4903     * <code>required int32 resource_count = 5;</code>
4904     */
4905    boolean hasResourceCount();
4906    /**
4907     * <code>required int32 resource_count = 5;</code>
4908     */
4909    int getResourceCount();
4910
4911    // repeated string node_name = 6;
4912    /**
4913     * <code>repeated string node_name = 6;</code>
4914     *
4915     * <pre>
4916     * a list of specific nodes
4917     * </pre>
4918     */
4919    java.util.List<java.lang.String>
4920    getNodeNameList();
4921    /**
4922     * <code>repeated string node_name = 6;</code>
4923     *
4924     * <pre>
4925     * a list of specific nodes
4926     * </pre>
4927     */
4928    int getNodeNameCount();
4929    /**
4930     * <code>repeated string node_name = 6;</code>
4931     *
4932     * <pre>
4933     * a list of specific nodes
4934     * </pre>
4935     */
4936    java.lang.String getNodeName(int index);
4937    /**
4938     * <code>repeated string node_name = 6;</code>
4939     *
4940     * <pre>
4941     * a list of specific nodes
4942     * </pre>
4943     */
4944    com.google.protobuf.ByteString
4945        getNodeNameBytes(int index);
4946
4947    // repeated string rack_name = 7;
4948    /**
4949     * <code>repeated string rack_name = 7;</code>
4950     *
4951     * <pre>
4952     * a list of specific racks
4953     * </pre>
4954     */
4955    java.util.List<java.lang.String>
4956    getRackNameList();
4957    /**
4958     * <code>repeated string rack_name = 7;</code>
4959     *
4960     * <pre>
4961     * a list of specific racks
4962     * </pre>
4963     */
4964    int getRackNameCount();
4965    /**
4966     * <code>repeated string rack_name = 7;</code>
4967     *
4968     * <pre>
4969     * a list of specific racks
4970     * </pre>
4971     */
4972    java.lang.String getRackName(int index);
4973    /**
4974     * <code>repeated string rack_name = 7;</code>
4975     *
4976     * <pre>
4977     * a list of specific racks
4978     * </pre>
4979     */
4980    com.google.protobuf.ByteString
4981        getRackNameBytes(int index);
4982
4983    // optional bool relax_locality = 10;
4984    /**
4985     * <code>optional bool relax_locality = 10;</code>
4986     */
4987    boolean hasRelaxLocality();
4988    /**
4989     * <code>optional bool relax_locality = 10;</code>
4990     */
4991    boolean getRelaxLocality();
4992  }
4993  /**
4994   * Protobuf type {@code ResourceRequestProto}
4995   */
4996  public static final class ResourceRequestProto extends
4997      com.google.protobuf.GeneratedMessage
4998      implements ResourceRequestProtoOrBuilder {
4999    // Use ResourceRequestProto.newBuilder() to construct.
5000    private ResourceRequestProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
5001      super(builder);
5002      this.unknownFields = builder.getUnknownFields();
5003    }
5004    private ResourceRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
5005
5006    private static final ResourceRequestProto defaultInstance;
5007    public static ResourceRequestProto getDefaultInstance() {
5008      return defaultInstance;
5009    }
5010
5011    public ResourceRequestProto getDefaultInstanceForType() {
5012      return defaultInstance;
5013    }
5014
5015    private final com.google.protobuf.UnknownFieldSet unknownFields;
5016    @java.lang.Override
5017    public final com.google.protobuf.UnknownFieldSet
5018        getUnknownFields() {
5019      return this.unknownFields;
5020    }
5021    private ResourceRequestProto(
5022        com.google.protobuf.CodedInputStream input,
5023        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5024        throws com.google.protobuf.InvalidProtocolBufferException {
5025      initFields();
5026      int mutable_bitField0_ = 0;
5027      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
5028          com.google.protobuf.UnknownFieldSet.newBuilder();
5029      try {
5030        boolean done = false;
5031        while (!done) {
5032          int tag = input.readTag();
5033          switch (tag) {
5034            case 0:
5035              done = true;
5036              break;
5037            default: {
5038              if (!parseUnknownField(input, unknownFields,
5039                                     extensionRegistry, tag)) {
5040                done = true;
5041              }
5042              break;
5043            }
5044            case 16: {
5045              bitField0_ |= 0x00000001;
5046              memorySize_ = input.readInt32();
5047              break;
5048            }
5049            case 24: {
5050              bitField0_ |= 0x00000002;
5051              priority_ = input.readInt32();
5052              break;
5053            }
5054            case 32: {
5055              bitField0_ |= 0x00000004;
5056              virtualCores_ = input.readInt32();
5057              break;
5058            }
5059            case 40: {
5060              bitField0_ |= 0x00000008;
5061              resourceCount_ = input.readInt32();
5062              break;
5063            }
5064            case 50: {
5065              if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
5066                nodeName_ = new com.google.protobuf.LazyStringArrayList();
5067                mutable_bitField0_ |= 0x00000010;
5068              }
5069              nodeName_.add(input.readBytes());
5070              break;
5071            }
5072            case 58: {
5073              if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
5074                rackName_ = new com.google.protobuf.LazyStringArrayList();
5075                mutable_bitField0_ |= 0x00000020;
5076              }
5077              rackName_.add(input.readBytes());
5078              break;
5079            }
5080            case 80: {
5081              bitField0_ |= 0x00000010;
5082              relaxLocality_ = input.readBool();
5083              break;
5084            }
5085          }
5086        }
5087      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5088        throw e.setUnfinishedMessage(this);
5089      } catch (java.io.IOException e) {
5090        throw new com.google.protobuf.InvalidProtocolBufferException(
5091            e.getMessage()).setUnfinishedMessage(this);
5092      } finally {
5093        if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
5094          nodeName_ = new com.google.protobuf.UnmodifiableLazyStringList(nodeName_);
5095        }
5096        if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
5097          rackName_ = new com.google.protobuf.UnmodifiableLazyStringList(rackName_);
5098        }
5099        this.unknownFields = unknownFields.build();
5100        makeExtensionsImmutable();
5101      }
5102    }
5103    public static final com.google.protobuf.Descriptors.Descriptor
5104        getDescriptor() {
5105      return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceRequestProto_descriptor;
5106    }
5107
5108    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
5109        internalGetFieldAccessorTable() {
5110      return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceRequestProto_fieldAccessorTable
5111          .ensureFieldAccessorsInitialized(
5112              org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto.class, org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto.Builder.class);
5113    }
5114
5115    public static com.google.protobuf.Parser<ResourceRequestProto> PARSER =
5116        new com.google.protobuf.AbstractParser<ResourceRequestProto>() {
5117      public ResourceRequestProto parsePartialFrom(
5118          com.google.protobuf.CodedInputStream input,
5119          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5120          throws com.google.protobuf.InvalidProtocolBufferException {
5121        return new ResourceRequestProto(input, extensionRegistry);
5122      }
5123    };
5124
5125    @java.lang.Override
5126    public com.google.protobuf.Parser<ResourceRequestProto> getParserForType() {
5127      return PARSER;
5128    }
5129
5130    private int bitField0_;
5131    // optional int32 memory_size = 2;
5132    public static final int MEMORY_SIZE_FIELD_NUMBER = 2;
5133    private int memorySize_;
5134    /**
5135     * <code>optional int32 memory_size = 2;</code>
5136     *
5137     * <pre>
5138     * optional SIZE resource_size  = 1; // Removed in REEF 0.3 in favor of memory_size.
5139     * </pre>
5140     */
5141    public boolean hasMemorySize() {
5142      return ((bitField0_ & 0x00000001) == 0x00000001);
5143    }
5144    /**
5145     * <code>optional int32 memory_size = 2;</code>
5146     *
5147     * <pre>
5148     * optional SIZE resource_size  = 1; // Removed in REEF 0.3 in favor of memory_size.
5149     * </pre>
5150     */
5151    public int getMemorySize() {
5152      return memorySize_;
5153    }
5154
5155    // optional int32 priority = 3;
5156    public static final int PRIORITY_FIELD_NUMBER = 3;
5157    private int priority_;
5158    /**
5159     * <code>optional int32 priority = 3;</code>
5160     */
5161    public boolean hasPriority() {
5162      return ((bitField0_ & 0x00000002) == 0x00000002);
5163    }
5164    /**
5165     * <code>optional int32 priority = 3;</code>
5166     */
5167    public int getPriority() {
5168      return priority_;
5169    }
5170
5171    // optional int32 virtual_cores = 4;
5172    public static final int VIRTUAL_CORES_FIELD_NUMBER = 4;
5173    private int virtualCores_;
5174    /**
5175     * <code>optional int32 virtual_cores = 4;</code>
5176     */
5177    public boolean hasVirtualCores() {
5178      return ((bitField0_ & 0x00000004) == 0x00000004);
5179    }
5180    /**
5181     * <code>optional int32 virtual_cores = 4;</code>
5182     */
5183    public int getVirtualCores() {
5184      return virtualCores_;
5185    }
5186
5187    // required int32 resource_count = 5;
5188    public static final int RESOURCE_COUNT_FIELD_NUMBER = 5;
5189    private int resourceCount_;
5190    /**
5191     * <code>required int32 resource_count = 5;</code>
5192     */
5193    public boolean hasResourceCount() {
5194      return ((bitField0_ & 0x00000008) == 0x00000008);
5195    }
5196    /**
5197     * <code>required int32 resource_count = 5;</code>
5198     */
5199    public int getResourceCount() {
5200      return resourceCount_;
5201    }
5202
5203    // repeated string node_name = 6;
5204    public static final int NODE_NAME_FIELD_NUMBER = 6;
5205    private com.google.protobuf.LazyStringList nodeName_;
5206    /**
5207     * <code>repeated string node_name = 6;</code>
5208     *
5209     * <pre>
5210     * a list of specific nodes
5211     * </pre>
5212     */
5213    public java.util.List<java.lang.String>
5214        getNodeNameList() {
5215      return nodeName_;
5216    }
5217    /**
5218     * <code>repeated string node_name = 6;</code>
5219     *
5220     * <pre>
5221     * a list of specific nodes
5222     * </pre>
5223     */
5224    public int getNodeNameCount() {
5225      return nodeName_.size();
5226    }
5227    /**
5228     * <code>repeated string node_name = 6;</code>
5229     *
5230     * <pre>
5231     * a list of specific nodes
5232     * </pre>
5233     */
5234    public java.lang.String getNodeName(int index) {
5235      return nodeName_.get(index);
5236    }
5237    /**
5238     * <code>repeated string node_name = 6;</code>
5239     *
5240     * <pre>
5241     * a list of specific nodes
5242     * </pre>
5243     */
5244    public com.google.protobuf.ByteString
5245        getNodeNameBytes(int index) {
5246      return nodeName_.getByteString(index);
5247    }
5248
5249    // repeated string rack_name = 7;
5250    public static final int RACK_NAME_FIELD_NUMBER = 7;
5251    private com.google.protobuf.LazyStringList rackName_;
5252    /**
5253     * <code>repeated string rack_name = 7;</code>
5254     *
5255     * <pre>
5256     * a list of specific racks
5257     * </pre>
5258     */
5259    public java.util.List<java.lang.String>
5260        getRackNameList() {
5261      return rackName_;
5262    }
5263    /**
5264     * <code>repeated string rack_name = 7;</code>
5265     *
5266     * <pre>
5267     * a list of specific racks
5268     * </pre>
5269     */
5270    public int getRackNameCount() {
5271      return rackName_.size();
5272    }
5273    /**
5274     * <code>repeated string rack_name = 7;</code>
5275     *
5276     * <pre>
5277     * a list of specific racks
5278     * </pre>
5279     */
5280    public java.lang.String getRackName(int index) {
5281      return rackName_.get(index);
5282    }
5283    /**
5284     * <code>repeated string rack_name = 7;</code>
5285     *
5286     * <pre>
5287     * a list of specific racks
5288     * </pre>
5289     */
5290    public com.google.protobuf.ByteString
5291        getRackNameBytes(int index) {
5292      return rackName_.getByteString(index);
5293    }
5294
5295    // optional bool relax_locality = 10;
5296    public static final int RELAX_LOCALITY_FIELD_NUMBER = 10;
5297    private boolean relaxLocality_;
5298    /**
5299     * <code>optional bool relax_locality = 10;</code>
5300     */
5301    public boolean hasRelaxLocality() {
5302      return ((bitField0_ & 0x00000010) == 0x00000010);
5303    }
5304    /**
5305     * <code>optional bool relax_locality = 10;</code>
5306     */
5307    public boolean getRelaxLocality() {
5308      return relaxLocality_;
5309    }
5310
5311    private void initFields() {
5312      memorySize_ = 0;
5313      priority_ = 0;
5314      virtualCores_ = 0;
5315      resourceCount_ = 0;
5316      nodeName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
5317      rackName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
5318      relaxLocality_ = false;
5319    }
5320    private byte memoizedIsInitialized = -1;
5321    public final boolean isInitialized() {
5322      byte isInitialized = memoizedIsInitialized;
5323      if (isInitialized != -1) return isInitialized == 1;
5324
5325      if (!hasResourceCount()) {
5326        memoizedIsInitialized = 0;
5327        return false;
5328      }
5329      memoizedIsInitialized = 1;
5330      return true;
5331    }
5332
5333    public void writeTo(com.google.protobuf.CodedOutputStream output)
5334                        throws java.io.IOException {
5335      getSerializedSize();
5336      if (((bitField0_ & 0x00000001) == 0x00000001)) {
5337        output.writeInt32(2, memorySize_);
5338      }
5339      if (((bitField0_ & 0x00000002) == 0x00000002)) {
5340        output.writeInt32(3, priority_);
5341      }
5342      if (((bitField0_ & 0x00000004) == 0x00000004)) {
5343        output.writeInt32(4, virtualCores_);
5344      }
5345      if (((bitField0_ & 0x00000008) == 0x00000008)) {
5346        output.writeInt32(5, resourceCount_);
5347      }
5348      for (int i = 0; i < nodeName_.size(); i++) {
5349        output.writeBytes(6, nodeName_.getByteString(i));
5350      }
5351      for (int i = 0; i < rackName_.size(); i++) {
5352        output.writeBytes(7, rackName_.getByteString(i));
5353      }
5354      if (((bitField0_ & 0x00000010) == 0x00000010)) {
5355        output.writeBool(10, relaxLocality_);
5356      }
5357      getUnknownFields().writeTo(output);
5358    }
5359
5360    private int memoizedSerializedSize = -1;
5361    public int getSerializedSize() {
5362      int size = memoizedSerializedSize;
5363      if (size != -1) return size;
5364
5365      size = 0;
5366      if (((bitField0_ & 0x00000001) == 0x00000001)) {
5367        size += com.google.protobuf.CodedOutputStream
5368          .computeInt32Size(2, memorySize_);
5369      }
5370      if (((bitField0_ & 0x00000002) == 0x00000002)) {
5371        size += com.google.protobuf.CodedOutputStream
5372          .computeInt32Size(3, priority_);
5373      }
5374      if (((bitField0_ & 0x00000004) == 0x00000004)) {
5375        size += com.google.protobuf.CodedOutputStream
5376          .computeInt32Size(4, virtualCores_);
5377      }
5378      if (((bitField0_ & 0x00000008) == 0x00000008)) {
5379        size += com.google.protobuf.CodedOutputStream
5380          .computeInt32Size(5, resourceCount_);
5381      }
5382      {
5383        int dataSize = 0;
5384        for (int i = 0; i < nodeName_.size(); i++) {
5385          dataSize += com.google.protobuf.CodedOutputStream
5386            .computeBytesSizeNoTag(nodeName_.getByteString(i));
5387        }
5388        size += dataSize;
5389        size += 1 * getNodeNameList().size();
5390      }
5391      {
5392        int dataSize = 0;
5393        for (int i = 0; i < rackName_.size(); i++) {
5394          dataSize += com.google.protobuf.CodedOutputStream
5395            .computeBytesSizeNoTag(rackName_.getByteString(i));
5396        }
5397        size += dataSize;
5398        size += 1 * getRackNameList().size();
5399      }
5400      if (((bitField0_ & 0x00000010) == 0x00000010)) {
5401        size += com.google.protobuf.CodedOutputStream
5402          .computeBoolSize(10, relaxLocality_);
5403      }
5404      size += getUnknownFields().getSerializedSize();
5405      memoizedSerializedSize = size;
5406      return size;
5407    }
5408
5409    private static final long serialVersionUID = 0L;
5410    @java.lang.Override
5411    protected java.lang.Object writeReplace()
5412        throws java.io.ObjectStreamException {
5413      return super.writeReplace();
5414    }
5415
5416    @java.lang.Override
5417    public boolean equals(final java.lang.Object obj) {
5418      if (obj == this) {
5419       return true;
5420      }
5421      if (!(obj instanceof org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto)) {
5422        return super.equals(obj);
5423      }
5424      org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto other = (org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto) obj;
5425
5426      boolean result = true;
5427      result = result && (hasMemorySize() == other.hasMemorySize());
5428      if (hasMemorySize()) {
5429        result = result && (getMemorySize()
5430            == other.getMemorySize());
5431      }
5432      result = result && (hasPriority() == other.hasPriority());
5433      if (hasPriority()) {
5434        result = result && (getPriority()
5435            == other.getPriority());
5436      }
5437      result = result && (hasVirtualCores() == other.hasVirtualCores());
5438      if (hasVirtualCores()) {
5439        result = result && (getVirtualCores()
5440            == other.getVirtualCores());
5441      }
5442      result = result && (hasResourceCount() == other.hasResourceCount());
5443      if (hasResourceCount()) {
5444        result = result && (getResourceCount()
5445            == other.getResourceCount());
5446      }
5447      result = result && getNodeNameList()
5448          .equals(other.getNodeNameList());
5449      result = result && getRackNameList()
5450          .equals(other.getRackNameList());
5451      result = result && (hasRelaxLocality() == other.hasRelaxLocality());
5452      if (hasRelaxLocality()) {
5453        result = result && (getRelaxLocality()
5454            == other.getRelaxLocality());
5455      }
5456      result = result &&
5457          getUnknownFields().equals(other.getUnknownFields());
5458      return result;
5459    }
5460
5461    private int memoizedHashCode = 0;
5462    @java.lang.Override
5463    public int hashCode() {
5464      if (memoizedHashCode != 0) {
5465        return memoizedHashCode;
5466      }
5467      int hash = 41;
5468      hash = (19 * hash) + getDescriptorForType().hashCode();
5469      if (hasMemorySize()) {
5470        hash = (37 * hash) + MEMORY_SIZE_FIELD_NUMBER;
5471        hash = (53 * hash) + getMemorySize();
5472      }
5473      if (hasPriority()) {
5474        hash = (37 * hash) + PRIORITY_FIELD_NUMBER;
5475        hash = (53 * hash) + getPriority();
5476      }
5477      if (hasVirtualCores()) {
5478        hash = (37 * hash) + VIRTUAL_CORES_FIELD_NUMBER;
5479        hash = (53 * hash) + getVirtualCores();
5480      }
5481      if (hasResourceCount()) {
5482        hash = (37 * hash) + RESOURCE_COUNT_FIELD_NUMBER;
5483        hash = (53 * hash) + getResourceCount();
5484      }
5485      if (getNodeNameCount() > 0) {
5486        hash = (37 * hash) + NODE_NAME_FIELD_NUMBER;
5487        hash = (53 * hash) + getNodeNameList().hashCode();
5488      }
5489      if (getRackNameCount() > 0) {
5490        hash = (37 * hash) + RACK_NAME_FIELD_NUMBER;
5491        hash = (53 * hash) + getRackNameList().hashCode();
5492      }
5493      if (hasRelaxLocality()) {
5494        hash = (37 * hash) + RELAX_LOCALITY_FIELD_NUMBER;
5495        hash = (53 * hash) + hashBoolean(getRelaxLocality());
5496      }
5497      hash = (29 * hash) + getUnknownFields().hashCode();
5498      memoizedHashCode = hash;
5499      return hash;
5500    }
5501
5502    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto parseFrom(
5503        com.google.protobuf.ByteString data)
5504        throws com.google.protobuf.InvalidProtocolBufferException {
5505      return PARSER.parseFrom(data);
5506    }
5507    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto parseFrom(
5508        com.google.protobuf.ByteString data,
5509        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5510        throws com.google.protobuf.InvalidProtocolBufferException {
5511      return PARSER.parseFrom(data, extensionRegistry);
5512    }
5513    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto parseFrom(byte[] data)
5514        throws com.google.protobuf.InvalidProtocolBufferException {
5515      return PARSER.parseFrom(data);
5516    }
5517    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto parseFrom(
5518        byte[] data,
5519        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5520        throws com.google.protobuf.InvalidProtocolBufferException {
5521      return PARSER.parseFrom(data, extensionRegistry);
5522    }
5523    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto parseFrom(java.io.InputStream input)
5524        throws java.io.IOException {
5525      return PARSER.parseFrom(input);
5526    }
5527    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto parseFrom(
5528        java.io.InputStream input,
5529        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5530        throws java.io.IOException {
5531      return PARSER.parseFrom(input, extensionRegistry);
5532    }
5533    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto parseDelimitedFrom(java.io.InputStream input)
5534        throws java.io.IOException {
5535      return PARSER.parseDelimitedFrom(input);
5536    }
5537    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto parseDelimitedFrom(
5538        java.io.InputStream input,
5539        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5540        throws java.io.IOException {
5541      return PARSER.parseDelimitedFrom(input, extensionRegistry);
5542    }
5543    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto parseFrom(
5544        com.google.protobuf.CodedInputStream input)
5545        throws java.io.IOException {
5546      return PARSER.parseFrom(input);
5547    }
5548    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto parseFrom(
5549        com.google.protobuf.CodedInputStream input,
5550        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5551        throws java.io.IOException {
5552      return PARSER.parseFrom(input, extensionRegistry);
5553    }
5554
5555    public static Builder newBuilder() { return Builder.create(); }
5556    public Builder newBuilderForType() { return newBuilder(); }
5557    public static Builder newBuilder(org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto prototype) {
5558      return newBuilder().mergeFrom(prototype);
5559    }
5560    public Builder toBuilder() { return newBuilder(this); }
5561
5562    @java.lang.Override
5563    protected Builder newBuilderForType(
5564        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
5565      Builder builder = new Builder(parent);
5566      return builder;
5567    }
5568    /**
5569     * Protobuf type {@code ResourceRequestProto}
5570     */
5571    public static final class Builder extends
5572        com.google.protobuf.GeneratedMessage.Builder<Builder>
5573       implements org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProtoOrBuilder {
5574      public static final com.google.protobuf.Descriptors.Descriptor
5575          getDescriptor() {
5576        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceRequestProto_descriptor;
5577      }
5578
5579      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
5580          internalGetFieldAccessorTable() {
5581        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceRequestProto_fieldAccessorTable
5582            .ensureFieldAccessorsInitialized(
5583                org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto.class, org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto.Builder.class);
5584      }
5585
5586      // Construct using org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto.newBuilder()
5587      private Builder() {
5588        maybeForceBuilderInitialization();
5589      }
5590
5591      private Builder(
5592          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
5593        super(parent);
5594        maybeForceBuilderInitialization();
5595      }
5596      private void maybeForceBuilderInitialization() {
5597        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
5598        }
5599      }
5600      private static Builder create() {
5601        return new Builder();
5602      }
5603
5604      public Builder clear() {
5605        super.clear();
5606        memorySize_ = 0;
5607        bitField0_ = (bitField0_ & ~0x00000001);
5608        priority_ = 0;
5609        bitField0_ = (bitField0_ & ~0x00000002);
5610        virtualCores_ = 0;
5611        bitField0_ = (bitField0_ & ~0x00000004);
5612        resourceCount_ = 0;
5613        bitField0_ = (bitField0_ & ~0x00000008);
5614        nodeName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
5615        bitField0_ = (bitField0_ & ~0x00000010);
5616        rackName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
5617        bitField0_ = (bitField0_ & ~0x00000020);
5618        relaxLocality_ = false;
5619        bitField0_ = (bitField0_ & ~0x00000040);
5620        return this;
5621      }
5622
5623      public Builder clone() {
5624        return create().mergeFrom(buildPartial());
5625      }
5626
5627      public com.google.protobuf.Descriptors.Descriptor
5628          getDescriptorForType() {
5629        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceRequestProto_descriptor;
5630      }
5631
5632      public org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto getDefaultInstanceForType() {
5633        return org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto.getDefaultInstance();
5634      }
5635
5636      public org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto build() {
5637        org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto result = buildPartial();
5638        if (!result.isInitialized()) {
5639          throw newUninitializedMessageException(result);
5640        }
5641        return result;
5642      }
5643
5644      public org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto buildPartial() {
5645        org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto result = new org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto(this);
5646        int from_bitField0_ = bitField0_;
5647        int to_bitField0_ = 0;
5648        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
5649          to_bitField0_ |= 0x00000001;
5650        }
5651        result.memorySize_ = memorySize_;
5652        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
5653          to_bitField0_ |= 0x00000002;
5654        }
5655        result.priority_ = priority_;
5656        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
5657          to_bitField0_ |= 0x00000004;
5658        }
5659        result.virtualCores_ = virtualCores_;
5660        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
5661          to_bitField0_ |= 0x00000008;
5662        }
5663        result.resourceCount_ = resourceCount_;
5664        if (((bitField0_ & 0x00000010) == 0x00000010)) {
5665          nodeName_ = new com.google.protobuf.UnmodifiableLazyStringList(
5666              nodeName_);
5667          bitField0_ = (bitField0_ & ~0x00000010);
5668        }
5669        result.nodeName_ = nodeName_;
5670        if (((bitField0_ & 0x00000020) == 0x00000020)) {
5671          rackName_ = new com.google.protobuf.UnmodifiableLazyStringList(
5672              rackName_);
5673          bitField0_ = (bitField0_ & ~0x00000020);
5674        }
5675        result.rackName_ = rackName_;
5676        if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
5677          to_bitField0_ |= 0x00000010;
5678        }
5679        result.relaxLocality_ = relaxLocality_;
5680        result.bitField0_ = to_bitField0_;
5681        onBuilt();
5682        return result;
5683      }
5684
5685      public Builder mergeFrom(com.google.protobuf.Message other) {
5686        if (other instanceof org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto) {
5687          return mergeFrom((org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto)other);
5688        } else {
5689          super.mergeFrom(other);
5690          return this;
5691        }
5692      }
5693
5694      public Builder mergeFrom(org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto other) {
5695        if (other == org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto.getDefaultInstance()) return this;
5696        if (other.hasMemorySize()) {
5697          setMemorySize(other.getMemorySize());
5698        }
5699        if (other.hasPriority()) {
5700          setPriority(other.getPriority());
5701        }
5702        if (other.hasVirtualCores()) {
5703          setVirtualCores(other.getVirtualCores());
5704        }
5705        if (other.hasResourceCount()) {
5706          setResourceCount(other.getResourceCount());
5707        }
5708        if (!other.nodeName_.isEmpty()) {
5709          if (nodeName_.isEmpty()) {
5710            nodeName_ = other.nodeName_;
5711            bitField0_ = (bitField0_ & ~0x00000010);
5712          } else {
5713            ensureNodeNameIsMutable();
5714            nodeName_.addAll(other.nodeName_);
5715          }
5716          onChanged();
5717        }
5718        if (!other.rackName_.isEmpty()) {
5719          if (rackName_.isEmpty()) {
5720            rackName_ = other.rackName_;
5721            bitField0_ = (bitField0_ & ~0x00000020);
5722          } else {
5723            ensureRackNameIsMutable();
5724            rackName_.addAll(other.rackName_);
5725          }
5726          onChanged();
5727        }
5728        if (other.hasRelaxLocality()) {
5729          setRelaxLocality(other.getRelaxLocality());
5730        }
5731        this.mergeUnknownFields(other.getUnknownFields());
5732        return this;
5733      }
5734
5735      public final boolean isInitialized() {
5736        if (!hasResourceCount()) {
5737          
5738          return false;
5739        }
5740        return true;
5741      }
5742
5743      public Builder mergeFrom(
5744          com.google.protobuf.CodedInputStream input,
5745          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5746          throws java.io.IOException {
5747        org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto parsedMessage = null;
5748        try {
5749          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
5750        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5751          parsedMessage = (org.apache.reef.proto.DriverRuntimeProtocol.ResourceRequestProto) e.getUnfinishedMessage();
5752          throw e;
5753        } finally {
5754          if (parsedMessage != null) {
5755            mergeFrom(parsedMessage);
5756          }
5757        }
5758        return this;
5759      }
5760      private int bitField0_;
5761
5762      // optional int32 memory_size = 2;
5763      private int memorySize_ ;
5764      /**
5765       * <code>optional int32 memory_size = 2;</code>
5766       *
5767       * <pre>
5768       * optional SIZE resource_size  = 1; // Removed in REEF 0.3 in favor of memory_size.
5769       * </pre>
5770       */
5771      public boolean hasMemorySize() {
5772        return ((bitField0_ & 0x00000001) == 0x00000001);
5773      }
5774      /**
5775       * <code>optional int32 memory_size = 2;</code>
5776       *
5777       * <pre>
5778       * optional SIZE resource_size  = 1; // Removed in REEF 0.3 in favor of memory_size.
5779       * </pre>
5780       */
5781      public int getMemorySize() {
5782        return memorySize_;
5783      }
5784      /**
5785       * <code>optional int32 memory_size = 2;</code>
5786       *
5787       * <pre>
5788       * optional SIZE resource_size  = 1; // Removed in REEF 0.3 in favor of memory_size.
5789       * </pre>
5790       */
5791      public Builder setMemorySize(int value) {
5792        bitField0_ |= 0x00000001;
5793        memorySize_ = value;
5794        onChanged();
5795        return this;
5796      }
5797      /**
5798       * <code>optional int32 memory_size = 2;</code>
5799       *
5800       * <pre>
5801       * optional SIZE resource_size  = 1; // Removed in REEF 0.3 in favor of memory_size.
5802       * </pre>
5803       */
5804      public Builder clearMemorySize() {
5805        bitField0_ = (bitField0_ & ~0x00000001);
5806        memorySize_ = 0;
5807        onChanged();
5808        return this;
5809      }
5810
5811      // optional int32 priority = 3;
5812      private int priority_ ;
5813      /**
5814       * <code>optional int32 priority = 3;</code>
5815       */
5816      public boolean hasPriority() {
5817        return ((bitField0_ & 0x00000002) == 0x00000002);
5818      }
5819      /**
5820       * <code>optional int32 priority = 3;</code>
5821       */
5822      public int getPriority() {
5823        return priority_;
5824      }
5825      /**
5826       * <code>optional int32 priority = 3;</code>
5827       */
5828      public Builder setPriority(int value) {
5829        bitField0_ |= 0x00000002;
5830        priority_ = value;
5831        onChanged();
5832        return this;
5833      }
5834      /**
5835       * <code>optional int32 priority = 3;</code>
5836       */
5837      public Builder clearPriority() {
5838        bitField0_ = (bitField0_ & ~0x00000002);
5839        priority_ = 0;
5840        onChanged();
5841        return this;
5842      }
5843
5844      // optional int32 virtual_cores = 4;
5845      private int virtualCores_ ;
5846      /**
5847       * <code>optional int32 virtual_cores = 4;</code>
5848       */
5849      public boolean hasVirtualCores() {
5850        return ((bitField0_ & 0x00000004) == 0x00000004);
5851      }
5852      /**
5853       * <code>optional int32 virtual_cores = 4;</code>
5854       */
5855      public int getVirtualCores() {
5856        return virtualCores_;
5857      }
5858      /**
5859       * <code>optional int32 virtual_cores = 4;</code>
5860       */
5861      public Builder setVirtualCores(int value) {
5862        bitField0_ |= 0x00000004;
5863        virtualCores_ = value;
5864        onChanged();
5865        return this;
5866      }
5867      /**
5868       * <code>optional int32 virtual_cores = 4;</code>
5869       */
5870      public Builder clearVirtualCores() {
5871        bitField0_ = (bitField0_ & ~0x00000004);
5872        virtualCores_ = 0;
5873        onChanged();
5874        return this;
5875      }
5876
5877      // required int32 resource_count = 5;
5878      private int resourceCount_ ;
5879      /**
5880       * <code>required int32 resource_count = 5;</code>
5881       */
5882      public boolean hasResourceCount() {
5883        return ((bitField0_ & 0x00000008) == 0x00000008);
5884      }
5885      /**
5886       * <code>required int32 resource_count = 5;</code>
5887       */
5888      public int getResourceCount() {
5889        return resourceCount_;
5890      }
5891      /**
5892       * <code>required int32 resource_count = 5;</code>
5893       */
5894      public Builder setResourceCount(int value) {
5895        bitField0_ |= 0x00000008;
5896        resourceCount_ = value;
5897        onChanged();
5898        return this;
5899      }
5900      /**
5901       * <code>required int32 resource_count = 5;</code>
5902       */
5903      public Builder clearResourceCount() {
5904        bitField0_ = (bitField0_ & ~0x00000008);
5905        resourceCount_ = 0;
5906        onChanged();
5907        return this;
5908      }
5909
5910      // repeated string node_name = 6;
5911      private com.google.protobuf.LazyStringList nodeName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
5912      private void ensureNodeNameIsMutable() {
5913        if (!((bitField0_ & 0x00000010) == 0x00000010)) {
5914          nodeName_ = new com.google.protobuf.LazyStringArrayList(nodeName_);
5915          bitField0_ |= 0x00000010;
5916         }
5917      }
5918      /**
5919       * <code>repeated string node_name = 6;</code>
5920       *
5921       * <pre>
5922       * a list of specific nodes
5923       * </pre>
5924       */
5925      public java.util.List<java.lang.String>
5926          getNodeNameList() {
5927        return java.util.Collections.unmodifiableList(nodeName_);
5928      }
5929      /**
5930       * <code>repeated string node_name = 6;</code>
5931       *
5932       * <pre>
5933       * a list of specific nodes
5934       * </pre>
5935       */
5936      public int getNodeNameCount() {
5937        return nodeName_.size();
5938      }
5939      /**
5940       * <code>repeated string node_name = 6;</code>
5941       *
5942       * <pre>
5943       * a list of specific nodes
5944       * </pre>
5945       */
5946      public java.lang.String getNodeName(int index) {
5947        return nodeName_.get(index);
5948      }
5949      /**
5950       * <code>repeated string node_name = 6;</code>
5951       *
5952       * <pre>
5953       * a list of specific nodes
5954       * </pre>
5955       */
5956      public com.google.protobuf.ByteString
5957          getNodeNameBytes(int index) {
5958        return nodeName_.getByteString(index);
5959      }
5960      /**
5961       * <code>repeated string node_name = 6;</code>
5962       *
5963       * <pre>
5964       * a list of specific nodes
5965       * </pre>
5966       */
5967      public Builder setNodeName(
5968          int index, java.lang.String value) {
5969        if (value == null) {
5970    throw new NullPointerException();
5971  }
5972  ensureNodeNameIsMutable();
5973        nodeName_.set(index, value);
5974        onChanged();
5975        return this;
5976      }
5977      /**
5978       * <code>repeated string node_name = 6;</code>
5979       *
5980       * <pre>
5981       * a list of specific nodes
5982       * </pre>
5983       */
5984      public Builder addNodeName(
5985          java.lang.String value) {
5986        if (value == null) {
5987    throw new NullPointerException();
5988  }
5989  ensureNodeNameIsMutable();
5990        nodeName_.add(value);
5991        onChanged();
5992        return this;
5993      }
5994      /**
5995       * <code>repeated string node_name = 6;</code>
5996       *
5997       * <pre>
5998       * a list of specific nodes
5999       * </pre>
6000       */
6001      public Builder addAllNodeName(
6002          java.lang.Iterable<java.lang.String> values) {
6003        ensureNodeNameIsMutable();
6004        super.addAll(values, nodeName_);
6005        onChanged();
6006        return this;
6007      }
6008      /**
6009       * <code>repeated string node_name = 6;</code>
6010       *
6011       * <pre>
6012       * a list of specific nodes
6013       * </pre>
6014       */
6015      public Builder clearNodeName() {
6016        nodeName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
6017        bitField0_ = (bitField0_ & ~0x00000010);
6018        onChanged();
6019        return this;
6020      }
6021      /**
6022       * <code>repeated string node_name = 6;</code>
6023       *
6024       * <pre>
6025       * a list of specific nodes
6026       * </pre>
6027       */
6028      public Builder addNodeNameBytes(
6029          com.google.protobuf.ByteString value) {
6030        if (value == null) {
6031    throw new NullPointerException();
6032  }
6033  ensureNodeNameIsMutable();
6034        nodeName_.add(value);
6035        onChanged();
6036        return this;
6037      }
6038
6039      // repeated string rack_name = 7;
6040      private com.google.protobuf.LazyStringList rackName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
6041      private void ensureRackNameIsMutable() {
6042        if (!((bitField0_ & 0x00000020) == 0x00000020)) {
6043          rackName_ = new com.google.protobuf.LazyStringArrayList(rackName_);
6044          bitField0_ |= 0x00000020;
6045         }
6046      }
6047      /**
6048       * <code>repeated string rack_name = 7;</code>
6049       *
6050       * <pre>
6051       * a list of specific racks
6052       * </pre>
6053       */
6054      public java.util.List<java.lang.String>
6055          getRackNameList() {
6056        return java.util.Collections.unmodifiableList(rackName_);
6057      }
6058      /**
6059       * <code>repeated string rack_name = 7;</code>
6060       *
6061       * <pre>
6062       * a list of specific racks
6063       * </pre>
6064       */
6065      public int getRackNameCount() {
6066        return rackName_.size();
6067      }
6068      /**
6069       * <code>repeated string rack_name = 7;</code>
6070       *
6071       * <pre>
6072       * a list of specific racks
6073       * </pre>
6074       */
6075      public java.lang.String getRackName(int index) {
6076        return rackName_.get(index);
6077      }
6078      /**
6079       * <code>repeated string rack_name = 7;</code>
6080       *
6081       * <pre>
6082       * a list of specific racks
6083       * </pre>
6084       */
6085      public com.google.protobuf.ByteString
6086          getRackNameBytes(int index) {
6087        return rackName_.getByteString(index);
6088      }
6089      /**
6090       * <code>repeated string rack_name = 7;</code>
6091       *
6092       * <pre>
6093       * a list of specific racks
6094       * </pre>
6095       */
6096      public Builder setRackName(
6097          int index, java.lang.String value) {
6098        if (value == null) {
6099    throw new NullPointerException();
6100  }
6101  ensureRackNameIsMutable();
6102        rackName_.set(index, value);
6103        onChanged();
6104        return this;
6105      }
6106      /**
6107       * <code>repeated string rack_name = 7;</code>
6108       *
6109       * <pre>
6110       * a list of specific racks
6111       * </pre>
6112       */
6113      public Builder addRackName(
6114          java.lang.String value) {
6115        if (value == null) {
6116    throw new NullPointerException();
6117  }
6118  ensureRackNameIsMutable();
6119        rackName_.add(value);
6120        onChanged();
6121        return this;
6122      }
6123      /**
6124       * <code>repeated string rack_name = 7;</code>
6125       *
6126       * <pre>
6127       * a list of specific racks
6128       * </pre>
6129       */
6130      public Builder addAllRackName(
6131          java.lang.Iterable<java.lang.String> values) {
6132        ensureRackNameIsMutable();
6133        super.addAll(values, rackName_);
6134        onChanged();
6135        return this;
6136      }
6137      /**
6138       * <code>repeated string rack_name = 7;</code>
6139       *
6140       * <pre>
6141       * a list of specific racks
6142       * </pre>
6143       */
6144      public Builder clearRackName() {
6145        rackName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
6146        bitField0_ = (bitField0_ & ~0x00000020);
6147        onChanged();
6148        return this;
6149      }
6150      /**
6151       * <code>repeated string rack_name = 7;</code>
6152       *
6153       * <pre>
6154       * a list of specific racks
6155       * </pre>
6156       */
6157      public Builder addRackNameBytes(
6158          com.google.protobuf.ByteString value) {
6159        if (value == null) {
6160    throw new NullPointerException();
6161  }
6162  ensureRackNameIsMutable();
6163        rackName_.add(value);
6164        onChanged();
6165        return this;
6166      }
6167
6168      // optional bool relax_locality = 10;
6169      private boolean relaxLocality_ ;
6170      /**
6171       * <code>optional bool relax_locality = 10;</code>
6172       */
6173      public boolean hasRelaxLocality() {
6174        return ((bitField0_ & 0x00000040) == 0x00000040);
6175      }
6176      /**
6177       * <code>optional bool relax_locality = 10;</code>
6178       */
6179      public boolean getRelaxLocality() {
6180        return relaxLocality_;
6181      }
6182      /**
6183       * <code>optional bool relax_locality = 10;</code>
6184       */
6185      public Builder setRelaxLocality(boolean value) {
6186        bitField0_ |= 0x00000040;
6187        relaxLocality_ = value;
6188        onChanged();
6189        return this;
6190      }
6191      /**
6192       * <code>optional bool relax_locality = 10;</code>
6193       */
6194      public Builder clearRelaxLocality() {
6195        bitField0_ = (bitField0_ & ~0x00000040);
6196        relaxLocality_ = false;
6197        onChanged();
6198        return this;
6199      }
6200
6201      // @@protoc_insertion_point(builder_scope:ResourceRequestProto)
6202    }
6203
6204    static {
6205      defaultInstance = new ResourceRequestProto(true);
6206      defaultInstance.initFields();
6207    }
6208
6209    // @@protoc_insertion_point(class_scope:ResourceRequestProto)
6210  }
6211
6212  public interface ResourceReleaseProtoOrBuilder
6213      extends com.google.protobuf.MessageOrBuilder {
6214
6215    // required string identifier = 1;
6216    /**
6217     * <code>required string identifier = 1;</code>
6218     */
6219    boolean hasIdentifier();
6220    /**
6221     * <code>required string identifier = 1;</code>
6222     */
6223    java.lang.String getIdentifier();
6224    /**
6225     * <code>required string identifier = 1;</code>
6226     */
6227    com.google.protobuf.ByteString
6228        getIdentifierBytes();
6229  }
6230  /**
6231   * Protobuf type {@code ResourceReleaseProto}
6232   */
6233  public static final class ResourceReleaseProto extends
6234      com.google.protobuf.GeneratedMessage
6235      implements ResourceReleaseProtoOrBuilder {
6236    // Use ResourceReleaseProto.newBuilder() to construct.
6237    private ResourceReleaseProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
6238      super(builder);
6239      this.unknownFields = builder.getUnknownFields();
6240    }
6241    private ResourceReleaseProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
6242
6243    private static final ResourceReleaseProto defaultInstance;
6244    public static ResourceReleaseProto getDefaultInstance() {
6245      return defaultInstance;
6246    }
6247
6248    public ResourceReleaseProto getDefaultInstanceForType() {
6249      return defaultInstance;
6250    }
6251
6252    private final com.google.protobuf.UnknownFieldSet unknownFields;
6253    @java.lang.Override
6254    public final com.google.protobuf.UnknownFieldSet
6255        getUnknownFields() {
6256      return this.unknownFields;
6257    }
6258    private ResourceReleaseProto(
6259        com.google.protobuf.CodedInputStream input,
6260        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6261        throws com.google.protobuf.InvalidProtocolBufferException {
6262      initFields();
6263      int mutable_bitField0_ = 0;
6264      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
6265          com.google.protobuf.UnknownFieldSet.newBuilder();
6266      try {
6267        boolean done = false;
6268        while (!done) {
6269          int tag = input.readTag();
6270          switch (tag) {
6271            case 0:
6272              done = true;
6273              break;
6274            default: {
6275              if (!parseUnknownField(input, unknownFields,
6276                                     extensionRegistry, tag)) {
6277                done = true;
6278              }
6279              break;
6280            }
6281            case 10: {
6282              bitField0_ |= 0x00000001;
6283              identifier_ = input.readBytes();
6284              break;
6285            }
6286          }
6287        }
6288      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6289        throw e.setUnfinishedMessage(this);
6290      } catch (java.io.IOException e) {
6291        throw new com.google.protobuf.InvalidProtocolBufferException(
6292            e.getMessage()).setUnfinishedMessage(this);
6293      } finally {
6294        this.unknownFields = unknownFields.build();
6295        makeExtensionsImmutable();
6296      }
6297    }
6298    public static final com.google.protobuf.Descriptors.Descriptor
6299        getDescriptor() {
6300      return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceReleaseProto_descriptor;
6301    }
6302
6303    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
6304        internalGetFieldAccessorTable() {
6305      return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceReleaseProto_fieldAccessorTable
6306          .ensureFieldAccessorsInitialized(
6307              org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto.class, org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto.Builder.class);
6308    }
6309
6310    public static com.google.protobuf.Parser<ResourceReleaseProto> PARSER =
6311        new com.google.protobuf.AbstractParser<ResourceReleaseProto>() {
6312      public ResourceReleaseProto parsePartialFrom(
6313          com.google.protobuf.CodedInputStream input,
6314          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6315          throws com.google.protobuf.InvalidProtocolBufferException {
6316        return new ResourceReleaseProto(input, extensionRegistry);
6317      }
6318    };
6319
6320    @java.lang.Override
6321    public com.google.protobuf.Parser<ResourceReleaseProto> getParserForType() {
6322      return PARSER;
6323    }
6324
6325    private int bitField0_;
6326    // required string identifier = 1;
6327    public static final int IDENTIFIER_FIELD_NUMBER = 1;
6328    private java.lang.Object identifier_;
6329    /**
6330     * <code>required string identifier = 1;</code>
6331     */
6332    public boolean hasIdentifier() {
6333      return ((bitField0_ & 0x00000001) == 0x00000001);
6334    }
6335    /**
6336     * <code>required string identifier = 1;</code>
6337     */
6338    public java.lang.String getIdentifier() {
6339      java.lang.Object ref = identifier_;
6340      if (ref instanceof java.lang.String) {
6341        return (java.lang.String) ref;
6342      } else {
6343        com.google.protobuf.ByteString bs = 
6344            (com.google.protobuf.ByteString) ref;
6345        java.lang.String s = bs.toStringUtf8();
6346        if (bs.isValidUtf8()) {
6347          identifier_ = s;
6348        }
6349        return s;
6350      }
6351    }
6352    /**
6353     * <code>required string identifier = 1;</code>
6354     */
6355    public com.google.protobuf.ByteString
6356        getIdentifierBytes() {
6357      java.lang.Object ref = identifier_;
6358      if (ref instanceof java.lang.String) {
6359        com.google.protobuf.ByteString b = 
6360            com.google.protobuf.ByteString.copyFromUtf8(
6361                (java.lang.String) ref);
6362        identifier_ = b;
6363        return b;
6364      } else {
6365        return (com.google.protobuf.ByteString) ref;
6366      }
6367    }
6368
6369    private void initFields() {
6370      identifier_ = "";
6371    }
6372    private byte memoizedIsInitialized = -1;
6373    public final boolean isInitialized() {
6374      byte isInitialized = memoizedIsInitialized;
6375      if (isInitialized != -1) return isInitialized == 1;
6376
6377      if (!hasIdentifier()) {
6378        memoizedIsInitialized = 0;
6379        return false;
6380      }
6381      memoizedIsInitialized = 1;
6382      return true;
6383    }
6384
6385    public void writeTo(com.google.protobuf.CodedOutputStream output)
6386                        throws java.io.IOException {
6387      getSerializedSize();
6388      if (((bitField0_ & 0x00000001) == 0x00000001)) {
6389        output.writeBytes(1, getIdentifierBytes());
6390      }
6391      getUnknownFields().writeTo(output);
6392    }
6393
6394    private int memoizedSerializedSize = -1;
6395    public int getSerializedSize() {
6396      int size = memoizedSerializedSize;
6397      if (size != -1) return size;
6398
6399      size = 0;
6400      if (((bitField0_ & 0x00000001) == 0x00000001)) {
6401        size += com.google.protobuf.CodedOutputStream
6402          .computeBytesSize(1, getIdentifierBytes());
6403      }
6404      size += getUnknownFields().getSerializedSize();
6405      memoizedSerializedSize = size;
6406      return size;
6407    }
6408
6409    private static final long serialVersionUID = 0L;
6410    @java.lang.Override
6411    protected java.lang.Object writeReplace()
6412        throws java.io.ObjectStreamException {
6413      return super.writeReplace();
6414    }
6415
6416    @java.lang.Override
6417    public boolean equals(final java.lang.Object obj) {
6418      if (obj == this) {
6419       return true;
6420      }
6421      if (!(obj instanceof org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto)) {
6422        return super.equals(obj);
6423      }
6424      org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto other = (org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto) obj;
6425
6426      boolean result = true;
6427      result = result && (hasIdentifier() == other.hasIdentifier());
6428      if (hasIdentifier()) {
6429        result = result && getIdentifier()
6430            .equals(other.getIdentifier());
6431      }
6432      result = result &&
6433          getUnknownFields().equals(other.getUnknownFields());
6434      return result;
6435    }
6436
6437    private int memoizedHashCode = 0;
6438    @java.lang.Override
6439    public int hashCode() {
6440      if (memoizedHashCode != 0) {
6441        return memoizedHashCode;
6442      }
6443      int hash = 41;
6444      hash = (19 * hash) + getDescriptorForType().hashCode();
6445      if (hasIdentifier()) {
6446        hash = (37 * hash) + IDENTIFIER_FIELD_NUMBER;
6447        hash = (53 * hash) + getIdentifier().hashCode();
6448      }
6449      hash = (29 * hash) + getUnknownFields().hashCode();
6450      memoizedHashCode = hash;
6451      return hash;
6452    }
6453
6454    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto parseFrom(
6455        com.google.protobuf.ByteString data)
6456        throws com.google.protobuf.InvalidProtocolBufferException {
6457      return PARSER.parseFrom(data);
6458    }
6459    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto parseFrom(
6460        com.google.protobuf.ByteString data,
6461        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6462        throws com.google.protobuf.InvalidProtocolBufferException {
6463      return PARSER.parseFrom(data, extensionRegistry);
6464    }
6465    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto parseFrom(byte[] data)
6466        throws com.google.protobuf.InvalidProtocolBufferException {
6467      return PARSER.parseFrom(data);
6468    }
6469    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto parseFrom(
6470        byte[] data,
6471        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6472        throws com.google.protobuf.InvalidProtocolBufferException {
6473      return PARSER.parseFrom(data, extensionRegistry);
6474    }
6475    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto parseFrom(java.io.InputStream input)
6476        throws java.io.IOException {
6477      return PARSER.parseFrom(input);
6478    }
6479    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto parseFrom(
6480        java.io.InputStream input,
6481        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6482        throws java.io.IOException {
6483      return PARSER.parseFrom(input, extensionRegistry);
6484    }
6485    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto parseDelimitedFrom(java.io.InputStream input)
6486        throws java.io.IOException {
6487      return PARSER.parseDelimitedFrom(input);
6488    }
6489    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto parseDelimitedFrom(
6490        java.io.InputStream input,
6491        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6492        throws java.io.IOException {
6493      return PARSER.parseDelimitedFrom(input, extensionRegistry);
6494    }
6495    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto parseFrom(
6496        com.google.protobuf.CodedInputStream input)
6497        throws java.io.IOException {
6498      return PARSER.parseFrom(input);
6499    }
6500    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto parseFrom(
6501        com.google.protobuf.CodedInputStream input,
6502        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6503        throws java.io.IOException {
6504      return PARSER.parseFrom(input, extensionRegistry);
6505    }
6506
6507    public static Builder newBuilder() { return Builder.create(); }
6508    public Builder newBuilderForType() { return newBuilder(); }
6509    public static Builder newBuilder(org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto prototype) {
6510      return newBuilder().mergeFrom(prototype);
6511    }
6512    public Builder toBuilder() { return newBuilder(this); }
6513
6514    @java.lang.Override
6515    protected Builder newBuilderForType(
6516        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
6517      Builder builder = new Builder(parent);
6518      return builder;
6519    }
6520    /**
6521     * Protobuf type {@code ResourceReleaseProto}
6522     */
6523    public static final class Builder extends
6524        com.google.protobuf.GeneratedMessage.Builder<Builder>
6525       implements org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProtoOrBuilder {
6526      public static final com.google.protobuf.Descriptors.Descriptor
6527          getDescriptor() {
6528        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceReleaseProto_descriptor;
6529      }
6530
6531      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
6532          internalGetFieldAccessorTable() {
6533        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceReleaseProto_fieldAccessorTable
6534            .ensureFieldAccessorsInitialized(
6535                org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto.class, org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto.Builder.class);
6536      }
6537
6538      // Construct using org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto.newBuilder()
6539      private Builder() {
6540        maybeForceBuilderInitialization();
6541      }
6542
6543      private Builder(
6544          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
6545        super(parent);
6546        maybeForceBuilderInitialization();
6547      }
6548      private void maybeForceBuilderInitialization() {
6549        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
6550        }
6551      }
6552      private static Builder create() {
6553        return new Builder();
6554      }
6555
6556      public Builder clear() {
6557        super.clear();
6558        identifier_ = "";
6559        bitField0_ = (bitField0_ & ~0x00000001);
6560        return this;
6561      }
6562
6563      public Builder clone() {
6564        return create().mergeFrom(buildPartial());
6565      }
6566
6567      public com.google.protobuf.Descriptors.Descriptor
6568          getDescriptorForType() {
6569        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceReleaseProto_descriptor;
6570      }
6571
6572      public org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto getDefaultInstanceForType() {
6573        return org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto.getDefaultInstance();
6574      }
6575
6576      public org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto build() {
6577        org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto result = buildPartial();
6578        if (!result.isInitialized()) {
6579          throw newUninitializedMessageException(result);
6580        }
6581        return result;
6582      }
6583
6584      public org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto buildPartial() {
6585        org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto result = new org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto(this);
6586        int from_bitField0_ = bitField0_;
6587        int to_bitField0_ = 0;
6588        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
6589          to_bitField0_ |= 0x00000001;
6590        }
6591        result.identifier_ = identifier_;
6592        result.bitField0_ = to_bitField0_;
6593        onBuilt();
6594        return result;
6595      }
6596
6597      public Builder mergeFrom(com.google.protobuf.Message other) {
6598        if (other instanceof org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto) {
6599          return mergeFrom((org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto)other);
6600        } else {
6601          super.mergeFrom(other);
6602          return this;
6603        }
6604      }
6605
6606      public Builder mergeFrom(org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto other) {
6607        if (other == org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto.getDefaultInstance()) return this;
6608        if (other.hasIdentifier()) {
6609          bitField0_ |= 0x00000001;
6610          identifier_ = other.identifier_;
6611          onChanged();
6612        }
6613        this.mergeUnknownFields(other.getUnknownFields());
6614        return this;
6615      }
6616
6617      public final boolean isInitialized() {
6618        if (!hasIdentifier()) {
6619          
6620          return false;
6621        }
6622        return true;
6623      }
6624
6625      public Builder mergeFrom(
6626          com.google.protobuf.CodedInputStream input,
6627          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6628          throws java.io.IOException {
6629        org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto parsedMessage = null;
6630        try {
6631          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
6632        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6633          parsedMessage = (org.apache.reef.proto.DriverRuntimeProtocol.ResourceReleaseProto) e.getUnfinishedMessage();
6634          throw e;
6635        } finally {
6636          if (parsedMessage != null) {
6637            mergeFrom(parsedMessage);
6638          }
6639        }
6640        return this;
6641      }
6642      private int bitField0_;
6643
6644      // required string identifier = 1;
6645      private java.lang.Object identifier_ = "";
6646      /**
6647       * <code>required string identifier = 1;</code>
6648       */
6649      public boolean hasIdentifier() {
6650        return ((bitField0_ & 0x00000001) == 0x00000001);
6651      }
6652      /**
6653       * <code>required string identifier = 1;</code>
6654       */
6655      public java.lang.String getIdentifier() {
6656        java.lang.Object ref = identifier_;
6657        if (!(ref instanceof java.lang.String)) {
6658          java.lang.String s = ((com.google.protobuf.ByteString) ref)
6659              .toStringUtf8();
6660          identifier_ = s;
6661          return s;
6662        } else {
6663          return (java.lang.String) ref;
6664        }
6665      }
6666      /**
6667       * <code>required string identifier = 1;</code>
6668       */
6669      public com.google.protobuf.ByteString
6670          getIdentifierBytes() {
6671        java.lang.Object ref = identifier_;
6672        if (ref instanceof String) {
6673          com.google.protobuf.ByteString b = 
6674              com.google.protobuf.ByteString.copyFromUtf8(
6675                  (java.lang.String) ref);
6676          identifier_ = b;
6677          return b;
6678        } else {
6679          return (com.google.protobuf.ByteString) ref;
6680        }
6681      }
6682      /**
6683       * <code>required string identifier = 1;</code>
6684       */
6685      public Builder setIdentifier(
6686          java.lang.String value) {
6687        if (value == null) {
6688    throw new NullPointerException();
6689  }
6690  bitField0_ |= 0x00000001;
6691        identifier_ = value;
6692        onChanged();
6693        return this;
6694      }
6695      /**
6696       * <code>required string identifier = 1;</code>
6697       */
6698      public Builder clearIdentifier() {
6699        bitField0_ = (bitField0_ & ~0x00000001);
6700        identifier_ = getDefaultInstance().getIdentifier();
6701        onChanged();
6702        return this;
6703      }
6704      /**
6705       * <code>required string identifier = 1;</code>
6706       */
6707      public Builder setIdentifierBytes(
6708          com.google.protobuf.ByteString value) {
6709        if (value == null) {
6710    throw new NullPointerException();
6711  }
6712  bitField0_ |= 0x00000001;
6713        identifier_ = value;
6714        onChanged();
6715        return this;
6716      }
6717
6718      // @@protoc_insertion_point(builder_scope:ResourceReleaseProto)
6719    }
6720
6721    static {
6722      defaultInstance = new ResourceReleaseProto(true);
6723      defaultInstance.initFields();
6724    }
6725
6726    // @@protoc_insertion_point(class_scope:ResourceReleaseProto)
6727  }
6728
6729  public interface ResourceLaunchProtoOrBuilder
6730      extends com.google.protobuf.MessageOrBuilder {
6731
6732    // required string identifier = 1;
6733    /**
6734     * <code>required string identifier = 1;</code>
6735     */
6736    boolean hasIdentifier();
6737    /**
6738     * <code>required string identifier = 1;</code>
6739     */
6740    java.lang.String getIdentifier();
6741    /**
6742     * <code>required string identifier = 1;</code>
6743     */
6744    com.google.protobuf.ByteString
6745        getIdentifierBytes();
6746
6747    // required string remote_id = 2;
6748    /**
6749     * <code>required string remote_id = 2;</code>
6750     */
6751    boolean hasRemoteId();
6752    /**
6753     * <code>required string remote_id = 2;</code>
6754     */
6755    java.lang.String getRemoteId();
6756    /**
6757     * <code>required string remote_id = 2;</code>
6758     */
6759    com.google.protobuf.ByteString
6760        getRemoteIdBytes();
6761
6762    // required string evaluator_conf = 3;
6763    /**
6764     * <code>required string evaluator_conf = 3;</code>
6765     */
6766    boolean hasEvaluatorConf();
6767    /**
6768     * <code>required string evaluator_conf = 3;</code>
6769     */
6770    java.lang.String getEvaluatorConf();
6771    /**
6772     * <code>required string evaluator_conf = 3;</code>
6773     */
6774    com.google.protobuf.ByteString
6775        getEvaluatorConfBytes();
6776
6777    // required .ProcessType type = 4;
6778    /**
6779     * <code>required .ProcessType type = 4;</code>
6780     */
6781    boolean hasType();
6782    /**
6783     * <code>required .ProcessType type = 4;</code>
6784     */
6785    org.apache.reef.proto.ReefServiceProtos.ProcessType getType();
6786
6787    // repeated .FileResourceProto file = 10;
6788    /**
6789     * <code>repeated .FileResourceProto file = 10;</code>
6790     */
6791    java.util.List<org.apache.reef.proto.ReefServiceProtos.FileResourceProto> 
6792        getFileList();
6793    /**
6794     * <code>repeated .FileResourceProto file = 10;</code>
6795     */
6796    org.apache.reef.proto.ReefServiceProtos.FileResourceProto getFile(int index);
6797    /**
6798     * <code>repeated .FileResourceProto file = 10;</code>
6799     */
6800    int getFileCount();
6801    /**
6802     * <code>repeated .FileResourceProto file = 10;</code>
6803     */
6804    java.util.List<? extends org.apache.reef.proto.ReefServiceProtos.FileResourceProtoOrBuilder> 
6805        getFileOrBuilderList();
6806    /**
6807     * <code>repeated .FileResourceProto file = 10;</code>
6808     */
6809    org.apache.reef.proto.ReefServiceProtos.FileResourceProtoOrBuilder getFileOrBuilder(
6810        int index);
6811  }
6812  /**
6813   * Protobuf type {@code ResourceLaunchProto}
6814   */
6815  public static final class ResourceLaunchProto extends
6816      com.google.protobuf.GeneratedMessage
6817      implements ResourceLaunchProtoOrBuilder {
6818    // Use ResourceLaunchProto.newBuilder() to construct.
6819    private ResourceLaunchProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
6820      super(builder);
6821      this.unknownFields = builder.getUnknownFields();
6822    }
6823    private ResourceLaunchProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
6824
6825    private static final ResourceLaunchProto defaultInstance;
6826    public static ResourceLaunchProto getDefaultInstance() {
6827      return defaultInstance;
6828    }
6829
6830    public ResourceLaunchProto getDefaultInstanceForType() {
6831      return defaultInstance;
6832    }
6833
6834    private final com.google.protobuf.UnknownFieldSet unknownFields;
6835    @java.lang.Override
6836    public final com.google.protobuf.UnknownFieldSet
6837        getUnknownFields() {
6838      return this.unknownFields;
6839    }
6840    private ResourceLaunchProto(
6841        com.google.protobuf.CodedInputStream input,
6842        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6843        throws com.google.protobuf.InvalidProtocolBufferException {
6844      initFields();
6845      int mutable_bitField0_ = 0;
6846      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
6847          com.google.protobuf.UnknownFieldSet.newBuilder();
6848      try {
6849        boolean done = false;
6850        while (!done) {
6851          int tag = input.readTag();
6852          switch (tag) {
6853            case 0:
6854              done = true;
6855              break;
6856            default: {
6857              if (!parseUnknownField(input, unknownFields,
6858                                     extensionRegistry, tag)) {
6859                done = true;
6860              }
6861              break;
6862            }
6863            case 10: {
6864              bitField0_ |= 0x00000001;
6865              identifier_ = input.readBytes();
6866              break;
6867            }
6868            case 18: {
6869              bitField0_ |= 0x00000002;
6870              remoteId_ = input.readBytes();
6871              break;
6872            }
6873            case 26: {
6874              bitField0_ |= 0x00000004;
6875              evaluatorConf_ = input.readBytes();
6876              break;
6877            }
6878            case 32: {
6879              int rawValue = input.readEnum();
6880              org.apache.reef.proto.ReefServiceProtos.ProcessType value = org.apache.reef.proto.ReefServiceProtos.ProcessType.valueOf(rawValue);
6881              if (value == null) {
6882                unknownFields.mergeVarintField(4, rawValue);
6883              } else {
6884                bitField0_ |= 0x00000008;
6885                type_ = value;
6886              }
6887              break;
6888            }
6889            case 82: {
6890              if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
6891                file_ = new java.util.ArrayList<org.apache.reef.proto.ReefServiceProtos.FileResourceProto>();
6892                mutable_bitField0_ |= 0x00000010;
6893              }
6894              file_.add(input.readMessage(org.apache.reef.proto.ReefServiceProtos.FileResourceProto.PARSER, extensionRegistry));
6895              break;
6896            }
6897          }
6898        }
6899      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6900        throw e.setUnfinishedMessage(this);
6901      } catch (java.io.IOException e) {
6902        throw new com.google.protobuf.InvalidProtocolBufferException(
6903            e.getMessage()).setUnfinishedMessage(this);
6904      } finally {
6905        if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
6906          file_ = java.util.Collections.unmodifiableList(file_);
6907        }
6908        this.unknownFields = unknownFields.build();
6909        makeExtensionsImmutable();
6910      }
6911    }
6912    public static final com.google.protobuf.Descriptors.Descriptor
6913        getDescriptor() {
6914      return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceLaunchProto_descriptor;
6915    }
6916
6917    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
6918        internalGetFieldAccessorTable() {
6919      return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceLaunchProto_fieldAccessorTable
6920          .ensureFieldAccessorsInitialized(
6921              org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto.class, org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto.Builder.class);
6922    }
6923
6924    public static com.google.protobuf.Parser<ResourceLaunchProto> PARSER =
6925        new com.google.protobuf.AbstractParser<ResourceLaunchProto>() {
6926      public ResourceLaunchProto parsePartialFrom(
6927          com.google.protobuf.CodedInputStream input,
6928          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6929          throws com.google.protobuf.InvalidProtocolBufferException {
6930        return new ResourceLaunchProto(input, extensionRegistry);
6931      }
6932    };
6933
6934    @java.lang.Override
6935    public com.google.protobuf.Parser<ResourceLaunchProto> getParserForType() {
6936      return PARSER;
6937    }
6938
6939    private int bitField0_;
6940    // required string identifier = 1;
6941    public static final int IDENTIFIER_FIELD_NUMBER = 1;
6942    private java.lang.Object identifier_;
6943    /**
6944     * <code>required string identifier = 1;</code>
6945     */
6946    public boolean hasIdentifier() {
6947      return ((bitField0_ & 0x00000001) == 0x00000001);
6948    }
6949    /**
6950     * <code>required string identifier = 1;</code>
6951     */
6952    public java.lang.String getIdentifier() {
6953      java.lang.Object ref = identifier_;
6954      if (ref instanceof java.lang.String) {
6955        return (java.lang.String) ref;
6956      } else {
6957        com.google.protobuf.ByteString bs = 
6958            (com.google.protobuf.ByteString) ref;
6959        java.lang.String s = bs.toStringUtf8();
6960        if (bs.isValidUtf8()) {
6961          identifier_ = s;
6962        }
6963        return s;
6964      }
6965    }
6966    /**
6967     * <code>required string identifier = 1;</code>
6968     */
6969    public com.google.protobuf.ByteString
6970        getIdentifierBytes() {
6971      java.lang.Object ref = identifier_;
6972      if (ref instanceof java.lang.String) {
6973        com.google.protobuf.ByteString b = 
6974            com.google.protobuf.ByteString.copyFromUtf8(
6975                (java.lang.String) ref);
6976        identifier_ = b;
6977        return b;
6978      } else {
6979        return (com.google.protobuf.ByteString) ref;
6980      }
6981    }
6982
6983    // required string remote_id = 2;
6984    public static final int REMOTE_ID_FIELD_NUMBER = 2;
6985    private java.lang.Object remoteId_;
6986    /**
6987     * <code>required string remote_id = 2;</code>
6988     */
6989    public boolean hasRemoteId() {
6990      return ((bitField0_ & 0x00000002) == 0x00000002);
6991    }
6992    /**
6993     * <code>required string remote_id = 2;</code>
6994     */
6995    public java.lang.String getRemoteId() {
6996      java.lang.Object ref = remoteId_;
6997      if (ref instanceof java.lang.String) {
6998        return (java.lang.String) ref;
6999      } else {
7000        com.google.protobuf.ByteString bs = 
7001            (com.google.protobuf.ByteString) ref;
7002        java.lang.String s = bs.toStringUtf8();
7003        if (bs.isValidUtf8()) {
7004          remoteId_ = s;
7005        }
7006        return s;
7007      }
7008    }
7009    /**
7010     * <code>required string remote_id = 2;</code>
7011     */
7012    public com.google.protobuf.ByteString
7013        getRemoteIdBytes() {
7014      java.lang.Object ref = remoteId_;
7015      if (ref instanceof java.lang.String) {
7016        com.google.protobuf.ByteString b = 
7017            com.google.protobuf.ByteString.copyFromUtf8(
7018                (java.lang.String) ref);
7019        remoteId_ = b;
7020        return b;
7021      } else {
7022        return (com.google.protobuf.ByteString) ref;
7023      }
7024    }
7025
7026    // required string evaluator_conf = 3;
7027    public static final int EVALUATOR_CONF_FIELD_NUMBER = 3;
7028    private java.lang.Object evaluatorConf_;
7029    /**
7030     * <code>required string evaluator_conf = 3;</code>
7031     */
7032    public boolean hasEvaluatorConf() {
7033      return ((bitField0_ & 0x00000004) == 0x00000004);
7034    }
7035    /**
7036     * <code>required string evaluator_conf = 3;</code>
7037     */
7038    public java.lang.String getEvaluatorConf() {
7039      java.lang.Object ref = evaluatorConf_;
7040      if (ref instanceof java.lang.String) {
7041        return (java.lang.String) ref;
7042      } else {
7043        com.google.protobuf.ByteString bs = 
7044            (com.google.protobuf.ByteString) ref;
7045        java.lang.String s = bs.toStringUtf8();
7046        if (bs.isValidUtf8()) {
7047          evaluatorConf_ = s;
7048        }
7049        return s;
7050      }
7051    }
7052    /**
7053     * <code>required string evaluator_conf = 3;</code>
7054     */
7055    public com.google.protobuf.ByteString
7056        getEvaluatorConfBytes() {
7057      java.lang.Object ref = evaluatorConf_;
7058      if (ref instanceof java.lang.String) {
7059        com.google.protobuf.ByteString b = 
7060            com.google.protobuf.ByteString.copyFromUtf8(
7061                (java.lang.String) ref);
7062        evaluatorConf_ = b;
7063        return b;
7064      } else {
7065        return (com.google.protobuf.ByteString) ref;
7066      }
7067    }
7068
7069    // required .ProcessType type = 4;
7070    public static final int TYPE_FIELD_NUMBER = 4;
7071    private org.apache.reef.proto.ReefServiceProtos.ProcessType type_;
7072    /**
7073     * <code>required .ProcessType type = 4;</code>
7074     */
7075    public boolean hasType() {
7076      return ((bitField0_ & 0x00000008) == 0x00000008);
7077    }
7078    /**
7079     * <code>required .ProcessType type = 4;</code>
7080     */
7081    public org.apache.reef.proto.ReefServiceProtos.ProcessType getType() {
7082      return type_;
7083    }
7084
7085    // repeated .FileResourceProto file = 10;
7086    public static final int FILE_FIELD_NUMBER = 10;
7087    private java.util.List<org.apache.reef.proto.ReefServiceProtos.FileResourceProto> file_;
7088    /**
7089     * <code>repeated .FileResourceProto file = 10;</code>
7090     */
7091    public java.util.List<org.apache.reef.proto.ReefServiceProtos.FileResourceProto> getFileList() {
7092      return file_;
7093    }
7094    /**
7095     * <code>repeated .FileResourceProto file = 10;</code>
7096     */
7097    public java.util.List<? extends org.apache.reef.proto.ReefServiceProtos.FileResourceProtoOrBuilder> 
7098        getFileOrBuilderList() {
7099      return file_;
7100    }
7101    /**
7102     * <code>repeated .FileResourceProto file = 10;</code>
7103     */
7104    public int getFileCount() {
7105      return file_.size();
7106    }
7107    /**
7108     * <code>repeated .FileResourceProto file = 10;</code>
7109     */
7110    public org.apache.reef.proto.ReefServiceProtos.FileResourceProto getFile(int index) {
7111      return file_.get(index);
7112    }
7113    /**
7114     * <code>repeated .FileResourceProto file = 10;</code>
7115     */
7116    public org.apache.reef.proto.ReefServiceProtos.FileResourceProtoOrBuilder getFileOrBuilder(
7117        int index) {
7118      return file_.get(index);
7119    }
7120
7121    private void initFields() {
7122      identifier_ = "";
7123      remoteId_ = "";
7124      evaluatorConf_ = "";
7125      type_ = org.apache.reef.proto.ReefServiceProtos.ProcessType.JVM;
7126      file_ = java.util.Collections.emptyList();
7127    }
7128    private byte memoizedIsInitialized = -1;
7129    public final boolean isInitialized() {
7130      byte isInitialized = memoizedIsInitialized;
7131      if (isInitialized != -1) return isInitialized == 1;
7132
7133      if (!hasIdentifier()) {
7134        memoizedIsInitialized = 0;
7135        return false;
7136      }
7137      if (!hasRemoteId()) {
7138        memoizedIsInitialized = 0;
7139        return false;
7140      }
7141      if (!hasEvaluatorConf()) {
7142        memoizedIsInitialized = 0;
7143        return false;
7144      }
7145      if (!hasType()) {
7146        memoizedIsInitialized = 0;
7147        return false;
7148      }
7149      for (int i = 0; i < getFileCount(); i++) {
7150        if (!getFile(i).isInitialized()) {
7151          memoizedIsInitialized = 0;
7152          return false;
7153        }
7154      }
7155      memoizedIsInitialized = 1;
7156      return true;
7157    }
7158
7159    public void writeTo(com.google.protobuf.CodedOutputStream output)
7160                        throws java.io.IOException {
7161      getSerializedSize();
7162      if (((bitField0_ & 0x00000001) == 0x00000001)) {
7163        output.writeBytes(1, getIdentifierBytes());
7164      }
7165      if (((bitField0_ & 0x00000002) == 0x00000002)) {
7166        output.writeBytes(2, getRemoteIdBytes());
7167      }
7168      if (((bitField0_ & 0x00000004) == 0x00000004)) {
7169        output.writeBytes(3, getEvaluatorConfBytes());
7170      }
7171      if (((bitField0_ & 0x00000008) == 0x00000008)) {
7172        output.writeEnum(4, type_.getNumber());
7173      }
7174      for (int i = 0; i < file_.size(); i++) {
7175        output.writeMessage(10, file_.get(i));
7176      }
7177      getUnknownFields().writeTo(output);
7178    }
7179
7180    private int memoizedSerializedSize = -1;
7181    public int getSerializedSize() {
7182      int size = memoizedSerializedSize;
7183      if (size != -1) return size;
7184
7185      size = 0;
7186      if (((bitField0_ & 0x00000001) == 0x00000001)) {
7187        size += com.google.protobuf.CodedOutputStream
7188          .computeBytesSize(1, getIdentifierBytes());
7189      }
7190      if (((bitField0_ & 0x00000002) == 0x00000002)) {
7191        size += com.google.protobuf.CodedOutputStream
7192          .computeBytesSize(2, getRemoteIdBytes());
7193      }
7194      if (((bitField0_ & 0x00000004) == 0x00000004)) {
7195        size += com.google.protobuf.CodedOutputStream
7196          .computeBytesSize(3, getEvaluatorConfBytes());
7197      }
7198      if (((bitField0_ & 0x00000008) == 0x00000008)) {
7199        size += com.google.protobuf.CodedOutputStream
7200          .computeEnumSize(4, type_.getNumber());
7201      }
7202      for (int i = 0; i < file_.size(); i++) {
7203        size += com.google.protobuf.CodedOutputStream
7204          .computeMessageSize(10, file_.get(i));
7205      }
7206      size += getUnknownFields().getSerializedSize();
7207      memoizedSerializedSize = size;
7208      return size;
7209    }
7210
7211    private static final long serialVersionUID = 0L;
7212    @java.lang.Override
7213    protected java.lang.Object writeReplace()
7214        throws java.io.ObjectStreamException {
7215      return super.writeReplace();
7216    }
7217
7218    @java.lang.Override
7219    public boolean equals(final java.lang.Object obj) {
7220      if (obj == this) {
7221       return true;
7222      }
7223      if (!(obj instanceof org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto)) {
7224        return super.equals(obj);
7225      }
7226      org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto other = (org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto) obj;
7227
7228      boolean result = true;
7229      result = result && (hasIdentifier() == other.hasIdentifier());
7230      if (hasIdentifier()) {
7231        result = result && getIdentifier()
7232            .equals(other.getIdentifier());
7233      }
7234      result = result && (hasRemoteId() == other.hasRemoteId());
7235      if (hasRemoteId()) {
7236        result = result && getRemoteId()
7237            .equals(other.getRemoteId());
7238      }
7239      result = result && (hasEvaluatorConf() == other.hasEvaluatorConf());
7240      if (hasEvaluatorConf()) {
7241        result = result && getEvaluatorConf()
7242            .equals(other.getEvaluatorConf());
7243      }
7244      result = result && (hasType() == other.hasType());
7245      if (hasType()) {
7246        result = result &&
7247            (getType() == other.getType());
7248      }
7249      result = result && getFileList()
7250          .equals(other.getFileList());
7251      result = result &&
7252          getUnknownFields().equals(other.getUnknownFields());
7253      return result;
7254    }
7255
7256    private int memoizedHashCode = 0;
7257    @java.lang.Override
7258    public int hashCode() {
7259      if (memoizedHashCode != 0) {
7260        return memoizedHashCode;
7261      }
7262      int hash = 41;
7263      hash = (19 * hash) + getDescriptorForType().hashCode();
7264      if (hasIdentifier()) {
7265        hash = (37 * hash) + IDENTIFIER_FIELD_NUMBER;
7266        hash = (53 * hash) + getIdentifier().hashCode();
7267      }
7268      if (hasRemoteId()) {
7269        hash = (37 * hash) + REMOTE_ID_FIELD_NUMBER;
7270        hash = (53 * hash) + getRemoteId().hashCode();
7271      }
7272      if (hasEvaluatorConf()) {
7273        hash = (37 * hash) + EVALUATOR_CONF_FIELD_NUMBER;
7274        hash = (53 * hash) + getEvaluatorConf().hashCode();
7275      }
7276      if (hasType()) {
7277        hash = (37 * hash) + TYPE_FIELD_NUMBER;
7278        hash = (53 * hash) + hashEnum(getType());
7279      }
7280      if (getFileCount() > 0) {
7281        hash = (37 * hash) + FILE_FIELD_NUMBER;
7282        hash = (53 * hash) + getFileList().hashCode();
7283      }
7284      hash = (29 * hash) + getUnknownFields().hashCode();
7285      memoizedHashCode = hash;
7286      return hash;
7287    }
7288
7289    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto parseFrom(
7290        com.google.protobuf.ByteString data)
7291        throws com.google.protobuf.InvalidProtocolBufferException {
7292      return PARSER.parseFrom(data);
7293    }
7294    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto parseFrom(
7295        com.google.protobuf.ByteString data,
7296        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7297        throws com.google.protobuf.InvalidProtocolBufferException {
7298      return PARSER.parseFrom(data, extensionRegistry);
7299    }
7300    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto parseFrom(byte[] data)
7301        throws com.google.protobuf.InvalidProtocolBufferException {
7302      return PARSER.parseFrom(data);
7303    }
7304    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto parseFrom(
7305        byte[] data,
7306        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7307        throws com.google.protobuf.InvalidProtocolBufferException {
7308      return PARSER.parseFrom(data, extensionRegistry);
7309    }
7310    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto parseFrom(java.io.InputStream input)
7311        throws java.io.IOException {
7312      return PARSER.parseFrom(input);
7313    }
7314    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto parseFrom(
7315        java.io.InputStream input,
7316        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7317        throws java.io.IOException {
7318      return PARSER.parseFrom(input, extensionRegistry);
7319    }
7320    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto parseDelimitedFrom(java.io.InputStream input)
7321        throws java.io.IOException {
7322      return PARSER.parseDelimitedFrom(input);
7323    }
7324    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto parseDelimitedFrom(
7325        java.io.InputStream input,
7326        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7327        throws java.io.IOException {
7328      return PARSER.parseDelimitedFrom(input, extensionRegistry);
7329    }
7330    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto parseFrom(
7331        com.google.protobuf.CodedInputStream input)
7332        throws java.io.IOException {
7333      return PARSER.parseFrom(input);
7334    }
7335    public static org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto parseFrom(
7336        com.google.protobuf.CodedInputStream input,
7337        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7338        throws java.io.IOException {
7339      return PARSER.parseFrom(input, extensionRegistry);
7340    }
7341
7342    public static Builder newBuilder() { return Builder.create(); }
7343    public Builder newBuilderForType() { return newBuilder(); }
7344    public static Builder newBuilder(org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto prototype) {
7345      return newBuilder().mergeFrom(prototype);
7346    }
7347    public Builder toBuilder() { return newBuilder(this); }
7348
7349    @java.lang.Override
7350    protected Builder newBuilderForType(
7351        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
7352      Builder builder = new Builder(parent);
7353      return builder;
7354    }
7355    /**
7356     * Protobuf type {@code ResourceLaunchProto}
7357     */
7358    public static final class Builder extends
7359        com.google.protobuf.GeneratedMessage.Builder<Builder>
7360       implements org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProtoOrBuilder {
7361      public static final com.google.protobuf.Descriptors.Descriptor
7362          getDescriptor() {
7363        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceLaunchProto_descriptor;
7364      }
7365
7366      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
7367          internalGetFieldAccessorTable() {
7368        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceLaunchProto_fieldAccessorTable
7369            .ensureFieldAccessorsInitialized(
7370                org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto.class, org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto.Builder.class);
7371      }
7372
7373      // Construct using org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto.newBuilder()
7374      private Builder() {
7375        maybeForceBuilderInitialization();
7376      }
7377
7378      private Builder(
7379          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
7380        super(parent);
7381        maybeForceBuilderInitialization();
7382      }
7383      private void maybeForceBuilderInitialization() {
7384        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
7385          getFileFieldBuilder();
7386        }
7387      }
7388      private static Builder create() {
7389        return new Builder();
7390      }
7391
7392      public Builder clear() {
7393        super.clear();
7394        identifier_ = "";
7395        bitField0_ = (bitField0_ & ~0x00000001);
7396        remoteId_ = "";
7397        bitField0_ = (bitField0_ & ~0x00000002);
7398        evaluatorConf_ = "";
7399        bitField0_ = (bitField0_ & ~0x00000004);
7400        type_ = org.apache.reef.proto.ReefServiceProtos.ProcessType.JVM;
7401        bitField0_ = (bitField0_ & ~0x00000008);
7402        if (fileBuilder_ == null) {
7403          file_ = java.util.Collections.emptyList();
7404          bitField0_ = (bitField0_ & ~0x00000010);
7405        } else {
7406          fileBuilder_.clear();
7407        }
7408        return this;
7409      }
7410
7411      public Builder clone() {
7412        return create().mergeFrom(buildPartial());
7413      }
7414
7415      public com.google.protobuf.Descriptors.Descriptor
7416          getDescriptorForType() {
7417        return org.apache.reef.proto.DriverRuntimeProtocol.internal_static_ResourceLaunchProto_descriptor;
7418      }
7419
7420      public org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto getDefaultInstanceForType() {
7421        return org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto.getDefaultInstance();
7422      }
7423
7424      public org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto build() {
7425        org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto result = buildPartial();
7426        if (!result.isInitialized()) {
7427          throw newUninitializedMessageException(result);
7428        }
7429        return result;
7430      }
7431
7432      public org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto buildPartial() {
7433        org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto result = new org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto(this);
7434        int from_bitField0_ = bitField0_;
7435        int to_bitField0_ = 0;
7436        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
7437          to_bitField0_ |= 0x00000001;
7438        }
7439        result.identifier_ = identifier_;
7440        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
7441          to_bitField0_ |= 0x00000002;
7442        }
7443        result.remoteId_ = remoteId_;
7444        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
7445          to_bitField0_ |= 0x00000004;
7446        }
7447        result.evaluatorConf_ = evaluatorConf_;
7448        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
7449          to_bitField0_ |= 0x00000008;
7450        }
7451        result.type_ = type_;
7452        if (fileBuilder_ == null) {
7453          if (((bitField0_ & 0x00000010) == 0x00000010)) {
7454            file_ = java.util.Collections.unmodifiableList(file_);
7455            bitField0_ = (bitField0_ & ~0x00000010);
7456          }
7457          result.file_ = file_;
7458        } else {
7459          result.file_ = fileBuilder_.build();
7460        }
7461        result.bitField0_ = to_bitField0_;
7462        onBuilt();
7463        return result;
7464      }
7465
7466      public Builder mergeFrom(com.google.protobuf.Message other) {
7467        if (other instanceof org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto) {
7468          return mergeFrom((org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto)other);
7469        } else {
7470          super.mergeFrom(other);
7471          return this;
7472        }
7473      }
7474
7475      public Builder mergeFrom(org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto other) {
7476        if (other == org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto.getDefaultInstance()) return this;
7477        if (other.hasIdentifier()) {
7478          bitField0_ |= 0x00000001;
7479          identifier_ = other.identifier_;
7480          onChanged();
7481        }
7482        if (other.hasRemoteId()) {
7483          bitField0_ |= 0x00000002;
7484          remoteId_ = other.remoteId_;
7485          onChanged();
7486        }
7487        if (other.hasEvaluatorConf()) {
7488          bitField0_ |= 0x00000004;
7489          evaluatorConf_ = other.evaluatorConf_;
7490          onChanged();
7491        }
7492        if (other.hasType()) {
7493          setType(other.getType());
7494        }
7495        if (fileBuilder_ == null) {
7496          if (!other.file_.isEmpty()) {
7497            if (file_.isEmpty()) {
7498              file_ = other.file_;
7499              bitField0_ = (bitField0_ & ~0x00000010);
7500            } else {
7501              ensureFileIsMutable();
7502              file_.addAll(other.file_);
7503            }
7504            onChanged();
7505          }
7506        } else {
7507          if (!other.file_.isEmpty()) {
7508            if (fileBuilder_.isEmpty()) {
7509              fileBuilder_.dispose();
7510              fileBuilder_ = null;
7511              file_ = other.file_;
7512              bitField0_ = (bitField0_ & ~0x00000010);
7513              fileBuilder_ = 
7514                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
7515                   getFileFieldBuilder() : null;
7516            } else {
7517              fileBuilder_.addAllMessages(other.file_);
7518            }
7519          }
7520        }
7521        this.mergeUnknownFields(other.getUnknownFields());
7522        return this;
7523      }
7524
7525      public final boolean isInitialized() {
7526        if (!hasIdentifier()) {
7527          
7528          return false;
7529        }
7530        if (!hasRemoteId()) {
7531          
7532          return false;
7533        }
7534        if (!hasEvaluatorConf()) {
7535          
7536          return false;
7537        }
7538        if (!hasType()) {
7539          
7540          return false;
7541        }
7542        for (int i = 0; i < getFileCount(); i++) {
7543          if (!getFile(i).isInitialized()) {
7544            
7545            return false;
7546          }
7547        }
7548        return true;
7549      }
7550
7551      public Builder mergeFrom(
7552          com.google.protobuf.CodedInputStream input,
7553          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7554          throws java.io.IOException {
7555        org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto parsedMessage = null;
7556        try {
7557          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
7558        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
7559          parsedMessage = (org.apache.reef.proto.DriverRuntimeProtocol.ResourceLaunchProto) e.getUnfinishedMessage();
7560          throw e;
7561        } finally {
7562          if (parsedMessage != null) {
7563            mergeFrom(parsedMessage);
7564          }
7565        }
7566        return this;
7567      }
7568      private int bitField0_;
7569
7570      // required string identifier = 1;
7571      private java.lang.Object identifier_ = "";
7572      /**
7573       * <code>required string identifier = 1;</code>
7574       */
7575      public boolean hasIdentifier() {
7576        return ((bitField0_ & 0x00000001) == 0x00000001);
7577      }
7578      /**
7579       * <code>required string identifier = 1;</code>
7580       */
7581      public java.lang.String getIdentifier() {
7582        java.lang.Object ref = identifier_;
7583        if (!(ref instanceof java.lang.String)) {
7584          java.lang.String s = ((com.google.protobuf.ByteString) ref)
7585              .toStringUtf8();
7586          identifier_ = s;
7587          return s;
7588        } else {
7589          return (java.lang.String) ref;
7590        }
7591      }
7592      /**
7593       * <code>required string identifier = 1;</code>
7594       */
7595      public com.google.protobuf.ByteString
7596          getIdentifierBytes() {
7597        java.lang.Object ref = identifier_;
7598        if (ref instanceof String) {
7599          com.google.protobuf.ByteString b = 
7600              com.google.protobuf.ByteString.copyFromUtf8(
7601                  (java.lang.String) ref);
7602          identifier_ = b;
7603          return b;
7604        } else {
7605          return (com.google.protobuf.ByteString) ref;
7606        }
7607      }
7608      /**
7609       * <code>required string identifier = 1;</code>
7610       */
7611      public Builder setIdentifier(
7612          java.lang.String value) {
7613        if (value == null) {
7614    throw new NullPointerException();
7615  }
7616  bitField0_ |= 0x00000001;
7617        identifier_ = value;
7618        onChanged();
7619        return this;
7620      }
7621      /**
7622       * <code>required string identifier = 1;</code>
7623       */
7624      public Builder clearIdentifier() {
7625        bitField0_ = (bitField0_ & ~0x00000001);
7626        identifier_ = getDefaultInstance().getIdentifier();
7627        onChanged();
7628        return this;
7629      }
7630      /**
7631       * <code>required string identifier = 1;</code>
7632       */
7633      public Builder setIdentifierBytes(
7634          com.google.protobuf.ByteString value) {
7635        if (value == null) {
7636    throw new NullPointerException();
7637  }
7638  bitField0_ |= 0x00000001;
7639        identifier_ = value;
7640        onChanged();
7641        return this;
7642      }
7643
7644      // required string remote_id = 2;
7645      private java.lang.Object remoteId_ = "";
7646      /**
7647       * <code>required string remote_id = 2;</code>
7648       */
7649      public boolean hasRemoteId() {
7650        return ((bitField0_ & 0x00000002) == 0x00000002);
7651      }
7652      /**
7653       * <code>required string remote_id = 2;</code>
7654       */
7655      public java.lang.String getRemoteId() {
7656        java.lang.Object ref = remoteId_;
7657        if (!(ref instanceof java.lang.String)) {
7658          java.lang.String s = ((com.google.protobuf.ByteString) ref)
7659              .toStringUtf8();
7660          remoteId_ = s;
7661          return s;
7662        } else {
7663          return (java.lang.String) ref;
7664        }
7665      }
7666      /**
7667       * <code>required string remote_id = 2;</code>
7668       */
7669      public com.google.protobuf.ByteString
7670          getRemoteIdBytes() {
7671        java.lang.Object ref = remoteId_;
7672        if (ref instanceof String) {
7673          com.google.protobuf.ByteString b = 
7674              com.google.protobuf.ByteString.copyFromUtf8(
7675                  (java.lang.String) ref);
7676          remoteId_ = b;
7677          return b;
7678        } else {
7679          return (com.google.protobuf.ByteString) ref;
7680        }
7681      }
7682      /**
7683       * <code>required string remote_id = 2;</code>
7684       */
7685      public Builder setRemoteId(
7686          java.lang.String value) {
7687        if (value == null) {
7688    throw new NullPointerException();
7689  }
7690  bitField0_ |= 0x00000002;
7691        remoteId_ = value;
7692        onChanged();
7693        return this;
7694      }
7695      /**
7696       * <code>required string remote_id = 2;</code>
7697       */
7698      public Builder clearRemoteId() {
7699        bitField0_ = (bitField0_ & ~0x00000002);
7700        remoteId_ = getDefaultInstance().getRemoteId();
7701        onChanged();
7702        return this;
7703      }
7704      /**
7705       * <code>required string remote_id = 2;</code>
7706       */
7707      public Builder setRemoteIdBytes(
7708          com.google.protobuf.ByteString value) {
7709        if (value == null) {
7710    throw new NullPointerException();
7711  }
7712  bitField0_ |= 0x00000002;
7713        remoteId_ = value;
7714        onChanged();
7715        return this;
7716      }
7717
7718      // required string evaluator_conf = 3;
7719      private java.lang.Object evaluatorConf_ = "";
7720      /**
7721       * <code>required string evaluator_conf = 3;</code>
7722       */
7723      public boolean hasEvaluatorConf() {
7724        return ((bitField0_ & 0x00000004) == 0x00000004);
7725      }
7726      /**
7727       * <code>required string evaluator_conf = 3;</code>
7728       */
7729      public java.lang.String getEvaluatorConf() {
7730        java.lang.Object ref = evaluatorConf_;
7731        if (!(ref instanceof java.lang.String)) {
7732          java.lang.String s = ((com.google.protobuf.ByteString) ref)
7733              .toStringUtf8();
7734          evaluatorConf_ = s;
7735          return s;
7736        } else {
7737          return (java.lang.String) ref;
7738        }
7739      }
7740      /**
7741       * <code>required string evaluator_conf = 3;</code>
7742       */
7743      public com.google.protobuf.ByteString
7744          getEvaluatorConfBytes() {
7745        java.lang.Object ref = evaluatorConf_;
7746        if (ref instanceof String) {
7747          com.google.protobuf.ByteString b = 
7748              com.google.protobuf.ByteString.copyFromUtf8(
7749                  (java.lang.String) ref);
7750          evaluatorConf_ = b;
7751          return b;
7752        } else {
7753          return (com.google.protobuf.ByteString) ref;
7754        }
7755      }
7756      /**
7757       * <code>required string evaluator_conf = 3;</code>
7758       */
7759      public Builder setEvaluatorConf(
7760          java.lang.String value) {
7761        if (value == null) {
7762    throw new NullPointerException();
7763  }
7764  bitField0_ |= 0x00000004;
7765        evaluatorConf_ = value;
7766        onChanged();
7767        return this;
7768      }
7769      /**
7770       * <code>required string evaluator_conf = 3;</code>
7771       */
7772      public Builder clearEvaluatorConf() {
7773        bitField0_ = (bitField0_ & ~0x00000004);
7774        evaluatorConf_ = getDefaultInstance().getEvaluatorConf();
7775        onChanged();
7776        return this;
7777      }
7778      /**
7779       * <code>required string evaluator_conf = 3;</code>
7780       */
7781      public Builder setEvaluatorConfBytes(
7782          com.google.protobuf.ByteString value) {
7783        if (value == null) {
7784    throw new NullPointerException();
7785  }
7786  bitField0_ |= 0x00000004;
7787        evaluatorConf_ = value;
7788        onChanged();
7789        return this;
7790      }
7791
7792      // required .ProcessType type = 4;
7793      private org.apache.reef.proto.ReefServiceProtos.ProcessType type_ = org.apache.reef.proto.ReefServiceProtos.ProcessType.JVM;
7794      /**
7795       * <code>required .ProcessType type = 4;</code>
7796       */
7797      public boolean hasType() {
7798        return ((bitField0_ & 0x00000008) == 0x00000008);
7799      }
7800      /**
7801       * <code>required .ProcessType type = 4;</code>
7802       */
7803      public org.apache.reef.proto.ReefServiceProtos.ProcessType getType() {
7804        return type_;
7805      }
7806      /**
7807       * <code>required .ProcessType type = 4;</code>
7808       */
7809      public Builder setType(org.apache.reef.proto.ReefServiceProtos.ProcessType value) {
7810        if (value == null) {
7811          throw new NullPointerException();
7812        }
7813        bitField0_ |= 0x00000008;
7814        type_ = value;
7815        onChanged();
7816        return this;
7817      }
7818      /**
7819       * <code>required .ProcessType type = 4;</code>
7820       */
7821      public Builder clearType() {
7822        bitField0_ = (bitField0_ & ~0x00000008);
7823        type_ = org.apache.reef.proto.ReefServiceProtos.ProcessType.JVM;
7824        onChanged();
7825        return this;
7826      }
7827
7828      // repeated .FileResourceProto file = 10;
7829      private java.util.List<org.apache.reef.proto.ReefServiceProtos.FileResourceProto> file_ =
7830        java.util.Collections.emptyList();
7831      private void ensureFileIsMutable() {
7832        if (!((bitField0_ & 0x00000010) == 0x00000010)) {
7833          file_ = new java.util.ArrayList<org.apache.reef.proto.ReefServiceProtos.FileResourceProto>(file_);
7834          bitField0_ |= 0x00000010;
7835         }
7836      }
7837
7838      private com.google.protobuf.RepeatedFieldBuilder<
7839          org.apache.reef.proto.ReefServiceProtos.FileResourceProto, org.apache.reef.proto.ReefServiceProtos.FileResourceProto.Builder, org.apache.reef.proto.ReefServiceProtos.FileResourceProtoOrBuilder> fileBuilder_;
7840
7841      /**
7842       * <code>repeated .FileResourceProto file = 10;</code>
7843       */
7844      public java.util.List<org.apache.reef.proto.ReefServiceProtos.FileResourceProto> getFileList() {
7845        if (fileBuilder_ == null) {
7846          return java.util.Collections.unmodifiableList(file_);
7847        } else {
7848          return fileBuilder_.getMessageList();
7849        }
7850      }
7851      /**
7852       * <code>repeated .FileResourceProto file = 10;</code>
7853       */
7854      public int getFileCount() {
7855        if (fileBuilder_ == null) {
7856          return file_.size();
7857        } else {
7858          return fileBuilder_.getCount();
7859        }
7860      }
7861      /**
7862       * <code>repeated .FileResourceProto file = 10;</code>
7863       */
7864      public org.apache.reef.proto.ReefServiceProtos.FileResourceProto getFile(int index) {
7865        if (fileBuilder_ == null) {
7866          return file_.get(index);
7867        } else {
7868          return fileBuilder_.getMessage(index);
7869        }
7870      }
7871      /**
7872       * <code>repeated .FileResourceProto file = 10;</code>
7873       */
7874      public Builder setFile(
7875          int index, org.apache.reef.proto.ReefServiceProtos.FileResourceProto value) {
7876        if (fileBuilder_ == null) {
7877          if (value == null) {
7878            throw new NullPointerException();
7879          }
7880          ensureFileIsMutable();
7881          file_.set(index, value);
7882          onChanged();
7883        } else {
7884          fileBuilder_.setMessage(index, value);
7885        }
7886        return this;
7887      }
7888      /**
7889       * <code>repeated .FileResourceProto file = 10;</code>
7890       */
7891      public Builder setFile(
7892          int index, org.apache.reef.proto.ReefServiceProtos.FileResourceProto.Builder builderForValue) {
7893        if (fileBuilder_ == null) {
7894          ensureFileIsMutable();
7895          file_.set(index, builderForValue.build());
7896          onChanged();
7897        } else {
7898          fileBuilder_.setMessage(index, builderForValue.build());
7899        }
7900        return this;
7901      }
7902      /**
7903       * <code>repeated .FileResourceProto file = 10;</code>
7904       */
7905      public Builder addFile(org.apache.reef.proto.ReefServiceProtos.FileResourceProto value) {
7906        if (fileBuilder_ == null) {
7907          if (value == null) {
7908            throw new NullPointerException();
7909          }
7910          ensureFileIsMutable();
7911          file_.add(value);
7912          onChanged();
7913        } else {
7914          fileBuilder_.addMessage(value);
7915        }
7916        return this;
7917      }
7918      /**
7919       * <code>repeated .FileResourceProto file = 10;</code>
7920       */
7921      public Builder addFile(
7922          int index, org.apache.reef.proto.ReefServiceProtos.FileResourceProto value) {
7923        if (fileBuilder_ == null) {
7924          if (value == null) {
7925            throw new NullPointerException();
7926          }
7927          ensureFileIsMutable();
7928          file_.add(index, value);
7929          onChanged();
7930        } else {
7931          fileBuilder_.addMessage(index, value);
7932        }
7933        return this;
7934      }
7935      /**
7936       * <code>repeated .FileResourceProto file = 10;</code>
7937       */
7938      public Builder addFile(
7939          org.apache.reef.proto.ReefServiceProtos.FileResourceProto.Builder builderForValue) {
7940        if (fileBuilder_ == null) {
7941          ensureFileIsMutable();
7942          file_.add(builderForValue.build());
7943          onChanged();
7944        } else {
7945          fileBuilder_.addMessage(builderForValue.build());
7946        }
7947        return this;
7948      }
7949      /**
7950       * <code>repeated .FileResourceProto file = 10;</code>
7951       */
7952      public Builder addFile(
7953          int index, org.apache.reef.proto.ReefServiceProtos.FileResourceProto.Builder builderForValue) {
7954        if (fileBuilder_ == null) {
7955          ensureFileIsMutable();
7956          file_.add(index, builderForValue.build());
7957          onChanged();
7958        } else {
7959          fileBuilder_.addMessage(index, builderForValue.build());
7960        }
7961        return this;
7962      }
7963      /**
7964       * <code>repeated .FileResourceProto file = 10;</code>
7965       */
7966      public Builder addAllFile(
7967          java.lang.Iterable<? extends org.apache.reef.proto.ReefServiceProtos.FileResourceProto> values) {
7968        if (fileBuilder_ == null) {
7969          ensureFileIsMutable();
7970          super.addAll(values, file_);
7971          onChanged();
7972        } else {
7973          fileBuilder_.addAllMessages(values);
7974        }
7975        return this;
7976      }
7977      /**
7978       * <code>repeated .FileResourceProto file = 10;</code>
7979       */
7980      public Builder clearFile() {
7981        if (fileBuilder_ == null) {
7982          file_ = java.util.Collections.emptyList();
7983          bitField0_ = (bitField0_ & ~0x00000010);
7984          onChanged();
7985        } else {
7986          fileBuilder_.clear();
7987        }
7988        return this;
7989      }
7990      /**
7991       * <code>repeated .FileResourceProto file = 10;</code>
7992       */
7993      public Builder removeFile(int index) {
7994        if (fileBuilder_ == null) {
7995          ensureFileIsMutable();
7996          file_.remove(index);
7997          onChanged();
7998        } else {
7999          fileBuilder_.remove(index);
8000        }
8001        return this;
8002      }
8003      /**
8004       * <code>repeated .FileResourceProto file = 10;</code>
8005       */
8006      public org.apache.reef.proto.ReefServiceProtos.FileResourceProto.Builder getFileBuilder(
8007          int index) {
8008        return getFileFieldBuilder().getBuilder(index);
8009      }
8010      /**
8011       * <code>repeated .FileResourceProto file = 10;</code>
8012       */
8013      public org.apache.reef.proto.ReefServiceProtos.FileResourceProtoOrBuilder getFileOrBuilder(
8014          int index) {
8015        if (fileBuilder_ == null) {
8016          return file_.get(index);  } else {
8017          return fileBuilder_.getMessageOrBuilder(index);
8018        }
8019      }
8020      /**
8021       * <code>repeated .FileResourceProto file = 10;</code>
8022       */
8023      public java.util.List<? extends org.apache.reef.proto.ReefServiceProtos.FileResourceProtoOrBuilder> 
8024           getFileOrBuilderList() {
8025        if (fileBuilder_ != null) {
8026          return fileBuilder_.getMessageOrBuilderList();
8027        } else {
8028          return java.util.Collections.unmodifiableList(file_);
8029        }
8030      }
8031      /**
8032       * <code>repeated .FileResourceProto file = 10;</code>
8033       */
8034      public org.apache.reef.proto.ReefServiceProtos.FileResourceProto.Builder addFileBuilder() {
8035        return getFileFieldBuilder().addBuilder(
8036            org.apache.reef.proto.ReefServiceProtos.FileResourceProto.getDefaultInstance());
8037      }
8038      /**
8039       * <code>repeated .FileResourceProto file = 10;</code>
8040       */
8041      public org.apache.reef.proto.ReefServiceProtos.FileResourceProto.Builder addFileBuilder(
8042          int index) {
8043        return getFileFieldBuilder().addBuilder(
8044            index, org.apache.reef.proto.ReefServiceProtos.FileResourceProto.getDefaultInstance());
8045      }
8046      /**
8047       * <code>repeated .FileResourceProto file = 10;</code>
8048       */
8049      public java.util.List<org.apache.reef.proto.ReefServiceProtos.FileResourceProto.Builder> 
8050           getFileBuilderList() {
8051        return getFileFieldBuilder().getBuilderList();
8052      }
8053      private com.google.protobuf.RepeatedFieldBuilder<
8054          org.apache.reef.proto.ReefServiceProtos.FileResourceProto, org.apache.reef.proto.ReefServiceProtos.FileResourceProto.Builder, org.apache.reef.proto.ReefServiceProtos.FileResourceProtoOrBuilder> 
8055          getFileFieldBuilder() {
8056        if (fileBuilder_ == null) {
8057          fileBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
8058              org.apache.reef.proto.ReefServiceProtos.FileResourceProto, org.apache.reef.proto.ReefServiceProtos.FileResourceProto.Builder, org.apache.reef.proto.ReefServiceProtos.FileResourceProtoOrBuilder>(
8059                  file_,
8060                  ((bitField0_ & 0x00000010) == 0x00000010),
8061                  getParentForChildren(),
8062                  isClean());
8063          file_ = null;
8064        }
8065        return fileBuilder_;
8066      }
8067
8068      // @@protoc_insertion_point(builder_scope:ResourceLaunchProto)
8069    }
8070
8071    static {
8072      defaultInstance = new ResourceLaunchProto(true);
8073      defaultInstance.initFields();
8074    }
8075
8076    // @@protoc_insertion_point(class_scope:ResourceLaunchProto)
8077  }
8078
8079  private static com.google.protobuf.Descriptors.Descriptor
8080    internal_static_DriverProcessRegistrationProto_descriptor;
8081  private static
8082    com.google.protobuf.GeneratedMessage.FieldAccessorTable
8083      internal_static_DriverProcessRegistrationProto_fieldAccessorTable;
8084  private static com.google.protobuf.Descriptors.Descriptor
8085    internal_static_NodeDescriptorProto_descriptor;
8086  private static
8087    com.google.protobuf.GeneratedMessage.FieldAccessorTable
8088      internal_static_NodeDescriptorProto_fieldAccessorTable;
8089  private static com.google.protobuf.Descriptors.Descriptor
8090    internal_static_ResourceAllocationProto_descriptor;
8091  private static
8092    com.google.protobuf.GeneratedMessage.FieldAccessorTable
8093      internal_static_ResourceAllocationProto_fieldAccessorTable;
8094  private static com.google.protobuf.Descriptors.Descriptor
8095    internal_static_ResourceStatusProto_descriptor;
8096  private static
8097    com.google.protobuf.GeneratedMessage.FieldAccessorTable
8098      internal_static_ResourceStatusProto_fieldAccessorTable;
8099  private static com.google.protobuf.Descriptors.Descriptor
8100    internal_static_RuntimeStatusProto_descriptor;
8101  private static
8102    com.google.protobuf.GeneratedMessage.FieldAccessorTable
8103      internal_static_RuntimeStatusProto_fieldAccessorTable;
8104  private static com.google.protobuf.Descriptors.Descriptor
8105    internal_static_ResourceRequestProto_descriptor;
8106  private static
8107    com.google.protobuf.GeneratedMessage.FieldAccessorTable
8108      internal_static_ResourceRequestProto_fieldAccessorTable;
8109  private static com.google.protobuf.Descriptors.Descriptor
8110    internal_static_ResourceReleaseProto_descriptor;
8111  private static
8112    com.google.protobuf.GeneratedMessage.FieldAccessorTable
8113      internal_static_ResourceReleaseProto_fieldAccessorTable;
8114  private static com.google.protobuf.Descriptors.Descriptor
8115    internal_static_ResourceLaunchProto_descriptor;
8116  private static
8117    com.google.protobuf.GeneratedMessage.FieldAccessorTable
8118      internal_static_ResourceLaunchProto_fieldAccessorTable;
8119
8120  public static com.google.protobuf.Descriptors.FileDescriptor
8121      getDescriptor() {
8122    return descriptor;
8123  }
8124  private static com.google.protobuf.Descriptors.FileDescriptor
8125      descriptor;
8126  static {
8127    java.lang.String[] descriptorData = {
8128      "\n\024driver_runtime.proto\032\031reef_service_pro" +
8129      "tos.proto\";\n\036DriverProcessRegistrationPr" +
8130      "oto\022\031\n\021remote_identifier\030\001 \002(\t\"r\n\023NodeDe" +
8131      "scriptorProto\022\022\n\nidentifier\030\001 \002(\t\022\021\n\thos" +
8132      "t_name\030\002 \002(\t\022\014\n\004port\030\003 \002(\005\022\023\n\013memory_siz" +
8133      "e\030\004 \002(\005\022\021\n\track_name\030\005 \001(\t\"n\n\027ResourceAl" +
8134      "locationProto\022\022\n\nidentifier\030\001 \002(\t\022\027\n\017res" +
8135      "ource_memory\030\002 \002(\005\022\017\n\007node_id\030\003 \002(\t\022\025\n\rv" +
8136      "irtual_cores\030\004 \001(\005\"\211\001\n\023ResourceStatusPro" +
8137      "to\022\022\n\nidentifier\030\001 \002(\t\022\025\n\005state\030\002 \002(\0162\006.",
8138      "State\022\023\n\013diagnostics\030\003 \001(\t\022\021\n\texit_code\030" +
8139      "\004 \001(\005\022\037\n\027is_from_previous_driver\030\005 \001(\010\"\242" +
8140      "\001\n\022RuntimeStatusProto\022\014\n\004name\030\001 \002(\t\022\025\n\005s" +
8141      "tate\030\002 \002(\0162\006.State\022!\n\005error\030\003 \001(\0132\022.Runt" +
8142      "imeErrorProto\022&\n\036outstanding_container_r" +
8143      "equests\030\005 \001(\005\022\034\n\024container_allocation\030\006 " +
8144      "\003(\t\"\252\001\n\024ResourceRequestProto\022\023\n\013memory_s" +
8145      "ize\030\002 \001(\005\022\020\n\010priority\030\003 \001(\005\022\025\n\rvirtual_c" +
8146      "ores\030\004 \001(\005\022\026\n\016resource_count\030\005 \002(\005\022\021\n\tno" +
8147      "de_name\030\006 \003(\t\022\021\n\track_name\030\007 \003(\t\022\026\n\016rela",
8148      "x_locality\030\n \001(\010\"*\n\024ResourceReleaseProto" +
8149      "\022\022\n\nidentifier\030\001 \002(\t\"\222\001\n\023ResourceLaunchP" +
8150      "roto\022\022\n\nidentifier\030\001 \002(\t\022\021\n\tremote_id\030\002 " +
8151      "\002(\t\022\026\n\016evaluator_conf\030\003 \002(\t\022\032\n\004type\030\004 \002(" +
8152      "\0162\014.ProcessType\022 \n\004file\030\n \003(\0132\022.FileReso" +
8153      "urceProtoB4\n\025org.apache.reef.protoB\025Driv" +
8154      "erRuntimeProtocol\210\001\001\240\001\001"
8155    };
8156    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
8157      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
8158        public com.google.protobuf.ExtensionRegistry assignDescriptors(
8159            com.google.protobuf.Descriptors.FileDescriptor root) {
8160          descriptor = root;
8161          internal_static_DriverProcessRegistrationProto_descriptor =
8162            getDescriptor().getMessageTypes().get(0);
8163          internal_static_DriverProcessRegistrationProto_fieldAccessorTable = new
8164            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
8165              internal_static_DriverProcessRegistrationProto_descriptor,
8166              new java.lang.String[] { "RemoteIdentifier", });
8167          internal_static_NodeDescriptorProto_descriptor =
8168            getDescriptor().getMessageTypes().get(1);
8169          internal_static_NodeDescriptorProto_fieldAccessorTable = new
8170            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
8171              internal_static_NodeDescriptorProto_descriptor,
8172              new java.lang.String[] { "Identifier", "HostName", "Port", "MemorySize", "RackName", });
8173          internal_static_ResourceAllocationProto_descriptor =
8174            getDescriptor().getMessageTypes().get(2);
8175          internal_static_ResourceAllocationProto_fieldAccessorTable = new
8176            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
8177              internal_static_ResourceAllocationProto_descriptor,
8178              new java.lang.String[] { "Identifier", "ResourceMemory", "NodeId", "VirtualCores", });
8179          internal_static_ResourceStatusProto_descriptor =
8180            getDescriptor().getMessageTypes().get(3);
8181          internal_static_ResourceStatusProto_fieldAccessorTable = new
8182            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
8183              internal_static_ResourceStatusProto_descriptor,
8184              new java.lang.String[] { "Identifier", "State", "Diagnostics", "ExitCode", "IsFromPreviousDriver", });
8185          internal_static_RuntimeStatusProto_descriptor =
8186            getDescriptor().getMessageTypes().get(4);
8187          internal_static_RuntimeStatusProto_fieldAccessorTable = new
8188            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
8189              internal_static_RuntimeStatusProto_descriptor,
8190              new java.lang.String[] { "Name", "State", "Error", "OutstandingContainerRequests", "ContainerAllocation", });
8191          internal_static_ResourceRequestProto_descriptor =
8192            getDescriptor().getMessageTypes().get(5);
8193          internal_static_ResourceRequestProto_fieldAccessorTable = new
8194            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
8195              internal_static_ResourceRequestProto_descriptor,
8196              new java.lang.String[] { "MemorySize", "Priority", "VirtualCores", "ResourceCount", "NodeName", "RackName", "RelaxLocality", });
8197          internal_static_ResourceReleaseProto_descriptor =
8198            getDescriptor().getMessageTypes().get(6);
8199          internal_static_ResourceReleaseProto_fieldAccessorTable = new
8200            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
8201              internal_static_ResourceReleaseProto_descriptor,
8202              new java.lang.String[] { "Identifier", });
8203          internal_static_ResourceLaunchProto_descriptor =
8204            getDescriptor().getMessageTypes().get(7);
8205          internal_static_ResourceLaunchProto_fieldAccessorTable = new
8206            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
8207              internal_static_ResourceLaunchProto_descriptor,
8208              new java.lang.String[] { "Identifier", "RemoteId", "EvaluatorConf", "Type", "File", });
8209          return null;
8210        }
8211      };
8212    com.google.protobuf.Descriptors.FileDescriptor
8213      .internalBuildGeneratedFileFrom(descriptorData,
8214        new com.google.protobuf.Descriptors.FileDescriptor[] {
8215          org.apache.reef.proto.ReefServiceProtos.getDescriptor(),
8216        }, assigner);
8217  }
8218
8219  // @@protoc_insertion_point(outer_class_scope)
8220}