001// Generated by the protocol buffer compiler. DO NOT EDIT! 002// source: reef_service_protos.proto 003 004package org.apache.reef.proto; 005 006public final class ReefServiceProtos { 007 private ReefServiceProtos() {} 008 public static void registerAllExtensions( 009 com.google.protobuf.ExtensionRegistry registry) { 010 } 011 /** 012 * Protobuf enum {@code State} 013 */ 014 public enum State 015 implements com.google.protobuf.ProtocolMessageEnum { 016 /** 017 * <code>INIT = 0;</code> 018 */ 019 INIT(0, 0), 020 /** 021 * <code>RUNNING = 1;</code> 022 */ 023 RUNNING(1, 1), 024 /** 025 * <code>DONE = 2;</code> 026 */ 027 DONE(2, 2), 028 /** 029 * <code>SUSPEND = 3;</code> 030 */ 031 SUSPEND(3, 3), 032 /** 033 * <code>FAILED = 4;</code> 034 */ 035 FAILED(4, 4), 036 /** 037 * <code>KILLED = 5;</code> 038 */ 039 KILLED(5, 5), 040 ; 041 042 /** 043 * <code>INIT = 0;</code> 044 */ 045 public static final int INIT_VALUE = 0; 046 /** 047 * <code>RUNNING = 1;</code> 048 */ 049 public static final int RUNNING_VALUE = 1; 050 /** 051 * <code>DONE = 2;</code> 052 */ 053 public static final int DONE_VALUE = 2; 054 /** 055 * <code>SUSPEND = 3;</code> 056 */ 057 public static final int SUSPEND_VALUE = 3; 058 /** 059 * <code>FAILED = 4;</code> 060 */ 061 public static final int FAILED_VALUE = 4; 062 /** 063 * <code>KILLED = 5;</code> 064 */ 065 public static final int KILLED_VALUE = 5; 066 067 068 public final int getNumber() { return value; } 069 070 public static State valueOf(int value) { 071 switch (value) { 072 case 0: return INIT; 073 case 1: return RUNNING; 074 case 2: return DONE; 075 case 3: return SUSPEND; 076 case 4: return FAILED; 077 case 5: return KILLED; 078 default: return null; 079 } 080 } 081 082 public static com.google.protobuf.Internal.EnumLiteMap<State> 083 internalGetValueMap() { 084 return internalValueMap; 085 } 086 private static com.google.protobuf.Internal.EnumLiteMap<State> 087 internalValueMap = 088 new com.google.protobuf.Internal.EnumLiteMap<State>() { 089 public State findValueByNumber(int number) { 090 return State.valueOf(number); 091 } 092 }; 093 094 public final com.google.protobuf.Descriptors.EnumValueDescriptor 095 getValueDescriptor() { 096 return getDescriptor().getValues().get(index); 097 } 098 public final com.google.protobuf.Descriptors.EnumDescriptor 099 getDescriptorForType() { 100 return getDescriptor(); 101 } 102 public static final com.google.protobuf.Descriptors.EnumDescriptor 103 getDescriptor() { 104 return org.apache.reef.proto.ReefServiceProtos.getDescriptor().getEnumTypes().get(0); 105 } 106 107 private static final State[] VALUES = values(); 108 109 public static State valueOf( 110 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 111 if (desc.getType() != getDescriptor()) { 112 throw new java.lang.IllegalArgumentException( 113 "EnumValueDescriptor is not for this type."); 114 } 115 return VALUES[desc.getIndex()]; 116 } 117 118 private final int index; 119 private final int value; 120 121 private State(int index, int value) { 122 this.index = index; 123 this.value = value; 124 } 125 126 // @@protoc_insertion_point(enum_scope:State) 127 } 128 129 public interface RuntimeErrorProtoOrBuilder 130 extends com.google.protobuf.MessageOrBuilder { 131 132 // required string name = 1; 133 /** 134 * <code>required string name = 1;</code> 135 * 136 * <pre> 137 * e.g., local, yarn21 138 * </pre> 139 */ 140 boolean hasName(); 141 /** 142 * <code>required string name = 1;</code> 143 * 144 * <pre> 145 * e.g., local, yarn21 146 * </pre> 147 */ 148 java.lang.String getName(); 149 /** 150 * <code>required string name = 1;</code> 151 * 152 * <pre> 153 * e.g., local, yarn21 154 * </pre> 155 */ 156 com.google.protobuf.ByteString 157 getNameBytes(); 158 159 // required string message = 2; 160 /** 161 * <code>required string message = 2;</code> 162 */ 163 boolean hasMessage(); 164 /** 165 * <code>required string message = 2;</code> 166 */ 167 java.lang.String getMessage(); 168 /** 169 * <code>required string message = 2;</code> 170 */ 171 com.google.protobuf.ByteString 172 getMessageBytes(); 173 174 // optional bytes exception = 3; 175 /** 176 * <code>optional bytes exception = 3;</code> 177 */ 178 boolean hasException(); 179 /** 180 * <code>optional bytes exception = 3;</code> 181 */ 182 com.google.protobuf.ByteString getException(); 183 184 // optional string identifier = 5; 185 /** 186 * <code>optional string identifier = 5;</code> 187 * 188 * <pre> 189 * e.g., evaluator id 190 * </pre> 191 */ 192 boolean hasIdentifier(); 193 /** 194 * <code>optional string identifier = 5;</code> 195 * 196 * <pre> 197 * e.g., evaluator id 198 * </pre> 199 */ 200 java.lang.String getIdentifier(); 201 /** 202 * <code>optional string identifier = 5;</code> 203 * 204 * <pre> 205 * e.g., evaluator id 206 * </pre> 207 */ 208 com.google.protobuf.ByteString 209 getIdentifierBytes(); 210 } 211 /** 212 * Protobuf type {@code RuntimeErrorProto} 213 */ 214 public static final class RuntimeErrorProto extends 215 com.google.protobuf.GeneratedMessage 216 implements RuntimeErrorProtoOrBuilder { 217 // Use RuntimeErrorProto.newBuilder() to construct. 218 private RuntimeErrorProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) { 219 super(builder); 220 this.unknownFields = builder.getUnknownFields(); 221 } 222 private RuntimeErrorProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } 223 224 private static final RuntimeErrorProto defaultInstance; 225 public static RuntimeErrorProto getDefaultInstance() { 226 return defaultInstance; 227 } 228 229 public RuntimeErrorProto getDefaultInstanceForType() { 230 return defaultInstance; 231 } 232 233 private final com.google.protobuf.UnknownFieldSet unknownFields; 234 @java.lang.Override 235 public final com.google.protobuf.UnknownFieldSet 236 getUnknownFields() { 237 return this.unknownFields; 238 } 239 private RuntimeErrorProto( 240 com.google.protobuf.CodedInputStream input, 241 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 242 throws com.google.protobuf.InvalidProtocolBufferException { 243 initFields(); 244 int mutable_bitField0_ = 0; 245 com.google.protobuf.UnknownFieldSet.Builder unknownFields = 246 com.google.protobuf.UnknownFieldSet.newBuilder(); 247 try { 248 boolean done = false; 249 while (!done) { 250 int tag = input.readTag(); 251 switch (tag) { 252 case 0: 253 done = true; 254 break; 255 default: { 256 if (!parseUnknownField(input, unknownFields, 257 extensionRegistry, tag)) { 258 done = true; 259 } 260 break; 261 } 262 case 10: { 263 bitField0_ |= 0x00000001; 264 name_ = input.readBytes(); 265 break; 266 } 267 case 18: { 268 bitField0_ |= 0x00000002; 269 message_ = input.readBytes(); 270 break; 271 } 272 case 26: { 273 bitField0_ |= 0x00000004; 274 exception_ = input.readBytes(); 275 break; 276 } 277 case 42: { 278 bitField0_ |= 0x00000008; 279 identifier_ = input.readBytes(); 280 break; 281 } 282 } 283 } 284 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 285 throw e.setUnfinishedMessage(this); 286 } catch (java.io.IOException e) { 287 throw new com.google.protobuf.InvalidProtocolBufferException( 288 e.getMessage()).setUnfinishedMessage(this); 289 } finally { 290 this.unknownFields = unknownFields.build(); 291 makeExtensionsImmutable(); 292 } 293 } 294 public static final com.google.protobuf.Descriptors.Descriptor 295 getDescriptor() { 296 return org.apache.reef.proto.ReefServiceProtos.internal_static_RuntimeErrorProto_descriptor; 297 } 298 299 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 300 internalGetFieldAccessorTable() { 301 return org.apache.reef.proto.ReefServiceProtos.internal_static_RuntimeErrorProto_fieldAccessorTable 302 .ensureFieldAccessorsInitialized( 303 org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.class, org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.Builder.class); 304 } 305 306 public static com.google.protobuf.Parser<RuntimeErrorProto> PARSER = 307 new com.google.protobuf.AbstractParser<RuntimeErrorProto>() { 308 public RuntimeErrorProto parsePartialFrom( 309 com.google.protobuf.CodedInputStream input, 310 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 311 throws com.google.protobuf.InvalidProtocolBufferException { 312 return new RuntimeErrorProto(input, extensionRegistry); 313 } 314 }; 315 316 @java.lang.Override 317 public com.google.protobuf.Parser<RuntimeErrorProto> getParserForType() { 318 return PARSER; 319 } 320 321 private int bitField0_; 322 // required string name = 1; 323 public static final int NAME_FIELD_NUMBER = 1; 324 private java.lang.Object name_; 325 /** 326 * <code>required string name = 1;</code> 327 * 328 * <pre> 329 * e.g., local, yarn21 330 * </pre> 331 */ 332 public boolean hasName() { 333 return ((bitField0_ & 0x00000001) == 0x00000001); 334 } 335 /** 336 * <code>required string name = 1;</code> 337 * 338 * <pre> 339 * e.g., local, yarn21 340 * </pre> 341 */ 342 public java.lang.String getName() { 343 java.lang.Object ref = name_; 344 if (ref instanceof java.lang.String) { 345 return (java.lang.String) ref; 346 } else { 347 com.google.protobuf.ByteString bs = 348 (com.google.protobuf.ByteString) ref; 349 java.lang.String s = bs.toStringUtf8(); 350 if (bs.isValidUtf8()) { 351 name_ = s; 352 } 353 return s; 354 } 355 } 356 /** 357 * <code>required string name = 1;</code> 358 * 359 * <pre> 360 * e.g., local, yarn21 361 * </pre> 362 */ 363 public com.google.protobuf.ByteString 364 getNameBytes() { 365 java.lang.Object ref = name_; 366 if (ref instanceof java.lang.String) { 367 com.google.protobuf.ByteString b = 368 com.google.protobuf.ByteString.copyFromUtf8( 369 (java.lang.String) ref); 370 name_ = b; 371 return b; 372 } else { 373 return (com.google.protobuf.ByteString) ref; 374 } 375 } 376 377 // required string message = 2; 378 public static final int MESSAGE_FIELD_NUMBER = 2; 379 private java.lang.Object message_; 380 /** 381 * <code>required string message = 2;</code> 382 */ 383 public boolean hasMessage() { 384 return ((bitField0_ & 0x00000002) == 0x00000002); 385 } 386 /** 387 * <code>required string message = 2;</code> 388 */ 389 public java.lang.String getMessage() { 390 java.lang.Object ref = message_; 391 if (ref instanceof java.lang.String) { 392 return (java.lang.String) ref; 393 } else { 394 com.google.protobuf.ByteString bs = 395 (com.google.protobuf.ByteString) ref; 396 java.lang.String s = bs.toStringUtf8(); 397 if (bs.isValidUtf8()) { 398 message_ = s; 399 } 400 return s; 401 } 402 } 403 /** 404 * <code>required string message = 2;</code> 405 */ 406 public com.google.protobuf.ByteString 407 getMessageBytes() { 408 java.lang.Object ref = message_; 409 if (ref instanceof java.lang.String) { 410 com.google.protobuf.ByteString b = 411 com.google.protobuf.ByteString.copyFromUtf8( 412 (java.lang.String) ref); 413 message_ = b; 414 return b; 415 } else { 416 return (com.google.protobuf.ByteString) ref; 417 } 418 } 419 420 // optional bytes exception = 3; 421 public static final int EXCEPTION_FIELD_NUMBER = 3; 422 private com.google.protobuf.ByteString exception_; 423 /** 424 * <code>optional bytes exception = 3;</code> 425 */ 426 public boolean hasException() { 427 return ((bitField0_ & 0x00000004) == 0x00000004); 428 } 429 /** 430 * <code>optional bytes exception = 3;</code> 431 */ 432 public com.google.protobuf.ByteString getException() { 433 return exception_; 434 } 435 436 // optional string identifier = 5; 437 public static final int IDENTIFIER_FIELD_NUMBER = 5; 438 private java.lang.Object identifier_; 439 /** 440 * <code>optional string identifier = 5;</code> 441 * 442 * <pre> 443 * e.g., evaluator id 444 * </pre> 445 */ 446 public boolean hasIdentifier() { 447 return ((bitField0_ & 0x00000008) == 0x00000008); 448 } 449 /** 450 * <code>optional string identifier = 5;</code> 451 * 452 * <pre> 453 * e.g., evaluator id 454 * </pre> 455 */ 456 public java.lang.String getIdentifier() { 457 java.lang.Object ref = identifier_; 458 if (ref instanceof java.lang.String) { 459 return (java.lang.String) ref; 460 } else { 461 com.google.protobuf.ByteString bs = 462 (com.google.protobuf.ByteString) ref; 463 java.lang.String s = bs.toStringUtf8(); 464 if (bs.isValidUtf8()) { 465 identifier_ = s; 466 } 467 return s; 468 } 469 } 470 /** 471 * <code>optional string identifier = 5;</code> 472 * 473 * <pre> 474 * e.g., evaluator id 475 * </pre> 476 */ 477 public com.google.protobuf.ByteString 478 getIdentifierBytes() { 479 java.lang.Object ref = identifier_; 480 if (ref instanceof java.lang.String) { 481 com.google.protobuf.ByteString b = 482 com.google.protobuf.ByteString.copyFromUtf8( 483 (java.lang.String) ref); 484 identifier_ = b; 485 return b; 486 } else { 487 return (com.google.protobuf.ByteString) ref; 488 } 489 } 490 491 private void initFields() { 492 name_ = ""; 493 message_ = ""; 494 exception_ = com.google.protobuf.ByteString.EMPTY; 495 identifier_ = ""; 496 } 497 private byte memoizedIsInitialized = -1; 498 public final boolean isInitialized() { 499 byte isInitialized = memoizedIsInitialized; 500 if (isInitialized != -1) return isInitialized == 1; 501 502 if (!hasName()) { 503 memoizedIsInitialized = 0; 504 return false; 505 } 506 if (!hasMessage()) { 507 memoizedIsInitialized = 0; 508 return false; 509 } 510 memoizedIsInitialized = 1; 511 return true; 512 } 513 514 public void writeTo(com.google.protobuf.CodedOutputStream output) 515 throws java.io.IOException { 516 getSerializedSize(); 517 if (((bitField0_ & 0x00000001) == 0x00000001)) { 518 output.writeBytes(1, getNameBytes()); 519 } 520 if (((bitField0_ & 0x00000002) == 0x00000002)) { 521 output.writeBytes(2, getMessageBytes()); 522 } 523 if (((bitField0_ & 0x00000004) == 0x00000004)) { 524 output.writeBytes(3, exception_); 525 } 526 if (((bitField0_ & 0x00000008) == 0x00000008)) { 527 output.writeBytes(5, getIdentifierBytes()); 528 } 529 getUnknownFields().writeTo(output); 530 } 531 532 private int memoizedSerializedSize = -1; 533 public int getSerializedSize() { 534 int size = memoizedSerializedSize; 535 if (size != -1) return size; 536 537 size = 0; 538 if (((bitField0_ & 0x00000001) == 0x00000001)) { 539 size += com.google.protobuf.CodedOutputStream 540 .computeBytesSize(1, getNameBytes()); 541 } 542 if (((bitField0_ & 0x00000002) == 0x00000002)) { 543 size += com.google.protobuf.CodedOutputStream 544 .computeBytesSize(2, getMessageBytes()); 545 } 546 if (((bitField0_ & 0x00000004) == 0x00000004)) { 547 size += com.google.protobuf.CodedOutputStream 548 .computeBytesSize(3, exception_); 549 } 550 if (((bitField0_ & 0x00000008) == 0x00000008)) { 551 size += com.google.protobuf.CodedOutputStream 552 .computeBytesSize(5, getIdentifierBytes()); 553 } 554 size += getUnknownFields().getSerializedSize(); 555 memoizedSerializedSize = size; 556 return size; 557 } 558 559 private static final long serialVersionUID = 0L; 560 @java.lang.Override 561 protected java.lang.Object writeReplace() 562 throws java.io.ObjectStreamException { 563 return super.writeReplace(); 564 } 565 566 @java.lang.Override 567 public boolean equals(final java.lang.Object obj) { 568 if (obj == this) { 569 return true; 570 } 571 if (!(obj instanceof org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto)) { 572 return super.equals(obj); 573 } 574 org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto other = (org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto) obj; 575 576 boolean result = true; 577 result = result && (hasName() == other.hasName()); 578 if (hasName()) { 579 result = result && getName() 580 .equals(other.getName()); 581 } 582 result = result && (hasMessage() == other.hasMessage()); 583 if (hasMessage()) { 584 result = result && getMessage() 585 .equals(other.getMessage()); 586 } 587 result = result && (hasException() == other.hasException()); 588 if (hasException()) { 589 result = result && getException() 590 .equals(other.getException()); 591 } 592 result = result && (hasIdentifier() == other.hasIdentifier()); 593 if (hasIdentifier()) { 594 result = result && getIdentifier() 595 .equals(other.getIdentifier()); 596 } 597 result = result && 598 getUnknownFields().equals(other.getUnknownFields()); 599 return result; 600 } 601 602 private int memoizedHashCode = 0; 603 @java.lang.Override 604 public int hashCode() { 605 if (memoizedHashCode != 0) { 606 return memoizedHashCode; 607 } 608 int hash = 41; 609 hash = (19 * hash) + getDescriptorForType().hashCode(); 610 if (hasName()) { 611 hash = (37 * hash) + NAME_FIELD_NUMBER; 612 hash = (53 * hash) + getName().hashCode(); 613 } 614 if (hasMessage()) { 615 hash = (37 * hash) + MESSAGE_FIELD_NUMBER; 616 hash = (53 * hash) + getMessage().hashCode(); 617 } 618 if (hasException()) { 619 hash = (37 * hash) + EXCEPTION_FIELD_NUMBER; 620 hash = (53 * hash) + getException().hashCode(); 621 } 622 if (hasIdentifier()) { 623 hash = (37 * hash) + IDENTIFIER_FIELD_NUMBER; 624 hash = (53 * hash) + getIdentifier().hashCode(); 625 } 626 hash = (29 * hash) + getUnknownFields().hashCode(); 627 memoizedHashCode = hash; 628 return hash; 629 } 630 631 public static org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto parseFrom( 632 com.google.protobuf.ByteString data) 633 throws com.google.protobuf.InvalidProtocolBufferException { 634 return PARSER.parseFrom(data); 635 } 636 public static org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto parseFrom( 637 com.google.protobuf.ByteString data, 638 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 639 throws com.google.protobuf.InvalidProtocolBufferException { 640 return PARSER.parseFrom(data, extensionRegistry); 641 } 642 public static org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto parseFrom(byte[] data) 643 throws com.google.protobuf.InvalidProtocolBufferException { 644 return PARSER.parseFrom(data); 645 } 646 public static org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto parseFrom( 647 byte[] data, 648 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 649 throws com.google.protobuf.InvalidProtocolBufferException { 650 return PARSER.parseFrom(data, extensionRegistry); 651 } 652 public static org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto parseFrom(java.io.InputStream input) 653 throws java.io.IOException { 654 return PARSER.parseFrom(input); 655 } 656 public static org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto parseFrom( 657 java.io.InputStream input, 658 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 659 throws java.io.IOException { 660 return PARSER.parseFrom(input, extensionRegistry); 661 } 662 public static org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto parseDelimitedFrom(java.io.InputStream input) 663 throws java.io.IOException { 664 return PARSER.parseDelimitedFrom(input); 665 } 666 public static org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto parseDelimitedFrom( 667 java.io.InputStream input, 668 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 669 throws java.io.IOException { 670 return PARSER.parseDelimitedFrom(input, extensionRegistry); 671 } 672 public static org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto parseFrom( 673 com.google.protobuf.CodedInputStream input) 674 throws java.io.IOException { 675 return PARSER.parseFrom(input); 676 } 677 public static org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto parseFrom( 678 com.google.protobuf.CodedInputStream input, 679 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 680 throws java.io.IOException { 681 return PARSER.parseFrom(input, extensionRegistry); 682 } 683 684 public static Builder newBuilder() { return Builder.create(); } 685 public Builder newBuilderForType() { return newBuilder(); } 686 public static Builder newBuilder(org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto prototype) { 687 return newBuilder().mergeFrom(prototype); 688 } 689 public Builder toBuilder() { return newBuilder(this); } 690 691 @java.lang.Override 692 protected Builder newBuilderForType( 693 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 694 Builder builder = new Builder(parent); 695 return builder; 696 } 697 /** 698 * Protobuf type {@code RuntimeErrorProto} 699 */ 700 public static final class Builder extends 701 com.google.protobuf.GeneratedMessage.Builder<Builder> 702 implements org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProtoOrBuilder { 703 public static final com.google.protobuf.Descriptors.Descriptor 704 getDescriptor() { 705 return org.apache.reef.proto.ReefServiceProtos.internal_static_RuntimeErrorProto_descriptor; 706 } 707 708 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 709 internalGetFieldAccessorTable() { 710 return org.apache.reef.proto.ReefServiceProtos.internal_static_RuntimeErrorProto_fieldAccessorTable 711 .ensureFieldAccessorsInitialized( 712 org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.class, org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.Builder.class); 713 } 714 715 // Construct using org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.newBuilder() 716 private Builder() { 717 maybeForceBuilderInitialization(); 718 } 719 720 private Builder( 721 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 722 super(parent); 723 maybeForceBuilderInitialization(); 724 } 725 private void maybeForceBuilderInitialization() { 726 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { 727 } 728 } 729 private static Builder create() { 730 return new Builder(); 731 } 732 733 public Builder clear() { 734 super.clear(); 735 name_ = ""; 736 bitField0_ = (bitField0_ & ~0x00000001); 737 message_ = ""; 738 bitField0_ = (bitField0_ & ~0x00000002); 739 exception_ = com.google.protobuf.ByteString.EMPTY; 740 bitField0_ = (bitField0_ & ~0x00000004); 741 identifier_ = ""; 742 bitField0_ = (bitField0_ & ~0x00000008); 743 return this; 744 } 745 746 public Builder clone() { 747 return create().mergeFrom(buildPartial()); 748 } 749 750 public com.google.protobuf.Descriptors.Descriptor 751 getDescriptorForType() { 752 return org.apache.reef.proto.ReefServiceProtos.internal_static_RuntimeErrorProto_descriptor; 753 } 754 755 public org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto getDefaultInstanceForType() { 756 return org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.getDefaultInstance(); 757 } 758 759 public org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto build() { 760 org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto result = buildPartial(); 761 if (!result.isInitialized()) { 762 throw newUninitializedMessageException(result); 763 } 764 return result; 765 } 766 767 public org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto buildPartial() { 768 org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto result = new org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto(this); 769 int from_bitField0_ = bitField0_; 770 int to_bitField0_ = 0; 771 if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 772 to_bitField0_ |= 0x00000001; 773 } 774 result.name_ = name_; 775 if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 776 to_bitField0_ |= 0x00000002; 777 } 778 result.message_ = message_; 779 if (((from_bitField0_ & 0x00000004) == 0x00000004)) { 780 to_bitField0_ |= 0x00000004; 781 } 782 result.exception_ = exception_; 783 if (((from_bitField0_ & 0x00000008) == 0x00000008)) { 784 to_bitField0_ |= 0x00000008; 785 } 786 result.identifier_ = identifier_; 787 result.bitField0_ = to_bitField0_; 788 onBuilt(); 789 return result; 790 } 791 792 public Builder mergeFrom(com.google.protobuf.Message other) { 793 if (other instanceof org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto) { 794 return mergeFrom((org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto)other); 795 } else { 796 super.mergeFrom(other); 797 return this; 798 } 799 } 800 801 public Builder mergeFrom(org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto other) { 802 if (other == org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto.getDefaultInstance()) return this; 803 if (other.hasName()) { 804 bitField0_ |= 0x00000001; 805 name_ = other.name_; 806 onChanged(); 807 } 808 if (other.hasMessage()) { 809 bitField0_ |= 0x00000002; 810 message_ = other.message_; 811 onChanged(); 812 } 813 if (other.hasException()) { 814 setException(other.getException()); 815 } 816 if (other.hasIdentifier()) { 817 bitField0_ |= 0x00000008; 818 identifier_ = other.identifier_; 819 onChanged(); 820 } 821 this.mergeUnknownFields(other.getUnknownFields()); 822 return this; 823 } 824 825 public final boolean isInitialized() { 826 if (!hasName()) { 827 828 return false; 829 } 830 if (!hasMessage()) { 831 832 return false; 833 } 834 return true; 835 } 836 837 public Builder mergeFrom( 838 com.google.protobuf.CodedInputStream input, 839 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 840 throws java.io.IOException { 841 org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto parsedMessage = null; 842 try { 843 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 844 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 845 parsedMessage = (org.apache.reef.proto.ReefServiceProtos.RuntimeErrorProto) e.getUnfinishedMessage(); 846 throw e; 847 } finally { 848 if (parsedMessage != null) { 849 mergeFrom(parsedMessage); 850 } 851 } 852 return this; 853 } 854 private int bitField0_; 855 856 // required string name = 1; 857 private java.lang.Object name_ = ""; 858 /** 859 * <code>required string name = 1;</code> 860 * 861 * <pre> 862 * e.g., local, yarn21 863 * </pre> 864 */ 865 public boolean hasName() { 866 return ((bitField0_ & 0x00000001) == 0x00000001); 867 } 868 /** 869 * <code>required string name = 1;</code> 870 * 871 * <pre> 872 * e.g., local, yarn21 873 * </pre> 874 */ 875 public java.lang.String getName() { 876 java.lang.Object ref = name_; 877 if (!(ref instanceof java.lang.String)) { 878 java.lang.String s = ((com.google.protobuf.ByteString) ref) 879 .toStringUtf8(); 880 name_ = s; 881 return s; 882 } else { 883 return (java.lang.String) ref; 884 } 885 } 886 /** 887 * <code>required string name = 1;</code> 888 * 889 * <pre> 890 * e.g., local, yarn21 891 * </pre> 892 */ 893 public com.google.protobuf.ByteString 894 getNameBytes() { 895 java.lang.Object ref = name_; 896 if (ref instanceof String) { 897 com.google.protobuf.ByteString b = 898 com.google.protobuf.ByteString.copyFromUtf8( 899 (java.lang.String) ref); 900 name_ = b; 901 return b; 902 } else { 903 return (com.google.protobuf.ByteString) ref; 904 } 905 } 906 /** 907 * <code>required string name = 1;</code> 908 * 909 * <pre> 910 * e.g., local, yarn21 911 * </pre> 912 */ 913 public Builder setName( 914 java.lang.String value) { 915 if (value == null) { 916 throw new NullPointerException(); 917 } 918 bitField0_ |= 0x00000001; 919 name_ = value; 920 onChanged(); 921 return this; 922 } 923 /** 924 * <code>required string name = 1;</code> 925 * 926 * <pre> 927 * e.g., local, yarn21 928 * </pre> 929 */ 930 public Builder clearName() { 931 bitField0_ = (bitField0_ & ~0x00000001); 932 name_ = getDefaultInstance().getName(); 933 onChanged(); 934 return this; 935 } 936 /** 937 * <code>required string name = 1;</code> 938 * 939 * <pre> 940 * e.g., local, yarn21 941 * </pre> 942 */ 943 public Builder setNameBytes( 944 com.google.protobuf.ByteString value) { 945 if (value == null) { 946 throw new NullPointerException(); 947 } 948 bitField0_ |= 0x00000001; 949 name_ = value; 950 onChanged(); 951 return this; 952 } 953 954 // required string message = 2; 955 private java.lang.Object message_ = ""; 956 /** 957 * <code>required string message = 2;</code> 958 */ 959 public boolean hasMessage() { 960 return ((bitField0_ & 0x00000002) == 0x00000002); 961 } 962 /** 963 * <code>required string message = 2;</code> 964 */ 965 public java.lang.String getMessage() { 966 java.lang.Object ref = message_; 967 if (!(ref instanceof java.lang.String)) { 968 java.lang.String s = ((com.google.protobuf.ByteString) ref) 969 .toStringUtf8(); 970 message_ = s; 971 return s; 972 } else { 973 return (java.lang.String) ref; 974 } 975 } 976 /** 977 * <code>required string message = 2;</code> 978 */ 979 public com.google.protobuf.ByteString 980 getMessageBytes() { 981 java.lang.Object ref = message_; 982 if (ref instanceof String) { 983 com.google.protobuf.ByteString b = 984 com.google.protobuf.ByteString.copyFromUtf8( 985 (java.lang.String) ref); 986 message_ = b; 987 return b; 988 } else { 989 return (com.google.protobuf.ByteString) ref; 990 } 991 } 992 /** 993 * <code>required string message = 2;</code> 994 */ 995 public Builder setMessage( 996 java.lang.String value) { 997 if (value == null) { 998 throw new NullPointerException(); 999 } 1000 bitField0_ |= 0x00000002; 1001 message_ = value; 1002 onChanged(); 1003 return this; 1004 } 1005 /** 1006 * <code>required string message = 2;</code> 1007 */ 1008 public Builder clearMessage() { 1009 bitField0_ = (bitField0_ & ~0x00000002); 1010 message_ = getDefaultInstance().getMessage(); 1011 onChanged(); 1012 return this; 1013 } 1014 /** 1015 * <code>required string message = 2;</code> 1016 */ 1017 public Builder setMessageBytes( 1018 com.google.protobuf.ByteString value) { 1019 if (value == null) { 1020 throw new NullPointerException(); 1021 } 1022 bitField0_ |= 0x00000002; 1023 message_ = value; 1024 onChanged(); 1025 return this; 1026 } 1027 1028 // optional bytes exception = 3; 1029 private com.google.protobuf.ByteString exception_ = com.google.protobuf.ByteString.EMPTY; 1030 /** 1031 * <code>optional bytes exception = 3;</code> 1032 */ 1033 public boolean hasException() { 1034 return ((bitField0_ & 0x00000004) == 0x00000004); 1035 } 1036 /** 1037 * <code>optional bytes exception = 3;</code> 1038 */ 1039 public com.google.protobuf.ByteString getException() { 1040 return exception_; 1041 } 1042 /** 1043 * <code>optional bytes exception = 3;</code> 1044 */ 1045 public Builder setException(com.google.protobuf.ByteString value) { 1046 if (value == null) { 1047 throw new NullPointerException(); 1048 } 1049 bitField0_ |= 0x00000004; 1050 exception_ = value; 1051 onChanged(); 1052 return this; 1053 } 1054 /** 1055 * <code>optional bytes exception = 3;</code> 1056 */ 1057 public Builder clearException() { 1058 bitField0_ = (bitField0_ & ~0x00000004); 1059 exception_ = getDefaultInstance().getException(); 1060 onChanged(); 1061 return this; 1062 } 1063 1064 // optional string identifier = 5; 1065 private java.lang.Object identifier_ = ""; 1066 /** 1067 * <code>optional string identifier = 5;</code> 1068 * 1069 * <pre> 1070 * e.g., evaluator id 1071 * </pre> 1072 */ 1073 public boolean hasIdentifier() { 1074 return ((bitField0_ & 0x00000008) == 0x00000008); 1075 } 1076 /** 1077 * <code>optional string identifier = 5;</code> 1078 * 1079 * <pre> 1080 * e.g., evaluator id 1081 * </pre> 1082 */ 1083 public java.lang.String getIdentifier() { 1084 java.lang.Object ref = identifier_; 1085 if (!(ref instanceof java.lang.String)) { 1086 java.lang.String s = ((com.google.protobuf.ByteString) ref) 1087 .toStringUtf8(); 1088 identifier_ = s; 1089 return s; 1090 } else { 1091 return (java.lang.String) ref; 1092 } 1093 } 1094 /** 1095 * <code>optional string identifier = 5;</code> 1096 * 1097 * <pre> 1098 * e.g., evaluator id 1099 * </pre> 1100 */ 1101 public com.google.protobuf.ByteString 1102 getIdentifierBytes() { 1103 java.lang.Object ref = identifier_; 1104 if (ref instanceof String) { 1105 com.google.protobuf.ByteString b = 1106 com.google.protobuf.ByteString.copyFromUtf8( 1107 (java.lang.String) ref); 1108 identifier_ = b; 1109 return b; 1110 } else { 1111 return (com.google.protobuf.ByteString) ref; 1112 } 1113 } 1114 /** 1115 * <code>optional string identifier = 5;</code> 1116 * 1117 * <pre> 1118 * e.g., evaluator id 1119 * </pre> 1120 */ 1121 public Builder setIdentifier( 1122 java.lang.String value) { 1123 if (value == null) { 1124 throw new NullPointerException(); 1125 } 1126 bitField0_ |= 0x00000008; 1127 identifier_ = value; 1128 onChanged(); 1129 return this; 1130 } 1131 /** 1132 * <code>optional string identifier = 5;</code> 1133 * 1134 * <pre> 1135 * e.g., evaluator id 1136 * </pre> 1137 */ 1138 public Builder clearIdentifier() { 1139 bitField0_ = (bitField0_ & ~0x00000008); 1140 identifier_ = getDefaultInstance().getIdentifier(); 1141 onChanged(); 1142 return this; 1143 } 1144 /** 1145 * <code>optional string identifier = 5;</code> 1146 * 1147 * <pre> 1148 * e.g., evaluator id 1149 * </pre> 1150 */ 1151 public Builder setIdentifierBytes( 1152 com.google.protobuf.ByteString value) { 1153 if (value == null) { 1154 throw new NullPointerException(); 1155 } 1156 bitField0_ |= 0x00000008; 1157 identifier_ = value; 1158 onChanged(); 1159 return this; 1160 } 1161 1162 // @@protoc_insertion_point(builder_scope:RuntimeErrorProto) 1163 } 1164 1165 static { 1166 defaultInstance = new RuntimeErrorProto(true); 1167 defaultInstance.initFields(); 1168 } 1169 1170 // @@protoc_insertion_point(class_scope:RuntimeErrorProto) 1171 } 1172 1173 public interface JobStatusProtoOrBuilder 1174 extends com.google.protobuf.MessageOrBuilder { 1175 1176 // required string identifier = 1; 1177 /** 1178 * <code>required string identifier = 1;</code> 1179 */ 1180 boolean hasIdentifier(); 1181 /** 1182 * <code>required string identifier = 1;</code> 1183 */ 1184 java.lang.String getIdentifier(); 1185 /** 1186 * <code>required string identifier = 1;</code> 1187 */ 1188 com.google.protobuf.ByteString 1189 getIdentifierBytes(); 1190 1191 // required .State state = 2; 1192 /** 1193 * <code>required .State state = 2;</code> 1194 */ 1195 boolean hasState(); 1196 /** 1197 * <code>required .State state = 2;</code> 1198 */ 1199 org.apache.reef.proto.ReefServiceProtos.State getState(); 1200 1201 // optional bytes message = 3; 1202 /** 1203 * <code>optional bytes message = 3;</code> 1204 */ 1205 boolean hasMessage(); 1206 /** 1207 * <code>optional bytes message = 3;</code> 1208 */ 1209 com.google.protobuf.ByteString getMessage(); 1210 1211 // optional bytes exception = 4; 1212 /** 1213 * <code>optional bytes exception = 4;</code> 1214 */ 1215 boolean hasException(); 1216 /** 1217 * <code>optional bytes exception = 4;</code> 1218 */ 1219 com.google.protobuf.ByteString getException(); 1220 } 1221 /** 1222 * Protobuf type {@code JobStatusProto} 1223 */ 1224 public static final class JobStatusProto extends 1225 com.google.protobuf.GeneratedMessage 1226 implements JobStatusProtoOrBuilder { 1227 // Use JobStatusProto.newBuilder() to construct. 1228 private JobStatusProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) { 1229 super(builder); 1230 this.unknownFields = builder.getUnknownFields(); 1231 } 1232 private JobStatusProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } 1233 1234 private static final JobStatusProto defaultInstance; 1235 public static JobStatusProto getDefaultInstance() { 1236 return defaultInstance; 1237 } 1238 1239 public JobStatusProto getDefaultInstanceForType() { 1240 return defaultInstance; 1241 } 1242 1243 private final com.google.protobuf.UnknownFieldSet unknownFields; 1244 @java.lang.Override 1245 public final com.google.protobuf.UnknownFieldSet 1246 getUnknownFields() { 1247 return this.unknownFields; 1248 } 1249 private JobStatusProto( 1250 com.google.protobuf.CodedInputStream input, 1251 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1252 throws com.google.protobuf.InvalidProtocolBufferException { 1253 initFields(); 1254 int mutable_bitField0_ = 0; 1255 com.google.protobuf.UnknownFieldSet.Builder unknownFields = 1256 com.google.protobuf.UnknownFieldSet.newBuilder(); 1257 try { 1258 boolean done = false; 1259 while (!done) { 1260 int tag = input.readTag(); 1261 switch (tag) { 1262 case 0: 1263 done = true; 1264 break; 1265 default: { 1266 if (!parseUnknownField(input, unknownFields, 1267 extensionRegistry, tag)) { 1268 done = true; 1269 } 1270 break; 1271 } 1272 case 10: { 1273 bitField0_ |= 0x00000001; 1274 identifier_ = input.readBytes(); 1275 break; 1276 } 1277 case 16: { 1278 int rawValue = input.readEnum(); 1279 org.apache.reef.proto.ReefServiceProtos.State value = org.apache.reef.proto.ReefServiceProtos.State.valueOf(rawValue); 1280 if (value == null) { 1281 unknownFields.mergeVarintField(2, rawValue); 1282 } else { 1283 bitField0_ |= 0x00000002; 1284 state_ = value; 1285 } 1286 break; 1287 } 1288 case 26: { 1289 bitField0_ |= 0x00000004; 1290 message_ = input.readBytes(); 1291 break; 1292 } 1293 case 34: { 1294 bitField0_ |= 0x00000008; 1295 exception_ = input.readBytes(); 1296 break; 1297 } 1298 } 1299 } 1300 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1301 throw e.setUnfinishedMessage(this); 1302 } catch (java.io.IOException e) { 1303 throw new com.google.protobuf.InvalidProtocolBufferException( 1304 e.getMessage()).setUnfinishedMessage(this); 1305 } finally { 1306 this.unknownFields = unknownFields.build(); 1307 makeExtensionsImmutable(); 1308 } 1309 } 1310 public static final com.google.protobuf.Descriptors.Descriptor 1311 getDescriptor() { 1312 return org.apache.reef.proto.ReefServiceProtos.internal_static_JobStatusProto_descriptor; 1313 } 1314 1315 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 1316 internalGetFieldAccessorTable() { 1317 return org.apache.reef.proto.ReefServiceProtos.internal_static_JobStatusProto_fieldAccessorTable 1318 .ensureFieldAccessorsInitialized( 1319 org.apache.reef.proto.ReefServiceProtos.JobStatusProto.class, org.apache.reef.proto.ReefServiceProtos.JobStatusProto.Builder.class); 1320 } 1321 1322 public static com.google.protobuf.Parser<JobStatusProto> PARSER = 1323 new com.google.protobuf.AbstractParser<JobStatusProto>() { 1324 public JobStatusProto parsePartialFrom( 1325 com.google.protobuf.CodedInputStream input, 1326 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1327 throws com.google.protobuf.InvalidProtocolBufferException { 1328 return new JobStatusProto(input, extensionRegistry); 1329 } 1330 }; 1331 1332 @java.lang.Override 1333 public com.google.protobuf.Parser<JobStatusProto> getParserForType() { 1334 return PARSER; 1335 } 1336 1337 private int bitField0_; 1338 // required string identifier = 1; 1339 public static final int IDENTIFIER_FIELD_NUMBER = 1; 1340 private java.lang.Object identifier_; 1341 /** 1342 * <code>required string identifier = 1;</code> 1343 */ 1344 public boolean hasIdentifier() { 1345 return ((bitField0_ & 0x00000001) == 0x00000001); 1346 } 1347 /** 1348 * <code>required string identifier = 1;</code> 1349 */ 1350 public java.lang.String getIdentifier() { 1351 java.lang.Object ref = identifier_; 1352 if (ref instanceof java.lang.String) { 1353 return (java.lang.String) ref; 1354 } else { 1355 com.google.protobuf.ByteString bs = 1356 (com.google.protobuf.ByteString) ref; 1357 java.lang.String s = bs.toStringUtf8(); 1358 if (bs.isValidUtf8()) { 1359 identifier_ = s; 1360 } 1361 return s; 1362 } 1363 } 1364 /** 1365 * <code>required string identifier = 1;</code> 1366 */ 1367 public com.google.protobuf.ByteString 1368 getIdentifierBytes() { 1369 java.lang.Object ref = identifier_; 1370 if (ref instanceof java.lang.String) { 1371 com.google.protobuf.ByteString b = 1372 com.google.protobuf.ByteString.copyFromUtf8( 1373 (java.lang.String) ref); 1374 identifier_ = b; 1375 return b; 1376 } else { 1377 return (com.google.protobuf.ByteString) ref; 1378 } 1379 } 1380 1381 // required .State state = 2; 1382 public static final int STATE_FIELD_NUMBER = 2; 1383 private org.apache.reef.proto.ReefServiceProtos.State state_; 1384 /** 1385 * <code>required .State state = 2;</code> 1386 */ 1387 public boolean hasState() { 1388 return ((bitField0_ & 0x00000002) == 0x00000002); 1389 } 1390 /** 1391 * <code>required .State state = 2;</code> 1392 */ 1393 public org.apache.reef.proto.ReefServiceProtos.State getState() { 1394 return state_; 1395 } 1396 1397 // optional bytes message = 3; 1398 public static final int MESSAGE_FIELD_NUMBER = 3; 1399 private com.google.protobuf.ByteString message_; 1400 /** 1401 * <code>optional bytes message = 3;</code> 1402 */ 1403 public boolean hasMessage() { 1404 return ((bitField0_ & 0x00000004) == 0x00000004); 1405 } 1406 /** 1407 * <code>optional bytes message = 3;</code> 1408 */ 1409 public com.google.protobuf.ByteString getMessage() { 1410 return message_; 1411 } 1412 1413 // optional bytes exception = 4; 1414 public static final int EXCEPTION_FIELD_NUMBER = 4; 1415 private com.google.protobuf.ByteString exception_; 1416 /** 1417 * <code>optional bytes exception = 4;</code> 1418 */ 1419 public boolean hasException() { 1420 return ((bitField0_ & 0x00000008) == 0x00000008); 1421 } 1422 /** 1423 * <code>optional bytes exception = 4;</code> 1424 */ 1425 public com.google.protobuf.ByteString getException() { 1426 return exception_; 1427 } 1428 1429 private void initFields() { 1430 identifier_ = ""; 1431 state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT; 1432 message_ = com.google.protobuf.ByteString.EMPTY; 1433 exception_ = com.google.protobuf.ByteString.EMPTY; 1434 } 1435 private byte memoizedIsInitialized = -1; 1436 public final boolean isInitialized() { 1437 byte isInitialized = memoizedIsInitialized; 1438 if (isInitialized != -1) return isInitialized == 1; 1439 1440 if (!hasIdentifier()) { 1441 memoizedIsInitialized = 0; 1442 return false; 1443 } 1444 if (!hasState()) { 1445 memoizedIsInitialized = 0; 1446 return false; 1447 } 1448 memoizedIsInitialized = 1; 1449 return true; 1450 } 1451 1452 public void writeTo(com.google.protobuf.CodedOutputStream output) 1453 throws java.io.IOException { 1454 getSerializedSize(); 1455 if (((bitField0_ & 0x00000001) == 0x00000001)) { 1456 output.writeBytes(1, getIdentifierBytes()); 1457 } 1458 if (((bitField0_ & 0x00000002) == 0x00000002)) { 1459 output.writeEnum(2, state_.getNumber()); 1460 } 1461 if (((bitField0_ & 0x00000004) == 0x00000004)) { 1462 output.writeBytes(3, message_); 1463 } 1464 if (((bitField0_ & 0x00000008) == 0x00000008)) { 1465 output.writeBytes(4, exception_); 1466 } 1467 getUnknownFields().writeTo(output); 1468 } 1469 1470 private int memoizedSerializedSize = -1; 1471 public int getSerializedSize() { 1472 int size = memoizedSerializedSize; 1473 if (size != -1) return size; 1474 1475 size = 0; 1476 if (((bitField0_ & 0x00000001) == 0x00000001)) { 1477 size += com.google.protobuf.CodedOutputStream 1478 .computeBytesSize(1, getIdentifierBytes()); 1479 } 1480 if (((bitField0_ & 0x00000002) == 0x00000002)) { 1481 size += com.google.protobuf.CodedOutputStream 1482 .computeEnumSize(2, state_.getNumber()); 1483 } 1484 if (((bitField0_ & 0x00000004) == 0x00000004)) { 1485 size += com.google.protobuf.CodedOutputStream 1486 .computeBytesSize(3, message_); 1487 } 1488 if (((bitField0_ & 0x00000008) == 0x00000008)) { 1489 size += com.google.protobuf.CodedOutputStream 1490 .computeBytesSize(4, exception_); 1491 } 1492 size += getUnknownFields().getSerializedSize(); 1493 memoizedSerializedSize = size; 1494 return size; 1495 } 1496 1497 private static final long serialVersionUID = 0L; 1498 @java.lang.Override 1499 protected java.lang.Object writeReplace() 1500 throws java.io.ObjectStreamException { 1501 return super.writeReplace(); 1502 } 1503 1504 @java.lang.Override 1505 public boolean equals(final java.lang.Object obj) { 1506 if (obj == this) { 1507 return true; 1508 } 1509 if (!(obj instanceof org.apache.reef.proto.ReefServiceProtos.JobStatusProto)) { 1510 return super.equals(obj); 1511 } 1512 org.apache.reef.proto.ReefServiceProtos.JobStatusProto other = (org.apache.reef.proto.ReefServiceProtos.JobStatusProto) obj; 1513 1514 boolean result = true; 1515 result = result && (hasIdentifier() == other.hasIdentifier()); 1516 if (hasIdentifier()) { 1517 result = result && getIdentifier() 1518 .equals(other.getIdentifier()); 1519 } 1520 result = result && (hasState() == other.hasState()); 1521 if (hasState()) { 1522 result = result && 1523 (getState() == other.getState()); 1524 } 1525 result = result && (hasMessage() == other.hasMessage()); 1526 if (hasMessage()) { 1527 result = result && getMessage() 1528 .equals(other.getMessage()); 1529 } 1530 result = result && (hasException() == other.hasException()); 1531 if (hasException()) { 1532 result = result && getException() 1533 .equals(other.getException()); 1534 } 1535 result = result && 1536 getUnknownFields().equals(other.getUnknownFields()); 1537 return result; 1538 } 1539 1540 private int memoizedHashCode = 0; 1541 @java.lang.Override 1542 public int hashCode() { 1543 if (memoizedHashCode != 0) { 1544 return memoizedHashCode; 1545 } 1546 int hash = 41; 1547 hash = (19 * hash) + getDescriptorForType().hashCode(); 1548 if (hasIdentifier()) { 1549 hash = (37 * hash) + IDENTIFIER_FIELD_NUMBER; 1550 hash = (53 * hash) + getIdentifier().hashCode(); 1551 } 1552 if (hasState()) { 1553 hash = (37 * hash) + STATE_FIELD_NUMBER; 1554 hash = (53 * hash) + hashEnum(getState()); 1555 } 1556 if (hasMessage()) { 1557 hash = (37 * hash) + MESSAGE_FIELD_NUMBER; 1558 hash = (53 * hash) + getMessage().hashCode(); 1559 } 1560 if (hasException()) { 1561 hash = (37 * hash) + EXCEPTION_FIELD_NUMBER; 1562 hash = (53 * hash) + getException().hashCode(); 1563 } 1564 hash = (29 * hash) + getUnknownFields().hashCode(); 1565 memoizedHashCode = hash; 1566 return hash; 1567 } 1568 1569 public static org.apache.reef.proto.ReefServiceProtos.JobStatusProto parseFrom( 1570 com.google.protobuf.ByteString data) 1571 throws com.google.protobuf.InvalidProtocolBufferException { 1572 return PARSER.parseFrom(data); 1573 } 1574 public static org.apache.reef.proto.ReefServiceProtos.JobStatusProto parseFrom( 1575 com.google.protobuf.ByteString data, 1576 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1577 throws com.google.protobuf.InvalidProtocolBufferException { 1578 return PARSER.parseFrom(data, extensionRegistry); 1579 } 1580 public static org.apache.reef.proto.ReefServiceProtos.JobStatusProto parseFrom(byte[] data) 1581 throws com.google.protobuf.InvalidProtocolBufferException { 1582 return PARSER.parseFrom(data); 1583 } 1584 public static org.apache.reef.proto.ReefServiceProtos.JobStatusProto parseFrom( 1585 byte[] data, 1586 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1587 throws com.google.protobuf.InvalidProtocolBufferException { 1588 return PARSER.parseFrom(data, extensionRegistry); 1589 } 1590 public static org.apache.reef.proto.ReefServiceProtos.JobStatusProto parseFrom(java.io.InputStream input) 1591 throws java.io.IOException { 1592 return PARSER.parseFrom(input); 1593 } 1594 public static org.apache.reef.proto.ReefServiceProtos.JobStatusProto parseFrom( 1595 java.io.InputStream input, 1596 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1597 throws java.io.IOException { 1598 return PARSER.parseFrom(input, extensionRegistry); 1599 } 1600 public static org.apache.reef.proto.ReefServiceProtos.JobStatusProto parseDelimitedFrom(java.io.InputStream input) 1601 throws java.io.IOException { 1602 return PARSER.parseDelimitedFrom(input); 1603 } 1604 public static org.apache.reef.proto.ReefServiceProtos.JobStatusProto parseDelimitedFrom( 1605 java.io.InputStream input, 1606 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1607 throws java.io.IOException { 1608 return PARSER.parseDelimitedFrom(input, extensionRegistry); 1609 } 1610 public static org.apache.reef.proto.ReefServiceProtos.JobStatusProto parseFrom( 1611 com.google.protobuf.CodedInputStream input) 1612 throws java.io.IOException { 1613 return PARSER.parseFrom(input); 1614 } 1615 public static org.apache.reef.proto.ReefServiceProtos.JobStatusProto parseFrom( 1616 com.google.protobuf.CodedInputStream input, 1617 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1618 throws java.io.IOException { 1619 return PARSER.parseFrom(input, extensionRegistry); 1620 } 1621 1622 public static Builder newBuilder() { return Builder.create(); } 1623 public Builder newBuilderForType() { return newBuilder(); } 1624 public static Builder newBuilder(org.apache.reef.proto.ReefServiceProtos.JobStatusProto prototype) { 1625 return newBuilder().mergeFrom(prototype); 1626 } 1627 public Builder toBuilder() { return newBuilder(this); } 1628 1629 @java.lang.Override 1630 protected Builder newBuilderForType( 1631 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 1632 Builder builder = new Builder(parent); 1633 return builder; 1634 } 1635 /** 1636 * Protobuf type {@code JobStatusProto} 1637 */ 1638 public static final class Builder extends 1639 com.google.protobuf.GeneratedMessage.Builder<Builder> 1640 implements org.apache.reef.proto.ReefServiceProtos.JobStatusProtoOrBuilder { 1641 public static final com.google.protobuf.Descriptors.Descriptor 1642 getDescriptor() { 1643 return org.apache.reef.proto.ReefServiceProtos.internal_static_JobStatusProto_descriptor; 1644 } 1645 1646 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 1647 internalGetFieldAccessorTable() { 1648 return org.apache.reef.proto.ReefServiceProtos.internal_static_JobStatusProto_fieldAccessorTable 1649 .ensureFieldAccessorsInitialized( 1650 org.apache.reef.proto.ReefServiceProtos.JobStatusProto.class, org.apache.reef.proto.ReefServiceProtos.JobStatusProto.Builder.class); 1651 } 1652 1653 // Construct using org.apache.reef.proto.ReefServiceProtos.JobStatusProto.newBuilder() 1654 private Builder() { 1655 maybeForceBuilderInitialization(); 1656 } 1657 1658 private Builder( 1659 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 1660 super(parent); 1661 maybeForceBuilderInitialization(); 1662 } 1663 private void maybeForceBuilderInitialization() { 1664 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { 1665 } 1666 } 1667 private static Builder create() { 1668 return new Builder(); 1669 } 1670 1671 public Builder clear() { 1672 super.clear(); 1673 identifier_ = ""; 1674 bitField0_ = (bitField0_ & ~0x00000001); 1675 state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT; 1676 bitField0_ = (bitField0_ & ~0x00000002); 1677 message_ = com.google.protobuf.ByteString.EMPTY; 1678 bitField0_ = (bitField0_ & ~0x00000004); 1679 exception_ = com.google.protobuf.ByteString.EMPTY; 1680 bitField0_ = (bitField0_ & ~0x00000008); 1681 return this; 1682 } 1683 1684 public Builder clone() { 1685 return create().mergeFrom(buildPartial()); 1686 } 1687 1688 public com.google.protobuf.Descriptors.Descriptor 1689 getDescriptorForType() { 1690 return org.apache.reef.proto.ReefServiceProtos.internal_static_JobStatusProto_descriptor; 1691 } 1692 1693 public org.apache.reef.proto.ReefServiceProtos.JobStatusProto getDefaultInstanceForType() { 1694 return org.apache.reef.proto.ReefServiceProtos.JobStatusProto.getDefaultInstance(); 1695 } 1696 1697 public org.apache.reef.proto.ReefServiceProtos.JobStatusProto build() { 1698 org.apache.reef.proto.ReefServiceProtos.JobStatusProto result = buildPartial(); 1699 if (!result.isInitialized()) { 1700 throw newUninitializedMessageException(result); 1701 } 1702 return result; 1703 } 1704 1705 public org.apache.reef.proto.ReefServiceProtos.JobStatusProto buildPartial() { 1706 org.apache.reef.proto.ReefServiceProtos.JobStatusProto result = new org.apache.reef.proto.ReefServiceProtos.JobStatusProto(this); 1707 int from_bitField0_ = bitField0_; 1708 int to_bitField0_ = 0; 1709 if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 1710 to_bitField0_ |= 0x00000001; 1711 } 1712 result.identifier_ = identifier_; 1713 if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 1714 to_bitField0_ |= 0x00000002; 1715 } 1716 result.state_ = state_; 1717 if (((from_bitField0_ & 0x00000004) == 0x00000004)) { 1718 to_bitField0_ |= 0x00000004; 1719 } 1720 result.message_ = message_; 1721 if (((from_bitField0_ & 0x00000008) == 0x00000008)) { 1722 to_bitField0_ |= 0x00000008; 1723 } 1724 result.exception_ = exception_; 1725 result.bitField0_ = to_bitField0_; 1726 onBuilt(); 1727 return result; 1728 } 1729 1730 public Builder mergeFrom(com.google.protobuf.Message other) { 1731 if (other instanceof org.apache.reef.proto.ReefServiceProtos.JobStatusProto) { 1732 return mergeFrom((org.apache.reef.proto.ReefServiceProtos.JobStatusProto)other); 1733 } else { 1734 super.mergeFrom(other); 1735 return this; 1736 } 1737 } 1738 1739 public Builder mergeFrom(org.apache.reef.proto.ReefServiceProtos.JobStatusProto other) { 1740 if (other == org.apache.reef.proto.ReefServiceProtos.JobStatusProto.getDefaultInstance()) return this; 1741 if (other.hasIdentifier()) { 1742 bitField0_ |= 0x00000001; 1743 identifier_ = other.identifier_; 1744 onChanged(); 1745 } 1746 if (other.hasState()) { 1747 setState(other.getState()); 1748 } 1749 if (other.hasMessage()) { 1750 setMessage(other.getMessage()); 1751 } 1752 if (other.hasException()) { 1753 setException(other.getException()); 1754 } 1755 this.mergeUnknownFields(other.getUnknownFields()); 1756 return this; 1757 } 1758 1759 public final boolean isInitialized() { 1760 if (!hasIdentifier()) { 1761 1762 return false; 1763 } 1764 if (!hasState()) { 1765 1766 return false; 1767 } 1768 return true; 1769 } 1770 1771 public Builder mergeFrom( 1772 com.google.protobuf.CodedInputStream input, 1773 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1774 throws java.io.IOException { 1775 org.apache.reef.proto.ReefServiceProtos.JobStatusProto parsedMessage = null; 1776 try { 1777 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 1778 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1779 parsedMessage = (org.apache.reef.proto.ReefServiceProtos.JobStatusProto) e.getUnfinishedMessage(); 1780 throw e; 1781 } finally { 1782 if (parsedMessage != null) { 1783 mergeFrom(parsedMessage); 1784 } 1785 } 1786 return this; 1787 } 1788 private int bitField0_; 1789 1790 // required string identifier = 1; 1791 private java.lang.Object identifier_ = ""; 1792 /** 1793 * <code>required string identifier = 1;</code> 1794 */ 1795 public boolean hasIdentifier() { 1796 return ((bitField0_ & 0x00000001) == 0x00000001); 1797 } 1798 /** 1799 * <code>required string identifier = 1;</code> 1800 */ 1801 public java.lang.String getIdentifier() { 1802 java.lang.Object ref = identifier_; 1803 if (!(ref instanceof java.lang.String)) { 1804 java.lang.String s = ((com.google.protobuf.ByteString) ref) 1805 .toStringUtf8(); 1806 identifier_ = s; 1807 return s; 1808 } else { 1809 return (java.lang.String) ref; 1810 } 1811 } 1812 /** 1813 * <code>required string identifier = 1;</code> 1814 */ 1815 public com.google.protobuf.ByteString 1816 getIdentifierBytes() { 1817 java.lang.Object ref = identifier_; 1818 if (ref instanceof String) { 1819 com.google.protobuf.ByteString b = 1820 com.google.protobuf.ByteString.copyFromUtf8( 1821 (java.lang.String) ref); 1822 identifier_ = b; 1823 return b; 1824 } else { 1825 return (com.google.protobuf.ByteString) ref; 1826 } 1827 } 1828 /** 1829 * <code>required string identifier = 1;</code> 1830 */ 1831 public Builder setIdentifier( 1832 java.lang.String value) { 1833 if (value == null) { 1834 throw new NullPointerException(); 1835 } 1836 bitField0_ |= 0x00000001; 1837 identifier_ = value; 1838 onChanged(); 1839 return this; 1840 } 1841 /** 1842 * <code>required string identifier = 1;</code> 1843 */ 1844 public Builder clearIdentifier() { 1845 bitField0_ = (bitField0_ & ~0x00000001); 1846 identifier_ = getDefaultInstance().getIdentifier(); 1847 onChanged(); 1848 return this; 1849 } 1850 /** 1851 * <code>required string identifier = 1;</code> 1852 */ 1853 public Builder setIdentifierBytes( 1854 com.google.protobuf.ByteString value) { 1855 if (value == null) { 1856 throw new NullPointerException(); 1857 } 1858 bitField0_ |= 0x00000001; 1859 identifier_ = value; 1860 onChanged(); 1861 return this; 1862 } 1863 1864 // required .State state = 2; 1865 private org.apache.reef.proto.ReefServiceProtos.State state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT; 1866 /** 1867 * <code>required .State state = 2;</code> 1868 */ 1869 public boolean hasState() { 1870 return ((bitField0_ & 0x00000002) == 0x00000002); 1871 } 1872 /** 1873 * <code>required .State state = 2;</code> 1874 */ 1875 public org.apache.reef.proto.ReefServiceProtos.State getState() { 1876 return state_; 1877 } 1878 /** 1879 * <code>required .State state = 2;</code> 1880 */ 1881 public Builder setState(org.apache.reef.proto.ReefServiceProtos.State value) { 1882 if (value == null) { 1883 throw new NullPointerException(); 1884 } 1885 bitField0_ |= 0x00000002; 1886 state_ = value; 1887 onChanged(); 1888 return this; 1889 } 1890 /** 1891 * <code>required .State state = 2;</code> 1892 */ 1893 public Builder clearState() { 1894 bitField0_ = (bitField0_ & ~0x00000002); 1895 state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT; 1896 onChanged(); 1897 return this; 1898 } 1899 1900 // optional bytes message = 3; 1901 private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY; 1902 /** 1903 * <code>optional bytes message = 3;</code> 1904 */ 1905 public boolean hasMessage() { 1906 return ((bitField0_ & 0x00000004) == 0x00000004); 1907 } 1908 /** 1909 * <code>optional bytes message = 3;</code> 1910 */ 1911 public com.google.protobuf.ByteString getMessage() { 1912 return message_; 1913 } 1914 /** 1915 * <code>optional bytes message = 3;</code> 1916 */ 1917 public Builder setMessage(com.google.protobuf.ByteString value) { 1918 if (value == null) { 1919 throw new NullPointerException(); 1920 } 1921 bitField0_ |= 0x00000004; 1922 message_ = value; 1923 onChanged(); 1924 return this; 1925 } 1926 /** 1927 * <code>optional bytes message = 3;</code> 1928 */ 1929 public Builder clearMessage() { 1930 bitField0_ = (bitField0_ & ~0x00000004); 1931 message_ = getDefaultInstance().getMessage(); 1932 onChanged(); 1933 return this; 1934 } 1935 1936 // optional bytes exception = 4; 1937 private com.google.protobuf.ByteString exception_ = com.google.protobuf.ByteString.EMPTY; 1938 /** 1939 * <code>optional bytes exception = 4;</code> 1940 */ 1941 public boolean hasException() { 1942 return ((bitField0_ & 0x00000008) == 0x00000008); 1943 } 1944 /** 1945 * <code>optional bytes exception = 4;</code> 1946 */ 1947 public com.google.protobuf.ByteString getException() { 1948 return exception_; 1949 } 1950 /** 1951 * <code>optional bytes exception = 4;</code> 1952 */ 1953 public Builder setException(com.google.protobuf.ByteString value) { 1954 if (value == null) { 1955 throw new NullPointerException(); 1956 } 1957 bitField0_ |= 0x00000008; 1958 exception_ = value; 1959 onChanged(); 1960 return this; 1961 } 1962 /** 1963 * <code>optional bytes exception = 4;</code> 1964 */ 1965 public Builder clearException() { 1966 bitField0_ = (bitField0_ & ~0x00000008); 1967 exception_ = getDefaultInstance().getException(); 1968 onChanged(); 1969 return this; 1970 } 1971 1972 // @@protoc_insertion_point(builder_scope:JobStatusProto) 1973 } 1974 1975 static { 1976 defaultInstance = new JobStatusProto(true); 1977 defaultInstance.initFields(); 1978 } 1979 1980 // @@protoc_insertion_point(class_scope:JobStatusProto) 1981 } 1982 1983 public interface ContextStatusProtoOrBuilder 1984 extends com.google.protobuf.MessageOrBuilder { 1985 1986 // required .ContextStatusProto.State context_state = 1; 1987 /** 1988 * <code>required .ContextStatusProto.State context_state = 1;</code> 1989 */ 1990 boolean hasContextState(); 1991 /** 1992 * <code>required .ContextStatusProto.State context_state = 1;</code> 1993 */ 1994 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.State getContextState(); 1995 1996 // required string context_id = 2; 1997 /** 1998 * <code>required string context_id = 2;</code> 1999 */ 2000 boolean hasContextId(); 2001 /** 2002 * <code>required string context_id = 2;</code> 2003 */ 2004 java.lang.String getContextId(); 2005 /** 2006 * <code>required string context_id = 2;</code> 2007 */ 2008 com.google.protobuf.ByteString 2009 getContextIdBytes(); 2010 2011 // optional string parent_id = 3; 2012 /** 2013 * <code>optional string parent_id = 3;</code> 2014 */ 2015 boolean hasParentId(); 2016 /** 2017 * <code>optional string parent_id = 3;</code> 2018 */ 2019 java.lang.String getParentId(); 2020 /** 2021 * <code>optional string parent_id = 3;</code> 2022 */ 2023 com.google.protobuf.ByteString 2024 getParentIdBytes(); 2025 2026 // optional bytes error = 5; 2027 /** 2028 * <code>optional bytes error = 5;</code> 2029 * 2030 * <pre> 2031 * when creating the context 2032 * </pre> 2033 */ 2034 boolean hasError(); 2035 /** 2036 * <code>optional bytes error = 5;</code> 2037 * 2038 * <pre> 2039 * when creating the context 2040 * </pre> 2041 */ 2042 com.google.protobuf.ByteString getError(); 2043 2044 // optional bool recovery = 6; 2045 /** 2046 * <code>optional bool recovery = 6;</code> 2047 */ 2048 boolean hasRecovery(); 2049 /** 2050 * <code>optional bool recovery = 6;</code> 2051 */ 2052 boolean getRecovery(); 2053 2054 // repeated .ContextStatusProto.ContextMessageProto context_message = 7; 2055 /** 2056 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 2057 */ 2058 java.util.List<org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto> 2059 getContextMessageList(); 2060 /** 2061 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 2062 */ 2063 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto getContextMessage(int index); 2064 /** 2065 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 2066 */ 2067 int getContextMessageCount(); 2068 /** 2069 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 2070 */ 2071 java.util.List<? extends org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProtoOrBuilder> 2072 getContextMessageOrBuilderList(); 2073 /** 2074 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 2075 */ 2076 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProtoOrBuilder getContextMessageOrBuilder( 2077 int index); 2078 } 2079 /** 2080 * Protobuf type {@code ContextStatusProto} 2081 */ 2082 public static final class ContextStatusProto extends 2083 com.google.protobuf.GeneratedMessage 2084 implements ContextStatusProtoOrBuilder { 2085 // Use ContextStatusProto.newBuilder() to construct. 2086 private ContextStatusProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) { 2087 super(builder); 2088 this.unknownFields = builder.getUnknownFields(); 2089 } 2090 private ContextStatusProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } 2091 2092 private static final ContextStatusProto defaultInstance; 2093 public static ContextStatusProto getDefaultInstance() { 2094 return defaultInstance; 2095 } 2096 2097 public ContextStatusProto getDefaultInstanceForType() { 2098 return defaultInstance; 2099 } 2100 2101 private final com.google.protobuf.UnknownFieldSet unknownFields; 2102 @java.lang.Override 2103 public final com.google.protobuf.UnknownFieldSet 2104 getUnknownFields() { 2105 return this.unknownFields; 2106 } 2107 private ContextStatusProto( 2108 com.google.protobuf.CodedInputStream input, 2109 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2110 throws com.google.protobuf.InvalidProtocolBufferException { 2111 initFields(); 2112 int mutable_bitField0_ = 0; 2113 com.google.protobuf.UnknownFieldSet.Builder unknownFields = 2114 com.google.protobuf.UnknownFieldSet.newBuilder(); 2115 try { 2116 boolean done = false; 2117 while (!done) { 2118 int tag = input.readTag(); 2119 switch (tag) { 2120 case 0: 2121 done = true; 2122 break; 2123 default: { 2124 if (!parseUnknownField(input, unknownFields, 2125 extensionRegistry, tag)) { 2126 done = true; 2127 } 2128 break; 2129 } 2130 case 8: { 2131 int rawValue = input.readEnum(); 2132 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.State value = org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.State.valueOf(rawValue); 2133 if (value == null) { 2134 unknownFields.mergeVarintField(1, rawValue); 2135 } else { 2136 bitField0_ |= 0x00000001; 2137 contextState_ = value; 2138 } 2139 break; 2140 } 2141 case 18: { 2142 bitField0_ |= 0x00000002; 2143 contextId_ = input.readBytes(); 2144 break; 2145 } 2146 case 26: { 2147 bitField0_ |= 0x00000004; 2148 parentId_ = input.readBytes(); 2149 break; 2150 } 2151 case 42: { 2152 bitField0_ |= 0x00000008; 2153 error_ = input.readBytes(); 2154 break; 2155 } 2156 case 48: { 2157 bitField0_ |= 0x00000010; 2158 recovery_ = input.readBool(); 2159 break; 2160 } 2161 case 58: { 2162 if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { 2163 contextMessage_ = new java.util.ArrayList<org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto>(); 2164 mutable_bitField0_ |= 0x00000020; 2165 } 2166 contextMessage_.add(input.readMessage(org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.PARSER, extensionRegistry)); 2167 break; 2168 } 2169 } 2170 } 2171 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2172 throw e.setUnfinishedMessage(this); 2173 } catch (java.io.IOException e) { 2174 throw new com.google.protobuf.InvalidProtocolBufferException( 2175 e.getMessage()).setUnfinishedMessage(this); 2176 } finally { 2177 if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { 2178 contextMessage_ = java.util.Collections.unmodifiableList(contextMessage_); 2179 } 2180 this.unknownFields = unknownFields.build(); 2181 makeExtensionsImmutable(); 2182 } 2183 } 2184 public static final com.google.protobuf.Descriptors.Descriptor 2185 getDescriptor() { 2186 return org.apache.reef.proto.ReefServiceProtos.internal_static_ContextStatusProto_descriptor; 2187 } 2188 2189 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 2190 internalGetFieldAccessorTable() { 2191 return org.apache.reef.proto.ReefServiceProtos.internal_static_ContextStatusProto_fieldAccessorTable 2192 .ensureFieldAccessorsInitialized( 2193 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.class, org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.Builder.class); 2194 } 2195 2196 public static com.google.protobuf.Parser<ContextStatusProto> PARSER = 2197 new com.google.protobuf.AbstractParser<ContextStatusProto>() { 2198 public ContextStatusProto parsePartialFrom( 2199 com.google.protobuf.CodedInputStream input, 2200 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2201 throws com.google.protobuf.InvalidProtocolBufferException { 2202 return new ContextStatusProto(input, extensionRegistry); 2203 } 2204 }; 2205 2206 @java.lang.Override 2207 public com.google.protobuf.Parser<ContextStatusProto> getParserForType() { 2208 return PARSER; 2209 } 2210 2211 /** 2212 * Protobuf enum {@code ContextStatusProto.State} 2213 */ 2214 public enum State 2215 implements com.google.protobuf.ProtocolMessageEnum { 2216 /** 2217 * <code>READY = 0;</code> 2218 */ 2219 READY(0, 0), 2220 /** 2221 * <code>DONE = 1;</code> 2222 */ 2223 DONE(1, 1), 2224 /** 2225 * <code>FAIL = 2;</code> 2226 */ 2227 FAIL(2, 2), 2228 ; 2229 2230 /** 2231 * <code>READY = 0;</code> 2232 */ 2233 public static final int READY_VALUE = 0; 2234 /** 2235 * <code>DONE = 1;</code> 2236 */ 2237 public static final int DONE_VALUE = 1; 2238 /** 2239 * <code>FAIL = 2;</code> 2240 */ 2241 public static final int FAIL_VALUE = 2; 2242 2243 2244 public final int getNumber() { return value; } 2245 2246 public static State valueOf(int value) { 2247 switch (value) { 2248 case 0: return READY; 2249 case 1: return DONE; 2250 case 2: return FAIL; 2251 default: return null; 2252 } 2253 } 2254 2255 public static com.google.protobuf.Internal.EnumLiteMap<State> 2256 internalGetValueMap() { 2257 return internalValueMap; 2258 } 2259 private static com.google.protobuf.Internal.EnumLiteMap<State> 2260 internalValueMap = 2261 new com.google.protobuf.Internal.EnumLiteMap<State>() { 2262 public State findValueByNumber(int number) { 2263 return State.valueOf(number); 2264 } 2265 }; 2266 2267 public final com.google.protobuf.Descriptors.EnumValueDescriptor 2268 getValueDescriptor() { 2269 return getDescriptor().getValues().get(index); 2270 } 2271 public final com.google.protobuf.Descriptors.EnumDescriptor 2272 getDescriptorForType() { 2273 return getDescriptor(); 2274 } 2275 public static final com.google.protobuf.Descriptors.EnumDescriptor 2276 getDescriptor() { 2277 return org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.getDescriptor().getEnumTypes().get(0); 2278 } 2279 2280 private static final State[] VALUES = values(); 2281 2282 public static State valueOf( 2283 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 2284 if (desc.getType() != getDescriptor()) { 2285 throw new java.lang.IllegalArgumentException( 2286 "EnumValueDescriptor is not for this type."); 2287 } 2288 return VALUES[desc.getIndex()]; 2289 } 2290 2291 private final int index; 2292 private final int value; 2293 2294 private State(int index, int value) { 2295 this.index = index; 2296 this.value = value; 2297 } 2298 2299 // @@protoc_insertion_point(enum_scope:ContextStatusProto.State) 2300 } 2301 2302 public interface ContextMessageProtoOrBuilder 2303 extends com.google.protobuf.MessageOrBuilder { 2304 2305 // required string source_id = 1; 2306 /** 2307 * <code>required string source_id = 1;</code> 2308 */ 2309 boolean hasSourceId(); 2310 /** 2311 * <code>required string source_id = 1;</code> 2312 */ 2313 java.lang.String getSourceId(); 2314 /** 2315 * <code>required string source_id = 1;</code> 2316 */ 2317 com.google.protobuf.ByteString 2318 getSourceIdBytes(); 2319 2320 // required bytes message = 2; 2321 /** 2322 * <code>required bytes message = 2;</code> 2323 */ 2324 boolean hasMessage(); 2325 /** 2326 * <code>required bytes message = 2;</code> 2327 */ 2328 com.google.protobuf.ByteString getMessage(); 2329 } 2330 /** 2331 * Protobuf type {@code ContextStatusProto.ContextMessageProto} 2332 * 2333 * <pre> 2334 * Context messages 2335 * </pre> 2336 */ 2337 public static final class ContextMessageProto extends 2338 com.google.protobuf.GeneratedMessage 2339 implements ContextMessageProtoOrBuilder { 2340 // Use ContextMessageProto.newBuilder() to construct. 2341 private ContextMessageProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) { 2342 super(builder); 2343 this.unknownFields = builder.getUnknownFields(); 2344 } 2345 private ContextMessageProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } 2346 2347 private static final ContextMessageProto defaultInstance; 2348 public static ContextMessageProto getDefaultInstance() { 2349 return defaultInstance; 2350 } 2351 2352 public ContextMessageProto getDefaultInstanceForType() { 2353 return defaultInstance; 2354 } 2355 2356 private final com.google.protobuf.UnknownFieldSet unknownFields; 2357 @java.lang.Override 2358 public final com.google.protobuf.UnknownFieldSet 2359 getUnknownFields() { 2360 return this.unknownFields; 2361 } 2362 private ContextMessageProto( 2363 com.google.protobuf.CodedInputStream input, 2364 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2365 throws com.google.protobuf.InvalidProtocolBufferException { 2366 initFields(); 2367 int mutable_bitField0_ = 0; 2368 com.google.protobuf.UnknownFieldSet.Builder unknownFields = 2369 com.google.protobuf.UnknownFieldSet.newBuilder(); 2370 try { 2371 boolean done = false; 2372 while (!done) { 2373 int tag = input.readTag(); 2374 switch (tag) { 2375 case 0: 2376 done = true; 2377 break; 2378 default: { 2379 if (!parseUnknownField(input, unknownFields, 2380 extensionRegistry, tag)) { 2381 done = true; 2382 } 2383 break; 2384 } 2385 case 10: { 2386 bitField0_ |= 0x00000001; 2387 sourceId_ = input.readBytes(); 2388 break; 2389 } 2390 case 18: { 2391 bitField0_ |= 0x00000002; 2392 message_ = input.readBytes(); 2393 break; 2394 } 2395 } 2396 } 2397 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2398 throw e.setUnfinishedMessage(this); 2399 } catch (java.io.IOException e) { 2400 throw new com.google.protobuf.InvalidProtocolBufferException( 2401 e.getMessage()).setUnfinishedMessage(this); 2402 } finally { 2403 this.unknownFields = unknownFields.build(); 2404 makeExtensionsImmutable(); 2405 } 2406 } 2407 public static final com.google.protobuf.Descriptors.Descriptor 2408 getDescriptor() { 2409 return org.apache.reef.proto.ReefServiceProtos.internal_static_ContextStatusProto_ContextMessageProto_descriptor; 2410 } 2411 2412 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 2413 internalGetFieldAccessorTable() { 2414 return org.apache.reef.proto.ReefServiceProtos.internal_static_ContextStatusProto_ContextMessageProto_fieldAccessorTable 2415 .ensureFieldAccessorsInitialized( 2416 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.class, org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.Builder.class); 2417 } 2418 2419 public static com.google.protobuf.Parser<ContextMessageProto> PARSER = 2420 new com.google.protobuf.AbstractParser<ContextMessageProto>() { 2421 public ContextMessageProto parsePartialFrom( 2422 com.google.protobuf.CodedInputStream input, 2423 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2424 throws com.google.protobuf.InvalidProtocolBufferException { 2425 return new ContextMessageProto(input, extensionRegistry); 2426 } 2427 }; 2428 2429 @java.lang.Override 2430 public com.google.protobuf.Parser<ContextMessageProto> getParserForType() { 2431 return PARSER; 2432 } 2433 2434 private int bitField0_; 2435 // required string source_id = 1; 2436 public static final int SOURCE_ID_FIELD_NUMBER = 1; 2437 private java.lang.Object sourceId_; 2438 /** 2439 * <code>required string source_id = 1;</code> 2440 */ 2441 public boolean hasSourceId() { 2442 return ((bitField0_ & 0x00000001) == 0x00000001); 2443 } 2444 /** 2445 * <code>required string source_id = 1;</code> 2446 */ 2447 public java.lang.String getSourceId() { 2448 java.lang.Object ref = sourceId_; 2449 if (ref instanceof java.lang.String) { 2450 return (java.lang.String) ref; 2451 } else { 2452 com.google.protobuf.ByteString bs = 2453 (com.google.protobuf.ByteString) ref; 2454 java.lang.String s = bs.toStringUtf8(); 2455 if (bs.isValidUtf8()) { 2456 sourceId_ = s; 2457 } 2458 return s; 2459 } 2460 } 2461 /** 2462 * <code>required string source_id = 1;</code> 2463 */ 2464 public com.google.protobuf.ByteString 2465 getSourceIdBytes() { 2466 java.lang.Object ref = sourceId_; 2467 if (ref instanceof java.lang.String) { 2468 com.google.protobuf.ByteString b = 2469 com.google.protobuf.ByteString.copyFromUtf8( 2470 (java.lang.String) ref); 2471 sourceId_ = b; 2472 return b; 2473 } else { 2474 return (com.google.protobuf.ByteString) ref; 2475 } 2476 } 2477 2478 // required bytes message = 2; 2479 public static final int MESSAGE_FIELD_NUMBER = 2; 2480 private com.google.protobuf.ByteString message_; 2481 /** 2482 * <code>required bytes message = 2;</code> 2483 */ 2484 public boolean hasMessage() { 2485 return ((bitField0_ & 0x00000002) == 0x00000002); 2486 } 2487 /** 2488 * <code>required bytes message = 2;</code> 2489 */ 2490 public com.google.protobuf.ByteString getMessage() { 2491 return message_; 2492 } 2493 2494 private void initFields() { 2495 sourceId_ = ""; 2496 message_ = com.google.protobuf.ByteString.EMPTY; 2497 } 2498 private byte memoizedIsInitialized = -1; 2499 public final boolean isInitialized() { 2500 byte isInitialized = memoizedIsInitialized; 2501 if (isInitialized != -1) return isInitialized == 1; 2502 2503 if (!hasSourceId()) { 2504 memoizedIsInitialized = 0; 2505 return false; 2506 } 2507 if (!hasMessage()) { 2508 memoizedIsInitialized = 0; 2509 return false; 2510 } 2511 memoizedIsInitialized = 1; 2512 return true; 2513 } 2514 2515 public void writeTo(com.google.protobuf.CodedOutputStream output) 2516 throws java.io.IOException { 2517 getSerializedSize(); 2518 if (((bitField0_ & 0x00000001) == 0x00000001)) { 2519 output.writeBytes(1, getSourceIdBytes()); 2520 } 2521 if (((bitField0_ & 0x00000002) == 0x00000002)) { 2522 output.writeBytes(2, message_); 2523 } 2524 getUnknownFields().writeTo(output); 2525 } 2526 2527 private int memoizedSerializedSize = -1; 2528 public int getSerializedSize() { 2529 int size = memoizedSerializedSize; 2530 if (size != -1) return size; 2531 2532 size = 0; 2533 if (((bitField0_ & 0x00000001) == 0x00000001)) { 2534 size += com.google.protobuf.CodedOutputStream 2535 .computeBytesSize(1, getSourceIdBytes()); 2536 } 2537 if (((bitField0_ & 0x00000002) == 0x00000002)) { 2538 size += com.google.protobuf.CodedOutputStream 2539 .computeBytesSize(2, message_); 2540 } 2541 size += getUnknownFields().getSerializedSize(); 2542 memoizedSerializedSize = size; 2543 return size; 2544 } 2545 2546 private static final long serialVersionUID = 0L; 2547 @java.lang.Override 2548 protected java.lang.Object writeReplace() 2549 throws java.io.ObjectStreamException { 2550 return super.writeReplace(); 2551 } 2552 2553 @java.lang.Override 2554 public boolean equals(final java.lang.Object obj) { 2555 if (obj == this) { 2556 return true; 2557 } 2558 if (!(obj instanceof org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto)) { 2559 return super.equals(obj); 2560 } 2561 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto other = (org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto) obj; 2562 2563 boolean result = true; 2564 result = result && (hasSourceId() == other.hasSourceId()); 2565 if (hasSourceId()) { 2566 result = result && getSourceId() 2567 .equals(other.getSourceId()); 2568 } 2569 result = result && (hasMessage() == other.hasMessage()); 2570 if (hasMessage()) { 2571 result = result && getMessage() 2572 .equals(other.getMessage()); 2573 } 2574 result = result && 2575 getUnknownFields().equals(other.getUnknownFields()); 2576 return result; 2577 } 2578 2579 private int memoizedHashCode = 0; 2580 @java.lang.Override 2581 public int hashCode() { 2582 if (memoizedHashCode != 0) { 2583 return memoizedHashCode; 2584 } 2585 int hash = 41; 2586 hash = (19 * hash) + getDescriptorForType().hashCode(); 2587 if (hasSourceId()) { 2588 hash = (37 * hash) + SOURCE_ID_FIELD_NUMBER; 2589 hash = (53 * hash) + getSourceId().hashCode(); 2590 } 2591 if (hasMessage()) { 2592 hash = (37 * hash) + MESSAGE_FIELD_NUMBER; 2593 hash = (53 * hash) + getMessage().hashCode(); 2594 } 2595 hash = (29 * hash) + getUnknownFields().hashCode(); 2596 memoizedHashCode = hash; 2597 return hash; 2598 } 2599 2600 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto parseFrom( 2601 com.google.protobuf.ByteString data) 2602 throws com.google.protobuf.InvalidProtocolBufferException { 2603 return PARSER.parseFrom(data); 2604 } 2605 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto parseFrom( 2606 com.google.protobuf.ByteString data, 2607 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2608 throws com.google.protobuf.InvalidProtocolBufferException { 2609 return PARSER.parseFrom(data, extensionRegistry); 2610 } 2611 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto parseFrom(byte[] data) 2612 throws com.google.protobuf.InvalidProtocolBufferException { 2613 return PARSER.parseFrom(data); 2614 } 2615 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto parseFrom( 2616 byte[] data, 2617 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2618 throws com.google.protobuf.InvalidProtocolBufferException { 2619 return PARSER.parseFrom(data, extensionRegistry); 2620 } 2621 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto parseFrom(java.io.InputStream input) 2622 throws java.io.IOException { 2623 return PARSER.parseFrom(input); 2624 } 2625 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto parseFrom( 2626 java.io.InputStream input, 2627 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2628 throws java.io.IOException { 2629 return PARSER.parseFrom(input, extensionRegistry); 2630 } 2631 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto parseDelimitedFrom(java.io.InputStream input) 2632 throws java.io.IOException { 2633 return PARSER.parseDelimitedFrom(input); 2634 } 2635 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto parseDelimitedFrom( 2636 java.io.InputStream input, 2637 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2638 throws java.io.IOException { 2639 return PARSER.parseDelimitedFrom(input, extensionRegistry); 2640 } 2641 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto parseFrom( 2642 com.google.protobuf.CodedInputStream input) 2643 throws java.io.IOException { 2644 return PARSER.parseFrom(input); 2645 } 2646 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto parseFrom( 2647 com.google.protobuf.CodedInputStream input, 2648 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2649 throws java.io.IOException { 2650 return PARSER.parseFrom(input, extensionRegistry); 2651 } 2652 2653 public static Builder newBuilder() { return Builder.create(); } 2654 public Builder newBuilderForType() { return newBuilder(); } 2655 public static Builder newBuilder(org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto prototype) { 2656 return newBuilder().mergeFrom(prototype); 2657 } 2658 public Builder toBuilder() { return newBuilder(this); } 2659 2660 @java.lang.Override 2661 protected Builder newBuilderForType( 2662 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 2663 Builder builder = new Builder(parent); 2664 return builder; 2665 } 2666 /** 2667 * Protobuf type {@code ContextStatusProto.ContextMessageProto} 2668 * 2669 * <pre> 2670 * Context messages 2671 * </pre> 2672 */ 2673 public static final class Builder extends 2674 com.google.protobuf.GeneratedMessage.Builder<Builder> 2675 implements org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProtoOrBuilder { 2676 public static final com.google.protobuf.Descriptors.Descriptor 2677 getDescriptor() { 2678 return org.apache.reef.proto.ReefServiceProtos.internal_static_ContextStatusProto_ContextMessageProto_descriptor; 2679 } 2680 2681 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 2682 internalGetFieldAccessorTable() { 2683 return org.apache.reef.proto.ReefServiceProtos.internal_static_ContextStatusProto_ContextMessageProto_fieldAccessorTable 2684 .ensureFieldAccessorsInitialized( 2685 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.class, org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.Builder.class); 2686 } 2687 2688 // Construct using org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.newBuilder() 2689 private Builder() { 2690 maybeForceBuilderInitialization(); 2691 } 2692 2693 private Builder( 2694 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 2695 super(parent); 2696 maybeForceBuilderInitialization(); 2697 } 2698 private void maybeForceBuilderInitialization() { 2699 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { 2700 } 2701 } 2702 private static Builder create() { 2703 return new Builder(); 2704 } 2705 2706 public Builder clear() { 2707 super.clear(); 2708 sourceId_ = ""; 2709 bitField0_ = (bitField0_ & ~0x00000001); 2710 message_ = com.google.protobuf.ByteString.EMPTY; 2711 bitField0_ = (bitField0_ & ~0x00000002); 2712 return this; 2713 } 2714 2715 public Builder clone() { 2716 return create().mergeFrom(buildPartial()); 2717 } 2718 2719 public com.google.protobuf.Descriptors.Descriptor 2720 getDescriptorForType() { 2721 return org.apache.reef.proto.ReefServiceProtos.internal_static_ContextStatusProto_ContextMessageProto_descriptor; 2722 } 2723 2724 public org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto getDefaultInstanceForType() { 2725 return org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.getDefaultInstance(); 2726 } 2727 2728 public org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto build() { 2729 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto result = buildPartial(); 2730 if (!result.isInitialized()) { 2731 throw newUninitializedMessageException(result); 2732 } 2733 return result; 2734 } 2735 2736 public org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto buildPartial() { 2737 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto result = new org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto(this); 2738 int from_bitField0_ = bitField0_; 2739 int to_bitField0_ = 0; 2740 if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 2741 to_bitField0_ |= 0x00000001; 2742 } 2743 result.sourceId_ = sourceId_; 2744 if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 2745 to_bitField0_ |= 0x00000002; 2746 } 2747 result.message_ = message_; 2748 result.bitField0_ = to_bitField0_; 2749 onBuilt(); 2750 return result; 2751 } 2752 2753 public Builder mergeFrom(com.google.protobuf.Message other) { 2754 if (other instanceof org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto) { 2755 return mergeFrom((org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto)other); 2756 } else { 2757 super.mergeFrom(other); 2758 return this; 2759 } 2760 } 2761 2762 public Builder mergeFrom(org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto other) { 2763 if (other == org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.getDefaultInstance()) return this; 2764 if (other.hasSourceId()) { 2765 bitField0_ |= 0x00000001; 2766 sourceId_ = other.sourceId_; 2767 onChanged(); 2768 } 2769 if (other.hasMessage()) { 2770 setMessage(other.getMessage()); 2771 } 2772 this.mergeUnknownFields(other.getUnknownFields()); 2773 return this; 2774 } 2775 2776 public final boolean isInitialized() { 2777 if (!hasSourceId()) { 2778 2779 return false; 2780 } 2781 if (!hasMessage()) { 2782 2783 return false; 2784 } 2785 return true; 2786 } 2787 2788 public Builder mergeFrom( 2789 com.google.protobuf.CodedInputStream input, 2790 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2791 throws java.io.IOException { 2792 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto parsedMessage = null; 2793 try { 2794 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 2795 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2796 parsedMessage = (org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto) e.getUnfinishedMessage(); 2797 throw e; 2798 } finally { 2799 if (parsedMessage != null) { 2800 mergeFrom(parsedMessage); 2801 } 2802 } 2803 return this; 2804 } 2805 private int bitField0_; 2806 2807 // required string source_id = 1; 2808 private java.lang.Object sourceId_ = ""; 2809 /** 2810 * <code>required string source_id = 1;</code> 2811 */ 2812 public boolean hasSourceId() { 2813 return ((bitField0_ & 0x00000001) == 0x00000001); 2814 } 2815 /** 2816 * <code>required string source_id = 1;</code> 2817 */ 2818 public java.lang.String getSourceId() { 2819 java.lang.Object ref = sourceId_; 2820 if (!(ref instanceof java.lang.String)) { 2821 java.lang.String s = ((com.google.protobuf.ByteString) ref) 2822 .toStringUtf8(); 2823 sourceId_ = s; 2824 return s; 2825 } else { 2826 return (java.lang.String) ref; 2827 } 2828 } 2829 /** 2830 * <code>required string source_id = 1;</code> 2831 */ 2832 public com.google.protobuf.ByteString 2833 getSourceIdBytes() { 2834 java.lang.Object ref = sourceId_; 2835 if (ref instanceof String) { 2836 com.google.protobuf.ByteString b = 2837 com.google.protobuf.ByteString.copyFromUtf8( 2838 (java.lang.String) ref); 2839 sourceId_ = b; 2840 return b; 2841 } else { 2842 return (com.google.protobuf.ByteString) ref; 2843 } 2844 } 2845 /** 2846 * <code>required string source_id = 1;</code> 2847 */ 2848 public Builder setSourceId( 2849 java.lang.String value) { 2850 if (value == null) { 2851 throw new NullPointerException(); 2852 } 2853 bitField0_ |= 0x00000001; 2854 sourceId_ = value; 2855 onChanged(); 2856 return this; 2857 } 2858 /** 2859 * <code>required string source_id = 1;</code> 2860 */ 2861 public Builder clearSourceId() { 2862 bitField0_ = (bitField0_ & ~0x00000001); 2863 sourceId_ = getDefaultInstance().getSourceId(); 2864 onChanged(); 2865 return this; 2866 } 2867 /** 2868 * <code>required string source_id = 1;</code> 2869 */ 2870 public Builder setSourceIdBytes( 2871 com.google.protobuf.ByteString value) { 2872 if (value == null) { 2873 throw new NullPointerException(); 2874 } 2875 bitField0_ |= 0x00000001; 2876 sourceId_ = value; 2877 onChanged(); 2878 return this; 2879 } 2880 2881 // required bytes message = 2; 2882 private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY; 2883 /** 2884 * <code>required bytes message = 2;</code> 2885 */ 2886 public boolean hasMessage() { 2887 return ((bitField0_ & 0x00000002) == 0x00000002); 2888 } 2889 /** 2890 * <code>required bytes message = 2;</code> 2891 */ 2892 public com.google.protobuf.ByteString getMessage() { 2893 return message_; 2894 } 2895 /** 2896 * <code>required bytes message = 2;</code> 2897 */ 2898 public Builder setMessage(com.google.protobuf.ByteString value) { 2899 if (value == null) { 2900 throw new NullPointerException(); 2901 } 2902 bitField0_ |= 0x00000002; 2903 message_ = value; 2904 onChanged(); 2905 return this; 2906 } 2907 /** 2908 * <code>required bytes message = 2;</code> 2909 */ 2910 public Builder clearMessage() { 2911 bitField0_ = (bitField0_ & ~0x00000002); 2912 message_ = getDefaultInstance().getMessage(); 2913 onChanged(); 2914 return this; 2915 } 2916 2917 // @@protoc_insertion_point(builder_scope:ContextStatusProto.ContextMessageProto) 2918 } 2919 2920 static { 2921 defaultInstance = new ContextMessageProto(true); 2922 defaultInstance.initFields(); 2923 } 2924 2925 // @@protoc_insertion_point(class_scope:ContextStatusProto.ContextMessageProto) 2926 } 2927 2928 private int bitField0_; 2929 // required .ContextStatusProto.State context_state = 1; 2930 public static final int CONTEXT_STATE_FIELD_NUMBER = 1; 2931 private org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.State contextState_; 2932 /** 2933 * <code>required .ContextStatusProto.State context_state = 1;</code> 2934 */ 2935 public boolean hasContextState() { 2936 return ((bitField0_ & 0x00000001) == 0x00000001); 2937 } 2938 /** 2939 * <code>required .ContextStatusProto.State context_state = 1;</code> 2940 */ 2941 public org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.State getContextState() { 2942 return contextState_; 2943 } 2944 2945 // required string context_id = 2; 2946 public static final int CONTEXT_ID_FIELD_NUMBER = 2; 2947 private java.lang.Object contextId_; 2948 /** 2949 * <code>required string context_id = 2;</code> 2950 */ 2951 public boolean hasContextId() { 2952 return ((bitField0_ & 0x00000002) == 0x00000002); 2953 } 2954 /** 2955 * <code>required string context_id = 2;</code> 2956 */ 2957 public java.lang.String getContextId() { 2958 java.lang.Object ref = contextId_; 2959 if (ref instanceof java.lang.String) { 2960 return (java.lang.String) ref; 2961 } else { 2962 com.google.protobuf.ByteString bs = 2963 (com.google.protobuf.ByteString) ref; 2964 java.lang.String s = bs.toStringUtf8(); 2965 if (bs.isValidUtf8()) { 2966 contextId_ = s; 2967 } 2968 return s; 2969 } 2970 } 2971 /** 2972 * <code>required string context_id = 2;</code> 2973 */ 2974 public com.google.protobuf.ByteString 2975 getContextIdBytes() { 2976 java.lang.Object ref = contextId_; 2977 if (ref instanceof java.lang.String) { 2978 com.google.protobuf.ByteString b = 2979 com.google.protobuf.ByteString.copyFromUtf8( 2980 (java.lang.String) ref); 2981 contextId_ = b; 2982 return b; 2983 } else { 2984 return (com.google.protobuf.ByteString) ref; 2985 } 2986 } 2987 2988 // optional string parent_id = 3; 2989 public static final int PARENT_ID_FIELD_NUMBER = 3; 2990 private java.lang.Object parentId_; 2991 /** 2992 * <code>optional string parent_id = 3;</code> 2993 */ 2994 public boolean hasParentId() { 2995 return ((bitField0_ & 0x00000004) == 0x00000004); 2996 } 2997 /** 2998 * <code>optional string parent_id = 3;</code> 2999 */ 3000 public java.lang.String getParentId() { 3001 java.lang.Object ref = parentId_; 3002 if (ref instanceof java.lang.String) { 3003 return (java.lang.String) ref; 3004 } else { 3005 com.google.protobuf.ByteString bs = 3006 (com.google.protobuf.ByteString) ref; 3007 java.lang.String s = bs.toStringUtf8(); 3008 if (bs.isValidUtf8()) { 3009 parentId_ = s; 3010 } 3011 return s; 3012 } 3013 } 3014 /** 3015 * <code>optional string parent_id = 3;</code> 3016 */ 3017 public com.google.protobuf.ByteString 3018 getParentIdBytes() { 3019 java.lang.Object ref = parentId_; 3020 if (ref instanceof java.lang.String) { 3021 com.google.protobuf.ByteString b = 3022 com.google.protobuf.ByteString.copyFromUtf8( 3023 (java.lang.String) ref); 3024 parentId_ = b; 3025 return b; 3026 } else { 3027 return (com.google.protobuf.ByteString) ref; 3028 } 3029 } 3030 3031 // optional bytes error = 5; 3032 public static final int ERROR_FIELD_NUMBER = 5; 3033 private com.google.protobuf.ByteString error_; 3034 /** 3035 * <code>optional bytes error = 5;</code> 3036 * 3037 * <pre> 3038 * when creating the context 3039 * </pre> 3040 */ 3041 public boolean hasError() { 3042 return ((bitField0_ & 0x00000008) == 0x00000008); 3043 } 3044 /** 3045 * <code>optional bytes error = 5;</code> 3046 * 3047 * <pre> 3048 * when creating the context 3049 * </pre> 3050 */ 3051 public com.google.protobuf.ByteString getError() { 3052 return error_; 3053 } 3054 3055 // optional bool recovery = 6; 3056 public static final int RECOVERY_FIELD_NUMBER = 6; 3057 private boolean recovery_; 3058 /** 3059 * <code>optional bool recovery = 6;</code> 3060 */ 3061 public boolean hasRecovery() { 3062 return ((bitField0_ & 0x00000010) == 0x00000010); 3063 } 3064 /** 3065 * <code>optional bool recovery = 6;</code> 3066 */ 3067 public boolean getRecovery() { 3068 return recovery_; 3069 } 3070 3071 // repeated .ContextStatusProto.ContextMessageProto context_message = 7; 3072 public static final int CONTEXT_MESSAGE_FIELD_NUMBER = 7; 3073 private java.util.List<org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto> contextMessage_; 3074 /** 3075 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 3076 */ 3077 public java.util.List<org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto> getContextMessageList() { 3078 return contextMessage_; 3079 } 3080 /** 3081 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 3082 */ 3083 public java.util.List<? extends org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProtoOrBuilder> 3084 getContextMessageOrBuilderList() { 3085 return contextMessage_; 3086 } 3087 /** 3088 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 3089 */ 3090 public int getContextMessageCount() { 3091 return contextMessage_.size(); 3092 } 3093 /** 3094 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 3095 */ 3096 public org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto getContextMessage(int index) { 3097 return contextMessage_.get(index); 3098 } 3099 /** 3100 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 3101 */ 3102 public org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProtoOrBuilder getContextMessageOrBuilder( 3103 int index) { 3104 return contextMessage_.get(index); 3105 } 3106 3107 private void initFields() { 3108 contextState_ = org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.State.READY; 3109 contextId_ = ""; 3110 parentId_ = ""; 3111 error_ = com.google.protobuf.ByteString.EMPTY; 3112 recovery_ = false; 3113 contextMessage_ = java.util.Collections.emptyList(); 3114 } 3115 private byte memoizedIsInitialized = -1; 3116 public final boolean isInitialized() { 3117 byte isInitialized = memoizedIsInitialized; 3118 if (isInitialized != -1) return isInitialized == 1; 3119 3120 if (!hasContextState()) { 3121 memoizedIsInitialized = 0; 3122 return false; 3123 } 3124 if (!hasContextId()) { 3125 memoizedIsInitialized = 0; 3126 return false; 3127 } 3128 for (int i = 0; i < getContextMessageCount(); i++) { 3129 if (!getContextMessage(i).isInitialized()) { 3130 memoizedIsInitialized = 0; 3131 return false; 3132 } 3133 } 3134 memoizedIsInitialized = 1; 3135 return true; 3136 } 3137 3138 public void writeTo(com.google.protobuf.CodedOutputStream output) 3139 throws java.io.IOException { 3140 getSerializedSize(); 3141 if (((bitField0_ & 0x00000001) == 0x00000001)) { 3142 output.writeEnum(1, contextState_.getNumber()); 3143 } 3144 if (((bitField0_ & 0x00000002) == 0x00000002)) { 3145 output.writeBytes(2, getContextIdBytes()); 3146 } 3147 if (((bitField0_ & 0x00000004) == 0x00000004)) { 3148 output.writeBytes(3, getParentIdBytes()); 3149 } 3150 if (((bitField0_ & 0x00000008) == 0x00000008)) { 3151 output.writeBytes(5, error_); 3152 } 3153 if (((bitField0_ & 0x00000010) == 0x00000010)) { 3154 output.writeBool(6, recovery_); 3155 } 3156 for (int i = 0; i < contextMessage_.size(); i++) { 3157 output.writeMessage(7, contextMessage_.get(i)); 3158 } 3159 getUnknownFields().writeTo(output); 3160 } 3161 3162 private int memoizedSerializedSize = -1; 3163 public int getSerializedSize() { 3164 int size = memoizedSerializedSize; 3165 if (size != -1) return size; 3166 3167 size = 0; 3168 if (((bitField0_ & 0x00000001) == 0x00000001)) { 3169 size += com.google.protobuf.CodedOutputStream 3170 .computeEnumSize(1, contextState_.getNumber()); 3171 } 3172 if (((bitField0_ & 0x00000002) == 0x00000002)) { 3173 size += com.google.protobuf.CodedOutputStream 3174 .computeBytesSize(2, getContextIdBytes()); 3175 } 3176 if (((bitField0_ & 0x00000004) == 0x00000004)) { 3177 size += com.google.protobuf.CodedOutputStream 3178 .computeBytesSize(3, getParentIdBytes()); 3179 } 3180 if (((bitField0_ & 0x00000008) == 0x00000008)) { 3181 size += com.google.protobuf.CodedOutputStream 3182 .computeBytesSize(5, error_); 3183 } 3184 if (((bitField0_ & 0x00000010) == 0x00000010)) { 3185 size += com.google.protobuf.CodedOutputStream 3186 .computeBoolSize(6, recovery_); 3187 } 3188 for (int i = 0; i < contextMessage_.size(); i++) { 3189 size += com.google.protobuf.CodedOutputStream 3190 .computeMessageSize(7, contextMessage_.get(i)); 3191 } 3192 size += getUnknownFields().getSerializedSize(); 3193 memoizedSerializedSize = size; 3194 return size; 3195 } 3196 3197 private static final long serialVersionUID = 0L; 3198 @java.lang.Override 3199 protected java.lang.Object writeReplace() 3200 throws java.io.ObjectStreamException { 3201 return super.writeReplace(); 3202 } 3203 3204 @java.lang.Override 3205 public boolean equals(final java.lang.Object obj) { 3206 if (obj == this) { 3207 return true; 3208 } 3209 if (!(obj instanceof org.apache.reef.proto.ReefServiceProtos.ContextStatusProto)) { 3210 return super.equals(obj); 3211 } 3212 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto other = (org.apache.reef.proto.ReefServiceProtos.ContextStatusProto) obj; 3213 3214 boolean result = true; 3215 result = result && (hasContextState() == other.hasContextState()); 3216 if (hasContextState()) { 3217 result = result && 3218 (getContextState() == other.getContextState()); 3219 } 3220 result = result && (hasContextId() == other.hasContextId()); 3221 if (hasContextId()) { 3222 result = result && getContextId() 3223 .equals(other.getContextId()); 3224 } 3225 result = result && (hasParentId() == other.hasParentId()); 3226 if (hasParentId()) { 3227 result = result && getParentId() 3228 .equals(other.getParentId()); 3229 } 3230 result = result && (hasError() == other.hasError()); 3231 if (hasError()) { 3232 result = result && getError() 3233 .equals(other.getError()); 3234 } 3235 result = result && (hasRecovery() == other.hasRecovery()); 3236 if (hasRecovery()) { 3237 result = result && (getRecovery() 3238 == other.getRecovery()); 3239 } 3240 result = result && getContextMessageList() 3241 .equals(other.getContextMessageList()); 3242 result = result && 3243 getUnknownFields().equals(other.getUnknownFields()); 3244 return result; 3245 } 3246 3247 private int memoizedHashCode = 0; 3248 @java.lang.Override 3249 public int hashCode() { 3250 if (memoizedHashCode != 0) { 3251 return memoizedHashCode; 3252 } 3253 int hash = 41; 3254 hash = (19 * hash) + getDescriptorForType().hashCode(); 3255 if (hasContextState()) { 3256 hash = (37 * hash) + CONTEXT_STATE_FIELD_NUMBER; 3257 hash = (53 * hash) + hashEnum(getContextState()); 3258 } 3259 if (hasContextId()) { 3260 hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; 3261 hash = (53 * hash) + getContextId().hashCode(); 3262 } 3263 if (hasParentId()) { 3264 hash = (37 * hash) + PARENT_ID_FIELD_NUMBER; 3265 hash = (53 * hash) + getParentId().hashCode(); 3266 } 3267 if (hasError()) { 3268 hash = (37 * hash) + ERROR_FIELD_NUMBER; 3269 hash = (53 * hash) + getError().hashCode(); 3270 } 3271 if (hasRecovery()) { 3272 hash = (37 * hash) + RECOVERY_FIELD_NUMBER; 3273 hash = (53 * hash) + hashBoolean(getRecovery()); 3274 } 3275 if (getContextMessageCount() > 0) { 3276 hash = (37 * hash) + CONTEXT_MESSAGE_FIELD_NUMBER; 3277 hash = (53 * hash) + getContextMessageList().hashCode(); 3278 } 3279 hash = (29 * hash) + getUnknownFields().hashCode(); 3280 memoizedHashCode = hash; 3281 return hash; 3282 } 3283 3284 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto parseFrom( 3285 com.google.protobuf.ByteString data) 3286 throws com.google.protobuf.InvalidProtocolBufferException { 3287 return PARSER.parseFrom(data); 3288 } 3289 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto parseFrom( 3290 com.google.protobuf.ByteString data, 3291 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3292 throws com.google.protobuf.InvalidProtocolBufferException { 3293 return PARSER.parseFrom(data, extensionRegistry); 3294 } 3295 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto parseFrom(byte[] data) 3296 throws com.google.protobuf.InvalidProtocolBufferException { 3297 return PARSER.parseFrom(data); 3298 } 3299 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto parseFrom( 3300 byte[] data, 3301 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3302 throws com.google.protobuf.InvalidProtocolBufferException { 3303 return PARSER.parseFrom(data, extensionRegistry); 3304 } 3305 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto parseFrom(java.io.InputStream input) 3306 throws java.io.IOException { 3307 return PARSER.parseFrom(input); 3308 } 3309 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto parseFrom( 3310 java.io.InputStream input, 3311 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3312 throws java.io.IOException { 3313 return PARSER.parseFrom(input, extensionRegistry); 3314 } 3315 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto parseDelimitedFrom(java.io.InputStream input) 3316 throws java.io.IOException { 3317 return PARSER.parseDelimitedFrom(input); 3318 } 3319 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto parseDelimitedFrom( 3320 java.io.InputStream input, 3321 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3322 throws java.io.IOException { 3323 return PARSER.parseDelimitedFrom(input, extensionRegistry); 3324 } 3325 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto parseFrom( 3326 com.google.protobuf.CodedInputStream input) 3327 throws java.io.IOException { 3328 return PARSER.parseFrom(input); 3329 } 3330 public static org.apache.reef.proto.ReefServiceProtos.ContextStatusProto parseFrom( 3331 com.google.protobuf.CodedInputStream input, 3332 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3333 throws java.io.IOException { 3334 return PARSER.parseFrom(input, extensionRegistry); 3335 } 3336 3337 public static Builder newBuilder() { return Builder.create(); } 3338 public Builder newBuilderForType() { return newBuilder(); } 3339 public static Builder newBuilder(org.apache.reef.proto.ReefServiceProtos.ContextStatusProto prototype) { 3340 return newBuilder().mergeFrom(prototype); 3341 } 3342 public Builder toBuilder() { return newBuilder(this); } 3343 3344 @java.lang.Override 3345 protected Builder newBuilderForType( 3346 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 3347 Builder builder = new Builder(parent); 3348 return builder; 3349 } 3350 /** 3351 * Protobuf type {@code ContextStatusProto} 3352 */ 3353 public static final class Builder extends 3354 com.google.protobuf.GeneratedMessage.Builder<Builder> 3355 implements org.apache.reef.proto.ReefServiceProtos.ContextStatusProtoOrBuilder { 3356 public static final com.google.protobuf.Descriptors.Descriptor 3357 getDescriptor() { 3358 return org.apache.reef.proto.ReefServiceProtos.internal_static_ContextStatusProto_descriptor; 3359 } 3360 3361 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 3362 internalGetFieldAccessorTable() { 3363 return org.apache.reef.proto.ReefServiceProtos.internal_static_ContextStatusProto_fieldAccessorTable 3364 .ensureFieldAccessorsInitialized( 3365 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.class, org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.Builder.class); 3366 } 3367 3368 // Construct using org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.newBuilder() 3369 private Builder() { 3370 maybeForceBuilderInitialization(); 3371 } 3372 3373 private Builder( 3374 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 3375 super(parent); 3376 maybeForceBuilderInitialization(); 3377 } 3378 private void maybeForceBuilderInitialization() { 3379 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { 3380 getContextMessageFieldBuilder(); 3381 } 3382 } 3383 private static Builder create() { 3384 return new Builder(); 3385 } 3386 3387 public Builder clear() { 3388 super.clear(); 3389 contextState_ = org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.State.READY; 3390 bitField0_ = (bitField0_ & ~0x00000001); 3391 contextId_ = ""; 3392 bitField0_ = (bitField0_ & ~0x00000002); 3393 parentId_ = ""; 3394 bitField0_ = (bitField0_ & ~0x00000004); 3395 error_ = com.google.protobuf.ByteString.EMPTY; 3396 bitField0_ = (bitField0_ & ~0x00000008); 3397 recovery_ = false; 3398 bitField0_ = (bitField0_ & ~0x00000010); 3399 if (contextMessageBuilder_ == null) { 3400 contextMessage_ = java.util.Collections.emptyList(); 3401 bitField0_ = (bitField0_ & ~0x00000020); 3402 } else { 3403 contextMessageBuilder_.clear(); 3404 } 3405 return this; 3406 } 3407 3408 public Builder clone() { 3409 return create().mergeFrom(buildPartial()); 3410 } 3411 3412 public com.google.protobuf.Descriptors.Descriptor 3413 getDescriptorForType() { 3414 return org.apache.reef.proto.ReefServiceProtos.internal_static_ContextStatusProto_descriptor; 3415 } 3416 3417 public org.apache.reef.proto.ReefServiceProtos.ContextStatusProto getDefaultInstanceForType() { 3418 return org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.getDefaultInstance(); 3419 } 3420 3421 public org.apache.reef.proto.ReefServiceProtos.ContextStatusProto build() { 3422 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto result = buildPartial(); 3423 if (!result.isInitialized()) { 3424 throw newUninitializedMessageException(result); 3425 } 3426 return result; 3427 } 3428 3429 public org.apache.reef.proto.ReefServiceProtos.ContextStatusProto buildPartial() { 3430 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto result = new org.apache.reef.proto.ReefServiceProtos.ContextStatusProto(this); 3431 int from_bitField0_ = bitField0_; 3432 int to_bitField0_ = 0; 3433 if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 3434 to_bitField0_ |= 0x00000001; 3435 } 3436 result.contextState_ = contextState_; 3437 if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 3438 to_bitField0_ |= 0x00000002; 3439 } 3440 result.contextId_ = contextId_; 3441 if (((from_bitField0_ & 0x00000004) == 0x00000004)) { 3442 to_bitField0_ |= 0x00000004; 3443 } 3444 result.parentId_ = parentId_; 3445 if (((from_bitField0_ & 0x00000008) == 0x00000008)) { 3446 to_bitField0_ |= 0x00000008; 3447 } 3448 result.error_ = error_; 3449 if (((from_bitField0_ & 0x00000010) == 0x00000010)) { 3450 to_bitField0_ |= 0x00000010; 3451 } 3452 result.recovery_ = recovery_; 3453 if (contextMessageBuilder_ == null) { 3454 if (((bitField0_ & 0x00000020) == 0x00000020)) { 3455 contextMessage_ = java.util.Collections.unmodifiableList(contextMessage_); 3456 bitField0_ = (bitField0_ & ~0x00000020); 3457 } 3458 result.contextMessage_ = contextMessage_; 3459 } else { 3460 result.contextMessage_ = contextMessageBuilder_.build(); 3461 } 3462 result.bitField0_ = to_bitField0_; 3463 onBuilt(); 3464 return result; 3465 } 3466 3467 public Builder mergeFrom(com.google.protobuf.Message other) { 3468 if (other instanceof org.apache.reef.proto.ReefServiceProtos.ContextStatusProto) { 3469 return mergeFrom((org.apache.reef.proto.ReefServiceProtos.ContextStatusProto)other); 3470 } else { 3471 super.mergeFrom(other); 3472 return this; 3473 } 3474 } 3475 3476 public Builder mergeFrom(org.apache.reef.proto.ReefServiceProtos.ContextStatusProto other) { 3477 if (other == org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.getDefaultInstance()) return this; 3478 if (other.hasContextState()) { 3479 setContextState(other.getContextState()); 3480 } 3481 if (other.hasContextId()) { 3482 bitField0_ |= 0x00000002; 3483 contextId_ = other.contextId_; 3484 onChanged(); 3485 } 3486 if (other.hasParentId()) { 3487 bitField0_ |= 0x00000004; 3488 parentId_ = other.parentId_; 3489 onChanged(); 3490 } 3491 if (other.hasError()) { 3492 setError(other.getError()); 3493 } 3494 if (other.hasRecovery()) { 3495 setRecovery(other.getRecovery()); 3496 } 3497 if (contextMessageBuilder_ == null) { 3498 if (!other.contextMessage_.isEmpty()) { 3499 if (contextMessage_.isEmpty()) { 3500 contextMessage_ = other.contextMessage_; 3501 bitField0_ = (bitField0_ & ~0x00000020); 3502 } else { 3503 ensureContextMessageIsMutable(); 3504 contextMessage_.addAll(other.contextMessage_); 3505 } 3506 onChanged(); 3507 } 3508 } else { 3509 if (!other.contextMessage_.isEmpty()) { 3510 if (contextMessageBuilder_.isEmpty()) { 3511 contextMessageBuilder_.dispose(); 3512 contextMessageBuilder_ = null; 3513 contextMessage_ = other.contextMessage_; 3514 bitField0_ = (bitField0_ & ~0x00000020); 3515 contextMessageBuilder_ = 3516 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? 3517 getContextMessageFieldBuilder() : null; 3518 } else { 3519 contextMessageBuilder_.addAllMessages(other.contextMessage_); 3520 } 3521 } 3522 } 3523 this.mergeUnknownFields(other.getUnknownFields()); 3524 return this; 3525 } 3526 3527 public final boolean isInitialized() { 3528 if (!hasContextState()) { 3529 3530 return false; 3531 } 3532 if (!hasContextId()) { 3533 3534 return false; 3535 } 3536 for (int i = 0; i < getContextMessageCount(); i++) { 3537 if (!getContextMessage(i).isInitialized()) { 3538 3539 return false; 3540 } 3541 } 3542 return true; 3543 } 3544 3545 public Builder mergeFrom( 3546 com.google.protobuf.CodedInputStream input, 3547 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3548 throws java.io.IOException { 3549 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto parsedMessage = null; 3550 try { 3551 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 3552 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 3553 parsedMessage = (org.apache.reef.proto.ReefServiceProtos.ContextStatusProto) e.getUnfinishedMessage(); 3554 throw e; 3555 } finally { 3556 if (parsedMessage != null) { 3557 mergeFrom(parsedMessage); 3558 } 3559 } 3560 return this; 3561 } 3562 private int bitField0_; 3563 3564 // required .ContextStatusProto.State context_state = 1; 3565 private org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.State contextState_ = org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.State.READY; 3566 /** 3567 * <code>required .ContextStatusProto.State context_state = 1;</code> 3568 */ 3569 public boolean hasContextState() { 3570 return ((bitField0_ & 0x00000001) == 0x00000001); 3571 } 3572 /** 3573 * <code>required .ContextStatusProto.State context_state = 1;</code> 3574 */ 3575 public org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.State getContextState() { 3576 return contextState_; 3577 } 3578 /** 3579 * <code>required .ContextStatusProto.State context_state = 1;</code> 3580 */ 3581 public Builder setContextState(org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.State value) { 3582 if (value == null) { 3583 throw new NullPointerException(); 3584 } 3585 bitField0_ |= 0x00000001; 3586 contextState_ = value; 3587 onChanged(); 3588 return this; 3589 } 3590 /** 3591 * <code>required .ContextStatusProto.State context_state = 1;</code> 3592 */ 3593 public Builder clearContextState() { 3594 bitField0_ = (bitField0_ & ~0x00000001); 3595 contextState_ = org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.State.READY; 3596 onChanged(); 3597 return this; 3598 } 3599 3600 // required string context_id = 2; 3601 private java.lang.Object contextId_ = ""; 3602 /** 3603 * <code>required string context_id = 2;</code> 3604 */ 3605 public boolean hasContextId() { 3606 return ((bitField0_ & 0x00000002) == 0x00000002); 3607 } 3608 /** 3609 * <code>required string context_id = 2;</code> 3610 */ 3611 public java.lang.String getContextId() { 3612 java.lang.Object ref = contextId_; 3613 if (!(ref instanceof java.lang.String)) { 3614 java.lang.String s = ((com.google.protobuf.ByteString) ref) 3615 .toStringUtf8(); 3616 contextId_ = s; 3617 return s; 3618 } else { 3619 return (java.lang.String) ref; 3620 } 3621 } 3622 /** 3623 * <code>required string context_id = 2;</code> 3624 */ 3625 public com.google.protobuf.ByteString 3626 getContextIdBytes() { 3627 java.lang.Object ref = contextId_; 3628 if (ref instanceof String) { 3629 com.google.protobuf.ByteString b = 3630 com.google.protobuf.ByteString.copyFromUtf8( 3631 (java.lang.String) ref); 3632 contextId_ = b; 3633 return b; 3634 } else { 3635 return (com.google.protobuf.ByteString) ref; 3636 } 3637 } 3638 /** 3639 * <code>required string context_id = 2;</code> 3640 */ 3641 public Builder setContextId( 3642 java.lang.String value) { 3643 if (value == null) { 3644 throw new NullPointerException(); 3645 } 3646 bitField0_ |= 0x00000002; 3647 contextId_ = value; 3648 onChanged(); 3649 return this; 3650 } 3651 /** 3652 * <code>required string context_id = 2;</code> 3653 */ 3654 public Builder clearContextId() { 3655 bitField0_ = (bitField0_ & ~0x00000002); 3656 contextId_ = getDefaultInstance().getContextId(); 3657 onChanged(); 3658 return this; 3659 } 3660 /** 3661 * <code>required string context_id = 2;</code> 3662 */ 3663 public Builder setContextIdBytes( 3664 com.google.protobuf.ByteString value) { 3665 if (value == null) { 3666 throw new NullPointerException(); 3667 } 3668 bitField0_ |= 0x00000002; 3669 contextId_ = value; 3670 onChanged(); 3671 return this; 3672 } 3673 3674 // optional string parent_id = 3; 3675 private java.lang.Object parentId_ = ""; 3676 /** 3677 * <code>optional string parent_id = 3;</code> 3678 */ 3679 public boolean hasParentId() { 3680 return ((bitField0_ & 0x00000004) == 0x00000004); 3681 } 3682 /** 3683 * <code>optional string parent_id = 3;</code> 3684 */ 3685 public java.lang.String getParentId() { 3686 java.lang.Object ref = parentId_; 3687 if (!(ref instanceof java.lang.String)) { 3688 java.lang.String s = ((com.google.protobuf.ByteString) ref) 3689 .toStringUtf8(); 3690 parentId_ = s; 3691 return s; 3692 } else { 3693 return (java.lang.String) ref; 3694 } 3695 } 3696 /** 3697 * <code>optional string parent_id = 3;</code> 3698 */ 3699 public com.google.protobuf.ByteString 3700 getParentIdBytes() { 3701 java.lang.Object ref = parentId_; 3702 if (ref instanceof String) { 3703 com.google.protobuf.ByteString b = 3704 com.google.protobuf.ByteString.copyFromUtf8( 3705 (java.lang.String) ref); 3706 parentId_ = b; 3707 return b; 3708 } else { 3709 return (com.google.protobuf.ByteString) ref; 3710 } 3711 } 3712 /** 3713 * <code>optional string parent_id = 3;</code> 3714 */ 3715 public Builder setParentId( 3716 java.lang.String value) { 3717 if (value == null) { 3718 throw new NullPointerException(); 3719 } 3720 bitField0_ |= 0x00000004; 3721 parentId_ = value; 3722 onChanged(); 3723 return this; 3724 } 3725 /** 3726 * <code>optional string parent_id = 3;</code> 3727 */ 3728 public Builder clearParentId() { 3729 bitField0_ = (bitField0_ & ~0x00000004); 3730 parentId_ = getDefaultInstance().getParentId(); 3731 onChanged(); 3732 return this; 3733 } 3734 /** 3735 * <code>optional string parent_id = 3;</code> 3736 */ 3737 public Builder setParentIdBytes( 3738 com.google.protobuf.ByteString value) { 3739 if (value == null) { 3740 throw new NullPointerException(); 3741 } 3742 bitField0_ |= 0x00000004; 3743 parentId_ = value; 3744 onChanged(); 3745 return this; 3746 } 3747 3748 // optional bytes error = 5; 3749 private com.google.protobuf.ByteString error_ = com.google.protobuf.ByteString.EMPTY; 3750 /** 3751 * <code>optional bytes error = 5;</code> 3752 * 3753 * <pre> 3754 * when creating the context 3755 * </pre> 3756 */ 3757 public boolean hasError() { 3758 return ((bitField0_ & 0x00000008) == 0x00000008); 3759 } 3760 /** 3761 * <code>optional bytes error = 5;</code> 3762 * 3763 * <pre> 3764 * when creating the context 3765 * </pre> 3766 */ 3767 public com.google.protobuf.ByteString getError() { 3768 return error_; 3769 } 3770 /** 3771 * <code>optional bytes error = 5;</code> 3772 * 3773 * <pre> 3774 * when creating the context 3775 * </pre> 3776 */ 3777 public Builder setError(com.google.protobuf.ByteString value) { 3778 if (value == null) { 3779 throw new NullPointerException(); 3780 } 3781 bitField0_ |= 0x00000008; 3782 error_ = value; 3783 onChanged(); 3784 return this; 3785 } 3786 /** 3787 * <code>optional bytes error = 5;</code> 3788 * 3789 * <pre> 3790 * when creating the context 3791 * </pre> 3792 */ 3793 public Builder clearError() { 3794 bitField0_ = (bitField0_ & ~0x00000008); 3795 error_ = getDefaultInstance().getError(); 3796 onChanged(); 3797 return this; 3798 } 3799 3800 // optional bool recovery = 6; 3801 private boolean recovery_ ; 3802 /** 3803 * <code>optional bool recovery = 6;</code> 3804 */ 3805 public boolean hasRecovery() { 3806 return ((bitField0_ & 0x00000010) == 0x00000010); 3807 } 3808 /** 3809 * <code>optional bool recovery = 6;</code> 3810 */ 3811 public boolean getRecovery() { 3812 return recovery_; 3813 } 3814 /** 3815 * <code>optional bool recovery = 6;</code> 3816 */ 3817 public Builder setRecovery(boolean value) { 3818 bitField0_ |= 0x00000010; 3819 recovery_ = value; 3820 onChanged(); 3821 return this; 3822 } 3823 /** 3824 * <code>optional bool recovery = 6;</code> 3825 */ 3826 public Builder clearRecovery() { 3827 bitField0_ = (bitField0_ & ~0x00000010); 3828 recovery_ = false; 3829 onChanged(); 3830 return this; 3831 } 3832 3833 // repeated .ContextStatusProto.ContextMessageProto context_message = 7; 3834 private java.util.List<org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto> contextMessage_ = 3835 java.util.Collections.emptyList(); 3836 private void ensureContextMessageIsMutable() { 3837 if (!((bitField0_ & 0x00000020) == 0x00000020)) { 3838 contextMessage_ = new java.util.ArrayList<org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto>(contextMessage_); 3839 bitField0_ |= 0x00000020; 3840 } 3841 } 3842 3843 private com.google.protobuf.RepeatedFieldBuilder< 3844 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto, org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.Builder, org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProtoOrBuilder> contextMessageBuilder_; 3845 3846 /** 3847 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 3848 */ 3849 public java.util.List<org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto> getContextMessageList() { 3850 if (contextMessageBuilder_ == null) { 3851 return java.util.Collections.unmodifiableList(contextMessage_); 3852 } else { 3853 return contextMessageBuilder_.getMessageList(); 3854 } 3855 } 3856 /** 3857 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 3858 */ 3859 public int getContextMessageCount() { 3860 if (contextMessageBuilder_ == null) { 3861 return contextMessage_.size(); 3862 } else { 3863 return contextMessageBuilder_.getCount(); 3864 } 3865 } 3866 /** 3867 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 3868 */ 3869 public org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto getContextMessage(int index) { 3870 if (contextMessageBuilder_ == null) { 3871 return contextMessage_.get(index); 3872 } else { 3873 return contextMessageBuilder_.getMessage(index); 3874 } 3875 } 3876 /** 3877 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 3878 */ 3879 public Builder setContextMessage( 3880 int index, org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto value) { 3881 if (contextMessageBuilder_ == null) { 3882 if (value == null) { 3883 throw new NullPointerException(); 3884 } 3885 ensureContextMessageIsMutable(); 3886 contextMessage_.set(index, value); 3887 onChanged(); 3888 } else { 3889 contextMessageBuilder_.setMessage(index, value); 3890 } 3891 return this; 3892 } 3893 /** 3894 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 3895 */ 3896 public Builder setContextMessage( 3897 int index, org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.Builder builderForValue) { 3898 if (contextMessageBuilder_ == null) { 3899 ensureContextMessageIsMutable(); 3900 contextMessage_.set(index, builderForValue.build()); 3901 onChanged(); 3902 } else { 3903 contextMessageBuilder_.setMessage(index, builderForValue.build()); 3904 } 3905 return this; 3906 } 3907 /** 3908 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 3909 */ 3910 public Builder addContextMessage(org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto value) { 3911 if (contextMessageBuilder_ == null) { 3912 if (value == null) { 3913 throw new NullPointerException(); 3914 } 3915 ensureContextMessageIsMutable(); 3916 contextMessage_.add(value); 3917 onChanged(); 3918 } else { 3919 contextMessageBuilder_.addMessage(value); 3920 } 3921 return this; 3922 } 3923 /** 3924 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 3925 */ 3926 public Builder addContextMessage( 3927 int index, org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto value) { 3928 if (contextMessageBuilder_ == null) { 3929 if (value == null) { 3930 throw new NullPointerException(); 3931 } 3932 ensureContextMessageIsMutable(); 3933 contextMessage_.add(index, value); 3934 onChanged(); 3935 } else { 3936 contextMessageBuilder_.addMessage(index, value); 3937 } 3938 return this; 3939 } 3940 /** 3941 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 3942 */ 3943 public Builder addContextMessage( 3944 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.Builder builderForValue) { 3945 if (contextMessageBuilder_ == null) { 3946 ensureContextMessageIsMutable(); 3947 contextMessage_.add(builderForValue.build()); 3948 onChanged(); 3949 } else { 3950 contextMessageBuilder_.addMessage(builderForValue.build()); 3951 } 3952 return this; 3953 } 3954 /** 3955 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 3956 */ 3957 public Builder addContextMessage( 3958 int index, org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.Builder builderForValue) { 3959 if (contextMessageBuilder_ == null) { 3960 ensureContextMessageIsMutable(); 3961 contextMessage_.add(index, builderForValue.build()); 3962 onChanged(); 3963 } else { 3964 contextMessageBuilder_.addMessage(index, builderForValue.build()); 3965 } 3966 return this; 3967 } 3968 /** 3969 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 3970 */ 3971 public Builder addAllContextMessage( 3972 java.lang.Iterable<? extends org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto> values) { 3973 if (contextMessageBuilder_ == null) { 3974 ensureContextMessageIsMutable(); 3975 super.addAll(values, contextMessage_); 3976 onChanged(); 3977 } else { 3978 contextMessageBuilder_.addAllMessages(values); 3979 } 3980 return this; 3981 } 3982 /** 3983 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 3984 */ 3985 public Builder clearContextMessage() { 3986 if (contextMessageBuilder_ == null) { 3987 contextMessage_ = java.util.Collections.emptyList(); 3988 bitField0_ = (bitField0_ & ~0x00000020); 3989 onChanged(); 3990 } else { 3991 contextMessageBuilder_.clear(); 3992 } 3993 return this; 3994 } 3995 /** 3996 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 3997 */ 3998 public Builder removeContextMessage(int index) { 3999 if (contextMessageBuilder_ == null) { 4000 ensureContextMessageIsMutable(); 4001 contextMessage_.remove(index); 4002 onChanged(); 4003 } else { 4004 contextMessageBuilder_.remove(index); 4005 } 4006 return this; 4007 } 4008 /** 4009 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 4010 */ 4011 public org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.Builder getContextMessageBuilder( 4012 int index) { 4013 return getContextMessageFieldBuilder().getBuilder(index); 4014 } 4015 /** 4016 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 4017 */ 4018 public org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProtoOrBuilder getContextMessageOrBuilder( 4019 int index) { 4020 if (contextMessageBuilder_ == null) { 4021 return contextMessage_.get(index); } else { 4022 return contextMessageBuilder_.getMessageOrBuilder(index); 4023 } 4024 } 4025 /** 4026 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 4027 */ 4028 public java.util.List<? extends org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProtoOrBuilder> 4029 getContextMessageOrBuilderList() { 4030 if (contextMessageBuilder_ != null) { 4031 return contextMessageBuilder_.getMessageOrBuilderList(); 4032 } else { 4033 return java.util.Collections.unmodifiableList(contextMessage_); 4034 } 4035 } 4036 /** 4037 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 4038 */ 4039 public org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.Builder addContextMessageBuilder() { 4040 return getContextMessageFieldBuilder().addBuilder( 4041 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.getDefaultInstance()); 4042 } 4043 /** 4044 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 4045 */ 4046 public org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.Builder addContextMessageBuilder( 4047 int index) { 4048 return getContextMessageFieldBuilder().addBuilder( 4049 index, org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.getDefaultInstance()); 4050 } 4051 /** 4052 * <code>repeated .ContextStatusProto.ContextMessageProto context_message = 7;</code> 4053 */ 4054 public java.util.List<org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.Builder> 4055 getContextMessageBuilderList() { 4056 return getContextMessageFieldBuilder().getBuilderList(); 4057 } 4058 private com.google.protobuf.RepeatedFieldBuilder< 4059 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto, org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.Builder, org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProtoOrBuilder> 4060 getContextMessageFieldBuilder() { 4061 if (contextMessageBuilder_ == null) { 4062 contextMessageBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< 4063 org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto, org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProto.Builder, org.apache.reef.proto.ReefServiceProtos.ContextStatusProto.ContextMessageProtoOrBuilder>( 4064 contextMessage_, 4065 ((bitField0_ & 0x00000020) == 0x00000020), 4066 getParentForChildren(), 4067 isClean()); 4068 contextMessage_ = null; 4069 } 4070 return contextMessageBuilder_; 4071 } 4072 4073 // @@protoc_insertion_point(builder_scope:ContextStatusProto) 4074 } 4075 4076 static { 4077 defaultInstance = new ContextStatusProto(true); 4078 defaultInstance.initFields(); 4079 } 4080 4081 // @@protoc_insertion_point(class_scope:ContextStatusProto) 4082 } 4083 4084 public interface TaskStatusProtoOrBuilder 4085 extends com.google.protobuf.MessageOrBuilder { 4086 4087 // required string task_id = 1; 4088 /** 4089 * <code>required string task_id = 1;</code> 4090 */ 4091 boolean hasTaskId(); 4092 /** 4093 * <code>required string task_id = 1;</code> 4094 */ 4095 java.lang.String getTaskId(); 4096 /** 4097 * <code>required string task_id = 1;</code> 4098 */ 4099 com.google.protobuf.ByteString 4100 getTaskIdBytes(); 4101 4102 // required string context_id = 2; 4103 /** 4104 * <code>required string context_id = 2;</code> 4105 */ 4106 boolean hasContextId(); 4107 /** 4108 * <code>required string context_id = 2;</code> 4109 */ 4110 java.lang.String getContextId(); 4111 /** 4112 * <code>required string context_id = 2;</code> 4113 */ 4114 com.google.protobuf.ByteString 4115 getContextIdBytes(); 4116 4117 // required .State state = 3; 4118 /** 4119 * <code>required .State state = 3;</code> 4120 */ 4121 boolean hasState(); 4122 /** 4123 * <code>required .State state = 3;</code> 4124 */ 4125 org.apache.reef.proto.ReefServiceProtos.State getState(); 4126 4127 // optional bytes result = 4; 4128 /** 4129 * <code>optional bytes result = 4;</code> 4130 * 4131 * <pre> 4132 * e.g., return value from Task.call() 4133 * </pre> 4134 */ 4135 boolean hasResult(); 4136 /** 4137 * <code>optional bytes result = 4;</code> 4138 * 4139 * <pre> 4140 * e.g., return value from Task.call() 4141 * </pre> 4142 */ 4143 com.google.protobuf.ByteString getResult(); 4144 4145 // optional bool recovery = 5; 4146 /** 4147 * <code>optional bool recovery = 5;</code> 4148 */ 4149 boolean hasRecovery(); 4150 /** 4151 * <code>optional bool recovery = 5;</code> 4152 */ 4153 boolean getRecovery(); 4154 4155 // repeated .TaskStatusProto.TaskMessageProto task_message = 6; 4156 /** 4157 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 4158 */ 4159 java.util.List<org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto> 4160 getTaskMessageList(); 4161 /** 4162 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 4163 */ 4164 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto getTaskMessage(int index); 4165 /** 4166 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 4167 */ 4168 int getTaskMessageCount(); 4169 /** 4170 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 4171 */ 4172 java.util.List<? extends org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProtoOrBuilder> 4173 getTaskMessageOrBuilderList(); 4174 /** 4175 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 4176 */ 4177 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProtoOrBuilder getTaskMessageOrBuilder( 4178 int index); 4179 } 4180 /** 4181 * Protobuf type {@code TaskStatusProto} 4182 */ 4183 public static final class TaskStatusProto extends 4184 com.google.protobuf.GeneratedMessage 4185 implements TaskStatusProtoOrBuilder { 4186 // Use TaskStatusProto.newBuilder() to construct. 4187 private TaskStatusProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) { 4188 super(builder); 4189 this.unknownFields = builder.getUnknownFields(); 4190 } 4191 private TaskStatusProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } 4192 4193 private static final TaskStatusProto defaultInstance; 4194 public static TaskStatusProto getDefaultInstance() { 4195 return defaultInstance; 4196 } 4197 4198 public TaskStatusProto getDefaultInstanceForType() { 4199 return defaultInstance; 4200 } 4201 4202 private final com.google.protobuf.UnknownFieldSet unknownFields; 4203 @java.lang.Override 4204 public final com.google.protobuf.UnknownFieldSet 4205 getUnknownFields() { 4206 return this.unknownFields; 4207 } 4208 private TaskStatusProto( 4209 com.google.protobuf.CodedInputStream input, 4210 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4211 throws com.google.protobuf.InvalidProtocolBufferException { 4212 initFields(); 4213 int mutable_bitField0_ = 0; 4214 com.google.protobuf.UnknownFieldSet.Builder unknownFields = 4215 com.google.protobuf.UnknownFieldSet.newBuilder(); 4216 try { 4217 boolean done = false; 4218 while (!done) { 4219 int tag = input.readTag(); 4220 switch (tag) { 4221 case 0: 4222 done = true; 4223 break; 4224 default: { 4225 if (!parseUnknownField(input, unknownFields, 4226 extensionRegistry, tag)) { 4227 done = true; 4228 } 4229 break; 4230 } 4231 case 10: { 4232 bitField0_ |= 0x00000001; 4233 taskId_ = input.readBytes(); 4234 break; 4235 } 4236 case 18: { 4237 bitField0_ |= 0x00000002; 4238 contextId_ = input.readBytes(); 4239 break; 4240 } 4241 case 24: { 4242 int rawValue = input.readEnum(); 4243 org.apache.reef.proto.ReefServiceProtos.State value = org.apache.reef.proto.ReefServiceProtos.State.valueOf(rawValue); 4244 if (value == null) { 4245 unknownFields.mergeVarintField(3, rawValue); 4246 } else { 4247 bitField0_ |= 0x00000004; 4248 state_ = value; 4249 } 4250 break; 4251 } 4252 case 34: { 4253 bitField0_ |= 0x00000008; 4254 result_ = input.readBytes(); 4255 break; 4256 } 4257 case 40: { 4258 bitField0_ |= 0x00000010; 4259 recovery_ = input.readBool(); 4260 break; 4261 } 4262 case 50: { 4263 if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { 4264 taskMessage_ = new java.util.ArrayList<org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto>(); 4265 mutable_bitField0_ |= 0x00000020; 4266 } 4267 taskMessage_.add(input.readMessage(org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.PARSER, extensionRegistry)); 4268 break; 4269 } 4270 } 4271 } 4272 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 4273 throw e.setUnfinishedMessage(this); 4274 } catch (java.io.IOException e) { 4275 throw new com.google.protobuf.InvalidProtocolBufferException( 4276 e.getMessage()).setUnfinishedMessage(this); 4277 } finally { 4278 if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { 4279 taskMessage_ = java.util.Collections.unmodifiableList(taskMessage_); 4280 } 4281 this.unknownFields = unknownFields.build(); 4282 makeExtensionsImmutable(); 4283 } 4284 } 4285 public static final com.google.protobuf.Descriptors.Descriptor 4286 getDescriptor() { 4287 return org.apache.reef.proto.ReefServiceProtos.internal_static_TaskStatusProto_descriptor; 4288 } 4289 4290 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 4291 internalGetFieldAccessorTable() { 4292 return org.apache.reef.proto.ReefServiceProtos.internal_static_TaskStatusProto_fieldAccessorTable 4293 .ensureFieldAccessorsInitialized( 4294 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.class, org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.Builder.class); 4295 } 4296 4297 public static com.google.protobuf.Parser<TaskStatusProto> PARSER = 4298 new com.google.protobuf.AbstractParser<TaskStatusProto>() { 4299 public TaskStatusProto parsePartialFrom( 4300 com.google.protobuf.CodedInputStream input, 4301 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4302 throws com.google.protobuf.InvalidProtocolBufferException { 4303 return new TaskStatusProto(input, extensionRegistry); 4304 } 4305 }; 4306 4307 @java.lang.Override 4308 public com.google.protobuf.Parser<TaskStatusProto> getParserForType() { 4309 return PARSER; 4310 } 4311 4312 public interface TaskMessageProtoOrBuilder 4313 extends com.google.protobuf.MessageOrBuilder { 4314 4315 // required string source_id = 1; 4316 /** 4317 * <code>required string source_id = 1;</code> 4318 */ 4319 boolean hasSourceId(); 4320 /** 4321 * <code>required string source_id = 1;</code> 4322 */ 4323 java.lang.String getSourceId(); 4324 /** 4325 * <code>required string source_id = 1;</code> 4326 */ 4327 com.google.protobuf.ByteString 4328 getSourceIdBytes(); 4329 4330 // required bytes message = 2; 4331 /** 4332 * <code>required bytes message = 2;</code> 4333 */ 4334 boolean hasMessage(); 4335 /** 4336 * <code>required bytes message = 2;</code> 4337 */ 4338 com.google.protobuf.ByteString getMessage(); 4339 } 4340 /** 4341 * Protobuf type {@code TaskStatusProto.TaskMessageProto} 4342 * 4343 * <pre> 4344 * TaskMessageSource messages 4345 * </pre> 4346 */ 4347 public static final class TaskMessageProto extends 4348 com.google.protobuf.GeneratedMessage 4349 implements TaskMessageProtoOrBuilder { 4350 // Use TaskMessageProto.newBuilder() to construct. 4351 private TaskMessageProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) { 4352 super(builder); 4353 this.unknownFields = builder.getUnknownFields(); 4354 } 4355 private TaskMessageProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } 4356 4357 private static final TaskMessageProto defaultInstance; 4358 public static TaskMessageProto getDefaultInstance() { 4359 return defaultInstance; 4360 } 4361 4362 public TaskMessageProto getDefaultInstanceForType() { 4363 return defaultInstance; 4364 } 4365 4366 private final com.google.protobuf.UnknownFieldSet unknownFields; 4367 @java.lang.Override 4368 public final com.google.protobuf.UnknownFieldSet 4369 getUnknownFields() { 4370 return this.unknownFields; 4371 } 4372 private TaskMessageProto( 4373 com.google.protobuf.CodedInputStream input, 4374 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4375 throws com.google.protobuf.InvalidProtocolBufferException { 4376 initFields(); 4377 int mutable_bitField0_ = 0; 4378 com.google.protobuf.UnknownFieldSet.Builder unknownFields = 4379 com.google.protobuf.UnknownFieldSet.newBuilder(); 4380 try { 4381 boolean done = false; 4382 while (!done) { 4383 int tag = input.readTag(); 4384 switch (tag) { 4385 case 0: 4386 done = true; 4387 break; 4388 default: { 4389 if (!parseUnknownField(input, unknownFields, 4390 extensionRegistry, tag)) { 4391 done = true; 4392 } 4393 break; 4394 } 4395 case 10: { 4396 bitField0_ |= 0x00000001; 4397 sourceId_ = input.readBytes(); 4398 break; 4399 } 4400 case 18: { 4401 bitField0_ |= 0x00000002; 4402 message_ = input.readBytes(); 4403 break; 4404 } 4405 } 4406 } 4407 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 4408 throw e.setUnfinishedMessage(this); 4409 } catch (java.io.IOException e) { 4410 throw new com.google.protobuf.InvalidProtocolBufferException( 4411 e.getMessage()).setUnfinishedMessage(this); 4412 } finally { 4413 this.unknownFields = unknownFields.build(); 4414 makeExtensionsImmutable(); 4415 } 4416 } 4417 public static final com.google.protobuf.Descriptors.Descriptor 4418 getDescriptor() { 4419 return org.apache.reef.proto.ReefServiceProtos.internal_static_TaskStatusProto_TaskMessageProto_descriptor; 4420 } 4421 4422 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 4423 internalGetFieldAccessorTable() { 4424 return org.apache.reef.proto.ReefServiceProtos.internal_static_TaskStatusProto_TaskMessageProto_fieldAccessorTable 4425 .ensureFieldAccessorsInitialized( 4426 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.class, org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.Builder.class); 4427 } 4428 4429 public static com.google.protobuf.Parser<TaskMessageProto> PARSER = 4430 new com.google.protobuf.AbstractParser<TaskMessageProto>() { 4431 public TaskMessageProto parsePartialFrom( 4432 com.google.protobuf.CodedInputStream input, 4433 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4434 throws com.google.protobuf.InvalidProtocolBufferException { 4435 return new TaskMessageProto(input, extensionRegistry); 4436 } 4437 }; 4438 4439 @java.lang.Override 4440 public com.google.protobuf.Parser<TaskMessageProto> getParserForType() { 4441 return PARSER; 4442 } 4443 4444 private int bitField0_; 4445 // required string source_id = 1; 4446 public static final int SOURCE_ID_FIELD_NUMBER = 1; 4447 private java.lang.Object sourceId_; 4448 /** 4449 * <code>required string source_id = 1;</code> 4450 */ 4451 public boolean hasSourceId() { 4452 return ((bitField0_ & 0x00000001) == 0x00000001); 4453 } 4454 /** 4455 * <code>required string source_id = 1;</code> 4456 */ 4457 public java.lang.String getSourceId() { 4458 java.lang.Object ref = sourceId_; 4459 if (ref instanceof java.lang.String) { 4460 return (java.lang.String) ref; 4461 } else { 4462 com.google.protobuf.ByteString bs = 4463 (com.google.protobuf.ByteString) ref; 4464 java.lang.String s = bs.toStringUtf8(); 4465 if (bs.isValidUtf8()) { 4466 sourceId_ = s; 4467 } 4468 return s; 4469 } 4470 } 4471 /** 4472 * <code>required string source_id = 1;</code> 4473 */ 4474 public com.google.protobuf.ByteString 4475 getSourceIdBytes() { 4476 java.lang.Object ref = sourceId_; 4477 if (ref instanceof java.lang.String) { 4478 com.google.protobuf.ByteString b = 4479 com.google.protobuf.ByteString.copyFromUtf8( 4480 (java.lang.String) ref); 4481 sourceId_ = b; 4482 return b; 4483 } else { 4484 return (com.google.protobuf.ByteString) ref; 4485 } 4486 } 4487 4488 // required bytes message = 2; 4489 public static final int MESSAGE_FIELD_NUMBER = 2; 4490 private com.google.protobuf.ByteString message_; 4491 /** 4492 * <code>required bytes message = 2;</code> 4493 */ 4494 public boolean hasMessage() { 4495 return ((bitField0_ & 0x00000002) == 0x00000002); 4496 } 4497 /** 4498 * <code>required bytes message = 2;</code> 4499 */ 4500 public com.google.protobuf.ByteString getMessage() { 4501 return message_; 4502 } 4503 4504 private void initFields() { 4505 sourceId_ = ""; 4506 message_ = com.google.protobuf.ByteString.EMPTY; 4507 } 4508 private byte memoizedIsInitialized = -1; 4509 public final boolean isInitialized() { 4510 byte isInitialized = memoizedIsInitialized; 4511 if (isInitialized != -1) return isInitialized == 1; 4512 4513 if (!hasSourceId()) { 4514 memoizedIsInitialized = 0; 4515 return false; 4516 } 4517 if (!hasMessage()) { 4518 memoizedIsInitialized = 0; 4519 return false; 4520 } 4521 memoizedIsInitialized = 1; 4522 return true; 4523 } 4524 4525 public void writeTo(com.google.protobuf.CodedOutputStream output) 4526 throws java.io.IOException { 4527 getSerializedSize(); 4528 if (((bitField0_ & 0x00000001) == 0x00000001)) { 4529 output.writeBytes(1, getSourceIdBytes()); 4530 } 4531 if (((bitField0_ & 0x00000002) == 0x00000002)) { 4532 output.writeBytes(2, message_); 4533 } 4534 getUnknownFields().writeTo(output); 4535 } 4536 4537 private int memoizedSerializedSize = -1; 4538 public int getSerializedSize() { 4539 int size = memoizedSerializedSize; 4540 if (size != -1) return size; 4541 4542 size = 0; 4543 if (((bitField0_ & 0x00000001) == 0x00000001)) { 4544 size += com.google.protobuf.CodedOutputStream 4545 .computeBytesSize(1, getSourceIdBytes()); 4546 } 4547 if (((bitField0_ & 0x00000002) == 0x00000002)) { 4548 size += com.google.protobuf.CodedOutputStream 4549 .computeBytesSize(2, message_); 4550 } 4551 size += getUnknownFields().getSerializedSize(); 4552 memoizedSerializedSize = size; 4553 return size; 4554 } 4555 4556 private static final long serialVersionUID = 0L; 4557 @java.lang.Override 4558 protected java.lang.Object writeReplace() 4559 throws java.io.ObjectStreamException { 4560 return super.writeReplace(); 4561 } 4562 4563 @java.lang.Override 4564 public boolean equals(final java.lang.Object obj) { 4565 if (obj == this) { 4566 return true; 4567 } 4568 if (!(obj instanceof org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto)) { 4569 return super.equals(obj); 4570 } 4571 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto other = (org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto) obj; 4572 4573 boolean result = true; 4574 result = result && (hasSourceId() == other.hasSourceId()); 4575 if (hasSourceId()) { 4576 result = result && getSourceId() 4577 .equals(other.getSourceId()); 4578 } 4579 result = result && (hasMessage() == other.hasMessage()); 4580 if (hasMessage()) { 4581 result = result && getMessage() 4582 .equals(other.getMessage()); 4583 } 4584 result = result && 4585 getUnknownFields().equals(other.getUnknownFields()); 4586 return result; 4587 } 4588 4589 private int memoizedHashCode = 0; 4590 @java.lang.Override 4591 public int hashCode() { 4592 if (memoizedHashCode != 0) { 4593 return memoizedHashCode; 4594 } 4595 int hash = 41; 4596 hash = (19 * hash) + getDescriptorForType().hashCode(); 4597 if (hasSourceId()) { 4598 hash = (37 * hash) + SOURCE_ID_FIELD_NUMBER; 4599 hash = (53 * hash) + getSourceId().hashCode(); 4600 } 4601 if (hasMessage()) { 4602 hash = (37 * hash) + MESSAGE_FIELD_NUMBER; 4603 hash = (53 * hash) + getMessage().hashCode(); 4604 } 4605 hash = (29 * hash) + getUnknownFields().hashCode(); 4606 memoizedHashCode = hash; 4607 return hash; 4608 } 4609 4610 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto parseFrom( 4611 com.google.protobuf.ByteString data) 4612 throws com.google.protobuf.InvalidProtocolBufferException { 4613 return PARSER.parseFrom(data); 4614 } 4615 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto parseFrom( 4616 com.google.protobuf.ByteString data, 4617 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4618 throws com.google.protobuf.InvalidProtocolBufferException { 4619 return PARSER.parseFrom(data, extensionRegistry); 4620 } 4621 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto parseFrom(byte[] data) 4622 throws com.google.protobuf.InvalidProtocolBufferException { 4623 return PARSER.parseFrom(data); 4624 } 4625 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto parseFrom( 4626 byte[] data, 4627 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4628 throws com.google.protobuf.InvalidProtocolBufferException { 4629 return PARSER.parseFrom(data, extensionRegistry); 4630 } 4631 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto parseFrom(java.io.InputStream input) 4632 throws java.io.IOException { 4633 return PARSER.parseFrom(input); 4634 } 4635 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto parseFrom( 4636 java.io.InputStream input, 4637 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4638 throws java.io.IOException { 4639 return PARSER.parseFrom(input, extensionRegistry); 4640 } 4641 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto parseDelimitedFrom(java.io.InputStream input) 4642 throws java.io.IOException { 4643 return PARSER.parseDelimitedFrom(input); 4644 } 4645 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto parseDelimitedFrom( 4646 java.io.InputStream input, 4647 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4648 throws java.io.IOException { 4649 return PARSER.parseDelimitedFrom(input, extensionRegistry); 4650 } 4651 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto parseFrom( 4652 com.google.protobuf.CodedInputStream input) 4653 throws java.io.IOException { 4654 return PARSER.parseFrom(input); 4655 } 4656 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto parseFrom( 4657 com.google.protobuf.CodedInputStream input, 4658 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4659 throws java.io.IOException { 4660 return PARSER.parseFrom(input, extensionRegistry); 4661 } 4662 4663 public static Builder newBuilder() { return Builder.create(); } 4664 public Builder newBuilderForType() { return newBuilder(); } 4665 public static Builder newBuilder(org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto prototype) { 4666 return newBuilder().mergeFrom(prototype); 4667 } 4668 public Builder toBuilder() { return newBuilder(this); } 4669 4670 @java.lang.Override 4671 protected Builder newBuilderForType( 4672 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 4673 Builder builder = new Builder(parent); 4674 return builder; 4675 } 4676 /** 4677 * Protobuf type {@code TaskStatusProto.TaskMessageProto} 4678 * 4679 * <pre> 4680 * TaskMessageSource messages 4681 * </pre> 4682 */ 4683 public static final class Builder extends 4684 com.google.protobuf.GeneratedMessage.Builder<Builder> 4685 implements org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProtoOrBuilder { 4686 public static final com.google.protobuf.Descriptors.Descriptor 4687 getDescriptor() { 4688 return org.apache.reef.proto.ReefServiceProtos.internal_static_TaskStatusProto_TaskMessageProto_descriptor; 4689 } 4690 4691 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 4692 internalGetFieldAccessorTable() { 4693 return org.apache.reef.proto.ReefServiceProtos.internal_static_TaskStatusProto_TaskMessageProto_fieldAccessorTable 4694 .ensureFieldAccessorsInitialized( 4695 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.class, org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.Builder.class); 4696 } 4697 4698 // Construct using org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.newBuilder() 4699 private Builder() { 4700 maybeForceBuilderInitialization(); 4701 } 4702 4703 private Builder( 4704 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 4705 super(parent); 4706 maybeForceBuilderInitialization(); 4707 } 4708 private void maybeForceBuilderInitialization() { 4709 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { 4710 } 4711 } 4712 private static Builder create() { 4713 return new Builder(); 4714 } 4715 4716 public Builder clear() { 4717 super.clear(); 4718 sourceId_ = ""; 4719 bitField0_ = (bitField0_ & ~0x00000001); 4720 message_ = com.google.protobuf.ByteString.EMPTY; 4721 bitField0_ = (bitField0_ & ~0x00000002); 4722 return this; 4723 } 4724 4725 public Builder clone() { 4726 return create().mergeFrom(buildPartial()); 4727 } 4728 4729 public com.google.protobuf.Descriptors.Descriptor 4730 getDescriptorForType() { 4731 return org.apache.reef.proto.ReefServiceProtos.internal_static_TaskStatusProto_TaskMessageProto_descriptor; 4732 } 4733 4734 public org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto getDefaultInstanceForType() { 4735 return org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.getDefaultInstance(); 4736 } 4737 4738 public org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto build() { 4739 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto result = buildPartial(); 4740 if (!result.isInitialized()) { 4741 throw newUninitializedMessageException(result); 4742 } 4743 return result; 4744 } 4745 4746 public org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto buildPartial() { 4747 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto result = new org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto(this); 4748 int from_bitField0_ = bitField0_; 4749 int to_bitField0_ = 0; 4750 if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 4751 to_bitField0_ |= 0x00000001; 4752 } 4753 result.sourceId_ = sourceId_; 4754 if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 4755 to_bitField0_ |= 0x00000002; 4756 } 4757 result.message_ = message_; 4758 result.bitField0_ = to_bitField0_; 4759 onBuilt(); 4760 return result; 4761 } 4762 4763 public Builder mergeFrom(com.google.protobuf.Message other) { 4764 if (other instanceof org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto) { 4765 return mergeFrom((org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto)other); 4766 } else { 4767 super.mergeFrom(other); 4768 return this; 4769 } 4770 } 4771 4772 public Builder mergeFrom(org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto other) { 4773 if (other == org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.getDefaultInstance()) return this; 4774 if (other.hasSourceId()) { 4775 bitField0_ |= 0x00000001; 4776 sourceId_ = other.sourceId_; 4777 onChanged(); 4778 } 4779 if (other.hasMessage()) { 4780 setMessage(other.getMessage()); 4781 } 4782 this.mergeUnknownFields(other.getUnknownFields()); 4783 return this; 4784 } 4785 4786 public final boolean isInitialized() { 4787 if (!hasSourceId()) { 4788 4789 return false; 4790 } 4791 if (!hasMessage()) { 4792 4793 return false; 4794 } 4795 return true; 4796 } 4797 4798 public Builder mergeFrom( 4799 com.google.protobuf.CodedInputStream input, 4800 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4801 throws java.io.IOException { 4802 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto parsedMessage = null; 4803 try { 4804 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 4805 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 4806 parsedMessage = (org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto) e.getUnfinishedMessage(); 4807 throw e; 4808 } finally { 4809 if (parsedMessage != null) { 4810 mergeFrom(parsedMessage); 4811 } 4812 } 4813 return this; 4814 } 4815 private int bitField0_; 4816 4817 // required string source_id = 1; 4818 private java.lang.Object sourceId_ = ""; 4819 /** 4820 * <code>required string source_id = 1;</code> 4821 */ 4822 public boolean hasSourceId() { 4823 return ((bitField0_ & 0x00000001) == 0x00000001); 4824 } 4825 /** 4826 * <code>required string source_id = 1;</code> 4827 */ 4828 public java.lang.String getSourceId() { 4829 java.lang.Object ref = sourceId_; 4830 if (!(ref instanceof java.lang.String)) { 4831 java.lang.String s = ((com.google.protobuf.ByteString) ref) 4832 .toStringUtf8(); 4833 sourceId_ = s; 4834 return s; 4835 } else { 4836 return (java.lang.String) ref; 4837 } 4838 } 4839 /** 4840 * <code>required string source_id = 1;</code> 4841 */ 4842 public com.google.protobuf.ByteString 4843 getSourceIdBytes() { 4844 java.lang.Object ref = sourceId_; 4845 if (ref instanceof String) { 4846 com.google.protobuf.ByteString b = 4847 com.google.protobuf.ByteString.copyFromUtf8( 4848 (java.lang.String) ref); 4849 sourceId_ = b; 4850 return b; 4851 } else { 4852 return (com.google.protobuf.ByteString) ref; 4853 } 4854 } 4855 /** 4856 * <code>required string source_id = 1;</code> 4857 */ 4858 public Builder setSourceId( 4859 java.lang.String value) { 4860 if (value == null) { 4861 throw new NullPointerException(); 4862 } 4863 bitField0_ |= 0x00000001; 4864 sourceId_ = value; 4865 onChanged(); 4866 return this; 4867 } 4868 /** 4869 * <code>required string source_id = 1;</code> 4870 */ 4871 public Builder clearSourceId() { 4872 bitField0_ = (bitField0_ & ~0x00000001); 4873 sourceId_ = getDefaultInstance().getSourceId(); 4874 onChanged(); 4875 return this; 4876 } 4877 /** 4878 * <code>required string source_id = 1;</code> 4879 */ 4880 public Builder setSourceIdBytes( 4881 com.google.protobuf.ByteString value) { 4882 if (value == null) { 4883 throw new NullPointerException(); 4884 } 4885 bitField0_ |= 0x00000001; 4886 sourceId_ = value; 4887 onChanged(); 4888 return this; 4889 } 4890 4891 // required bytes message = 2; 4892 private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY; 4893 /** 4894 * <code>required bytes message = 2;</code> 4895 */ 4896 public boolean hasMessage() { 4897 return ((bitField0_ & 0x00000002) == 0x00000002); 4898 } 4899 /** 4900 * <code>required bytes message = 2;</code> 4901 */ 4902 public com.google.protobuf.ByteString getMessage() { 4903 return message_; 4904 } 4905 /** 4906 * <code>required bytes message = 2;</code> 4907 */ 4908 public Builder setMessage(com.google.protobuf.ByteString value) { 4909 if (value == null) { 4910 throw new NullPointerException(); 4911 } 4912 bitField0_ |= 0x00000002; 4913 message_ = value; 4914 onChanged(); 4915 return this; 4916 } 4917 /** 4918 * <code>required bytes message = 2;</code> 4919 */ 4920 public Builder clearMessage() { 4921 bitField0_ = (bitField0_ & ~0x00000002); 4922 message_ = getDefaultInstance().getMessage(); 4923 onChanged(); 4924 return this; 4925 } 4926 4927 // @@protoc_insertion_point(builder_scope:TaskStatusProto.TaskMessageProto) 4928 } 4929 4930 static { 4931 defaultInstance = new TaskMessageProto(true); 4932 defaultInstance.initFields(); 4933 } 4934 4935 // @@protoc_insertion_point(class_scope:TaskStatusProto.TaskMessageProto) 4936 } 4937 4938 private int bitField0_; 4939 // required string task_id = 1; 4940 public static final int TASK_ID_FIELD_NUMBER = 1; 4941 private java.lang.Object taskId_; 4942 /** 4943 * <code>required string task_id = 1;</code> 4944 */ 4945 public boolean hasTaskId() { 4946 return ((bitField0_ & 0x00000001) == 0x00000001); 4947 } 4948 /** 4949 * <code>required string task_id = 1;</code> 4950 */ 4951 public java.lang.String getTaskId() { 4952 java.lang.Object ref = taskId_; 4953 if (ref instanceof java.lang.String) { 4954 return (java.lang.String) ref; 4955 } else { 4956 com.google.protobuf.ByteString bs = 4957 (com.google.protobuf.ByteString) ref; 4958 java.lang.String s = bs.toStringUtf8(); 4959 if (bs.isValidUtf8()) { 4960 taskId_ = s; 4961 } 4962 return s; 4963 } 4964 } 4965 /** 4966 * <code>required string task_id = 1;</code> 4967 */ 4968 public com.google.protobuf.ByteString 4969 getTaskIdBytes() { 4970 java.lang.Object ref = taskId_; 4971 if (ref instanceof java.lang.String) { 4972 com.google.protobuf.ByteString b = 4973 com.google.protobuf.ByteString.copyFromUtf8( 4974 (java.lang.String) ref); 4975 taskId_ = b; 4976 return b; 4977 } else { 4978 return (com.google.protobuf.ByteString) ref; 4979 } 4980 } 4981 4982 // required string context_id = 2; 4983 public static final int CONTEXT_ID_FIELD_NUMBER = 2; 4984 private java.lang.Object contextId_; 4985 /** 4986 * <code>required string context_id = 2;</code> 4987 */ 4988 public boolean hasContextId() { 4989 return ((bitField0_ & 0x00000002) == 0x00000002); 4990 } 4991 /** 4992 * <code>required string context_id = 2;</code> 4993 */ 4994 public java.lang.String getContextId() { 4995 java.lang.Object ref = contextId_; 4996 if (ref instanceof java.lang.String) { 4997 return (java.lang.String) ref; 4998 } else { 4999 com.google.protobuf.ByteString bs = 5000 (com.google.protobuf.ByteString) ref; 5001 java.lang.String s = bs.toStringUtf8(); 5002 if (bs.isValidUtf8()) { 5003 contextId_ = s; 5004 } 5005 return s; 5006 } 5007 } 5008 /** 5009 * <code>required string context_id = 2;</code> 5010 */ 5011 public com.google.protobuf.ByteString 5012 getContextIdBytes() { 5013 java.lang.Object ref = contextId_; 5014 if (ref instanceof java.lang.String) { 5015 com.google.protobuf.ByteString b = 5016 com.google.protobuf.ByteString.copyFromUtf8( 5017 (java.lang.String) ref); 5018 contextId_ = b; 5019 return b; 5020 } else { 5021 return (com.google.protobuf.ByteString) ref; 5022 } 5023 } 5024 5025 // required .State state = 3; 5026 public static final int STATE_FIELD_NUMBER = 3; 5027 private org.apache.reef.proto.ReefServiceProtos.State state_; 5028 /** 5029 * <code>required .State state = 3;</code> 5030 */ 5031 public boolean hasState() { 5032 return ((bitField0_ & 0x00000004) == 0x00000004); 5033 } 5034 /** 5035 * <code>required .State state = 3;</code> 5036 */ 5037 public org.apache.reef.proto.ReefServiceProtos.State getState() { 5038 return state_; 5039 } 5040 5041 // optional bytes result = 4; 5042 public static final int RESULT_FIELD_NUMBER = 4; 5043 private com.google.protobuf.ByteString result_; 5044 /** 5045 * <code>optional bytes result = 4;</code> 5046 * 5047 * <pre> 5048 * e.g., return value from Task.call() 5049 * </pre> 5050 */ 5051 public boolean hasResult() { 5052 return ((bitField0_ & 0x00000008) == 0x00000008); 5053 } 5054 /** 5055 * <code>optional bytes result = 4;</code> 5056 * 5057 * <pre> 5058 * e.g., return value from Task.call() 5059 * </pre> 5060 */ 5061 public com.google.protobuf.ByteString getResult() { 5062 return result_; 5063 } 5064 5065 // optional bool recovery = 5; 5066 public static final int RECOVERY_FIELD_NUMBER = 5; 5067 private boolean recovery_; 5068 /** 5069 * <code>optional bool recovery = 5;</code> 5070 */ 5071 public boolean hasRecovery() { 5072 return ((bitField0_ & 0x00000010) == 0x00000010); 5073 } 5074 /** 5075 * <code>optional bool recovery = 5;</code> 5076 */ 5077 public boolean getRecovery() { 5078 return recovery_; 5079 } 5080 5081 // repeated .TaskStatusProto.TaskMessageProto task_message = 6; 5082 public static final int TASK_MESSAGE_FIELD_NUMBER = 6; 5083 private java.util.List<org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto> taskMessage_; 5084 /** 5085 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 5086 */ 5087 public java.util.List<org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto> getTaskMessageList() { 5088 return taskMessage_; 5089 } 5090 /** 5091 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 5092 */ 5093 public java.util.List<? extends org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProtoOrBuilder> 5094 getTaskMessageOrBuilderList() { 5095 return taskMessage_; 5096 } 5097 /** 5098 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 5099 */ 5100 public int getTaskMessageCount() { 5101 return taskMessage_.size(); 5102 } 5103 /** 5104 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 5105 */ 5106 public org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto getTaskMessage(int index) { 5107 return taskMessage_.get(index); 5108 } 5109 /** 5110 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 5111 */ 5112 public org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProtoOrBuilder getTaskMessageOrBuilder( 5113 int index) { 5114 return taskMessage_.get(index); 5115 } 5116 5117 private void initFields() { 5118 taskId_ = ""; 5119 contextId_ = ""; 5120 state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT; 5121 result_ = com.google.protobuf.ByteString.EMPTY; 5122 recovery_ = false; 5123 taskMessage_ = java.util.Collections.emptyList(); 5124 } 5125 private byte memoizedIsInitialized = -1; 5126 public final boolean isInitialized() { 5127 byte isInitialized = memoizedIsInitialized; 5128 if (isInitialized != -1) return isInitialized == 1; 5129 5130 if (!hasTaskId()) { 5131 memoizedIsInitialized = 0; 5132 return false; 5133 } 5134 if (!hasContextId()) { 5135 memoizedIsInitialized = 0; 5136 return false; 5137 } 5138 if (!hasState()) { 5139 memoizedIsInitialized = 0; 5140 return false; 5141 } 5142 for (int i = 0; i < getTaskMessageCount(); i++) { 5143 if (!getTaskMessage(i).isInitialized()) { 5144 memoizedIsInitialized = 0; 5145 return false; 5146 } 5147 } 5148 memoizedIsInitialized = 1; 5149 return true; 5150 } 5151 5152 public void writeTo(com.google.protobuf.CodedOutputStream output) 5153 throws java.io.IOException { 5154 getSerializedSize(); 5155 if (((bitField0_ & 0x00000001) == 0x00000001)) { 5156 output.writeBytes(1, getTaskIdBytes()); 5157 } 5158 if (((bitField0_ & 0x00000002) == 0x00000002)) { 5159 output.writeBytes(2, getContextIdBytes()); 5160 } 5161 if (((bitField0_ & 0x00000004) == 0x00000004)) { 5162 output.writeEnum(3, state_.getNumber()); 5163 } 5164 if (((bitField0_ & 0x00000008) == 0x00000008)) { 5165 output.writeBytes(4, result_); 5166 } 5167 if (((bitField0_ & 0x00000010) == 0x00000010)) { 5168 output.writeBool(5, recovery_); 5169 } 5170 for (int i = 0; i < taskMessage_.size(); i++) { 5171 output.writeMessage(6, taskMessage_.get(i)); 5172 } 5173 getUnknownFields().writeTo(output); 5174 } 5175 5176 private int memoizedSerializedSize = -1; 5177 public int getSerializedSize() { 5178 int size = memoizedSerializedSize; 5179 if (size != -1) return size; 5180 5181 size = 0; 5182 if (((bitField0_ & 0x00000001) == 0x00000001)) { 5183 size += com.google.protobuf.CodedOutputStream 5184 .computeBytesSize(1, getTaskIdBytes()); 5185 } 5186 if (((bitField0_ & 0x00000002) == 0x00000002)) { 5187 size += com.google.protobuf.CodedOutputStream 5188 .computeBytesSize(2, getContextIdBytes()); 5189 } 5190 if (((bitField0_ & 0x00000004) == 0x00000004)) { 5191 size += com.google.protobuf.CodedOutputStream 5192 .computeEnumSize(3, state_.getNumber()); 5193 } 5194 if (((bitField0_ & 0x00000008) == 0x00000008)) { 5195 size += com.google.protobuf.CodedOutputStream 5196 .computeBytesSize(4, result_); 5197 } 5198 if (((bitField0_ & 0x00000010) == 0x00000010)) { 5199 size += com.google.protobuf.CodedOutputStream 5200 .computeBoolSize(5, recovery_); 5201 } 5202 for (int i = 0; i < taskMessage_.size(); i++) { 5203 size += com.google.protobuf.CodedOutputStream 5204 .computeMessageSize(6, taskMessage_.get(i)); 5205 } 5206 size += getUnknownFields().getSerializedSize(); 5207 memoizedSerializedSize = size; 5208 return size; 5209 } 5210 5211 private static final long serialVersionUID = 0L; 5212 @java.lang.Override 5213 protected java.lang.Object writeReplace() 5214 throws java.io.ObjectStreamException { 5215 return super.writeReplace(); 5216 } 5217 5218 @java.lang.Override 5219 public boolean equals(final java.lang.Object obj) { 5220 if (obj == this) { 5221 return true; 5222 } 5223 if (!(obj instanceof org.apache.reef.proto.ReefServiceProtos.TaskStatusProto)) { 5224 return super.equals(obj); 5225 } 5226 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto other = (org.apache.reef.proto.ReefServiceProtos.TaskStatusProto) obj; 5227 5228 boolean result = true; 5229 result = result && (hasTaskId() == other.hasTaskId()); 5230 if (hasTaskId()) { 5231 result = result && getTaskId() 5232 .equals(other.getTaskId()); 5233 } 5234 result = result && (hasContextId() == other.hasContextId()); 5235 if (hasContextId()) { 5236 result = result && getContextId() 5237 .equals(other.getContextId()); 5238 } 5239 result = result && (hasState() == other.hasState()); 5240 if (hasState()) { 5241 result = result && 5242 (getState() == other.getState()); 5243 } 5244 result = result && (hasResult() == other.hasResult()); 5245 if (hasResult()) { 5246 result = result && getResult() 5247 .equals(other.getResult()); 5248 } 5249 result = result && (hasRecovery() == other.hasRecovery()); 5250 if (hasRecovery()) { 5251 result = result && (getRecovery() 5252 == other.getRecovery()); 5253 } 5254 result = result && getTaskMessageList() 5255 .equals(other.getTaskMessageList()); 5256 result = result && 5257 getUnknownFields().equals(other.getUnknownFields()); 5258 return result; 5259 } 5260 5261 private int memoizedHashCode = 0; 5262 @java.lang.Override 5263 public int hashCode() { 5264 if (memoizedHashCode != 0) { 5265 return memoizedHashCode; 5266 } 5267 int hash = 41; 5268 hash = (19 * hash) + getDescriptorForType().hashCode(); 5269 if (hasTaskId()) { 5270 hash = (37 * hash) + TASK_ID_FIELD_NUMBER; 5271 hash = (53 * hash) + getTaskId().hashCode(); 5272 } 5273 if (hasContextId()) { 5274 hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; 5275 hash = (53 * hash) + getContextId().hashCode(); 5276 } 5277 if (hasState()) { 5278 hash = (37 * hash) + STATE_FIELD_NUMBER; 5279 hash = (53 * hash) + hashEnum(getState()); 5280 } 5281 if (hasResult()) { 5282 hash = (37 * hash) + RESULT_FIELD_NUMBER; 5283 hash = (53 * hash) + getResult().hashCode(); 5284 } 5285 if (hasRecovery()) { 5286 hash = (37 * hash) + RECOVERY_FIELD_NUMBER; 5287 hash = (53 * hash) + hashBoolean(getRecovery()); 5288 } 5289 if (getTaskMessageCount() > 0) { 5290 hash = (37 * hash) + TASK_MESSAGE_FIELD_NUMBER; 5291 hash = (53 * hash) + getTaskMessageList().hashCode(); 5292 } 5293 hash = (29 * hash) + getUnknownFields().hashCode(); 5294 memoizedHashCode = hash; 5295 return hash; 5296 } 5297 5298 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto parseFrom( 5299 com.google.protobuf.ByteString data) 5300 throws com.google.protobuf.InvalidProtocolBufferException { 5301 return PARSER.parseFrom(data); 5302 } 5303 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto parseFrom( 5304 com.google.protobuf.ByteString data, 5305 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 5306 throws com.google.protobuf.InvalidProtocolBufferException { 5307 return PARSER.parseFrom(data, extensionRegistry); 5308 } 5309 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto parseFrom(byte[] data) 5310 throws com.google.protobuf.InvalidProtocolBufferException { 5311 return PARSER.parseFrom(data); 5312 } 5313 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto parseFrom( 5314 byte[] data, 5315 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 5316 throws com.google.protobuf.InvalidProtocolBufferException { 5317 return PARSER.parseFrom(data, extensionRegistry); 5318 } 5319 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto parseFrom(java.io.InputStream input) 5320 throws java.io.IOException { 5321 return PARSER.parseFrom(input); 5322 } 5323 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto parseFrom( 5324 java.io.InputStream input, 5325 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 5326 throws java.io.IOException { 5327 return PARSER.parseFrom(input, extensionRegistry); 5328 } 5329 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto parseDelimitedFrom(java.io.InputStream input) 5330 throws java.io.IOException { 5331 return PARSER.parseDelimitedFrom(input); 5332 } 5333 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto parseDelimitedFrom( 5334 java.io.InputStream input, 5335 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 5336 throws java.io.IOException { 5337 return PARSER.parseDelimitedFrom(input, extensionRegistry); 5338 } 5339 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto parseFrom( 5340 com.google.protobuf.CodedInputStream input) 5341 throws java.io.IOException { 5342 return PARSER.parseFrom(input); 5343 } 5344 public static org.apache.reef.proto.ReefServiceProtos.TaskStatusProto parseFrom( 5345 com.google.protobuf.CodedInputStream input, 5346 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 5347 throws java.io.IOException { 5348 return PARSER.parseFrom(input, extensionRegistry); 5349 } 5350 5351 public static Builder newBuilder() { return Builder.create(); } 5352 public Builder newBuilderForType() { return newBuilder(); } 5353 public static Builder newBuilder(org.apache.reef.proto.ReefServiceProtos.TaskStatusProto prototype) { 5354 return newBuilder().mergeFrom(prototype); 5355 } 5356 public Builder toBuilder() { return newBuilder(this); } 5357 5358 @java.lang.Override 5359 protected Builder newBuilderForType( 5360 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 5361 Builder builder = new Builder(parent); 5362 return builder; 5363 } 5364 /** 5365 * Protobuf type {@code TaskStatusProto} 5366 */ 5367 public static final class Builder extends 5368 com.google.protobuf.GeneratedMessage.Builder<Builder> 5369 implements org.apache.reef.proto.ReefServiceProtos.TaskStatusProtoOrBuilder { 5370 public static final com.google.protobuf.Descriptors.Descriptor 5371 getDescriptor() { 5372 return org.apache.reef.proto.ReefServiceProtos.internal_static_TaskStatusProto_descriptor; 5373 } 5374 5375 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 5376 internalGetFieldAccessorTable() { 5377 return org.apache.reef.proto.ReefServiceProtos.internal_static_TaskStatusProto_fieldAccessorTable 5378 .ensureFieldAccessorsInitialized( 5379 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.class, org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.Builder.class); 5380 } 5381 5382 // Construct using org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.newBuilder() 5383 private Builder() { 5384 maybeForceBuilderInitialization(); 5385 } 5386 5387 private Builder( 5388 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 5389 super(parent); 5390 maybeForceBuilderInitialization(); 5391 } 5392 private void maybeForceBuilderInitialization() { 5393 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { 5394 getTaskMessageFieldBuilder(); 5395 } 5396 } 5397 private static Builder create() { 5398 return new Builder(); 5399 } 5400 5401 public Builder clear() { 5402 super.clear(); 5403 taskId_ = ""; 5404 bitField0_ = (bitField0_ & ~0x00000001); 5405 contextId_ = ""; 5406 bitField0_ = (bitField0_ & ~0x00000002); 5407 state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT; 5408 bitField0_ = (bitField0_ & ~0x00000004); 5409 result_ = com.google.protobuf.ByteString.EMPTY; 5410 bitField0_ = (bitField0_ & ~0x00000008); 5411 recovery_ = false; 5412 bitField0_ = (bitField0_ & ~0x00000010); 5413 if (taskMessageBuilder_ == null) { 5414 taskMessage_ = java.util.Collections.emptyList(); 5415 bitField0_ = (bitField0_ & ~0x00000020); 5416 } else { 5417 taskMessageBuilder_.clear(); 5418 } 5419 return this; 5420 } 5421 5422 public Builder clone() { 5423 return create().mergeFrom(buildPartial()); 5424 } 5425 5426 public com.google.protobuf.Descriptors.Descriptor 5427 getDescriptorForType() { 5428 return org.apache.reef.proto.ReefServiceProtos.internal_static_TaskStatusProto_descriptor; 5429 } 5430 5431 public org.apache.reef.proto.ReefServiceProtos.TaskStatusProto getDefaultInstanceForType() { 5432 return org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.getDefaultInstance(); 5433 } 5434 5435 public org.apache.reef.proto.ReefServiceProtos.TaskStatusProto build() { 5436 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto result = buildPartial(); 5437 if (!result.isInitialized()) { 5438 throw newUninitializedMessageException(result); 5439 } 5440 return result; 5441 } 5442 5443 public org.apache.reef.proto.ReefServiceProtos.TaskStatusProto buildPartial() { 5444 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto result = new org.apache.reef.proto.ReefServiceProtos.TaskStatusProto(this); 5445 int from_bitField0_ = bitField0_; 5446 int to_bitField0_ = 0; 5447 if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 5448 to_bitField0_ |= 0x00000001; 5449 } 5450 result.taskId_ = taskId_; 5451 if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 5452 to_bitField0_ |= 0x00000002; 5453 } 5454 result.contextId_ = contextId_; 5455 if (((from_bitField0_ & 0x00000004) == 0x00000004)) { 5456 to_bitField0_ |= 0x00000004; 5457 } 5458 result.state_ = state_; 5459 if (((from_bitField0_ & 0x00000008) == 0x00000008)) { 5460 to_bitField0_ |= 0x00000008; 5461 } 5462 result.result_ = result_; 5463 if (((from_bitField0_ & 0x00000010) == 0x00000010)) { 5464 to_bitField0_ |= 0x00000010; 5465 } 5466 result.recovery_ = recovery_; 5467 if (taskMessageBuilder_ == null) { 5468 if (((bitField0_ & 0x00000020) == 0x00000020)) { 5469 taskMessage_ = java.util.Collections.unmodifiableList(taskMessage_); 5470 bitField0_ = (bitField0_ & ~0x00000020); 5471 } 5472 result.taskMessage_ = taskMessage_; 5473 } else { 5474 result.taskMessage_ = taskMessageBuilder_.build(); 5475 } 5476 result.bitField0_ = to_bitField0_; 5477 onBuilt(); 5478 return result; 5479 } 5480 5481 public Builder mergeFrom(com.google.protobuf.Message other) { 5482 if (other instanceof org.apache.reef.proto.ReefServiceProtos.TaskStatusProto) { 5483 return mergeFrom((org.apache.reef.proto.ReefServiceProtos.TaskStatusProto)other); 5484 } else { 5485 super.mergeFrom(other); 5486 return this; 5487 } 5488 } 5489 5490 public Builder mergeFrom(org.apache.reef.proto.ReefServiceProtos.TaskStatusProto other) { 5491 if (other == org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.getDefaultInstance()) return this; 5492 if (other.hasTaskId()) { 5493 bitField0_ |= 0x00000001; 5494 taskId_ = other.taskId_; 5495 onChanged(); 5496 } 5497 if (other.hasContextId()) { 5498 bitField0_ |= 0x00000002; 5499 contextId_ = other.contextId_; 5500 onChanged(); 5501 } 5502 if (other.hasState()) { 5503 setState(other.getState()); 5504 } 5505 if (other.hasResult()) { 5506 setResult(other.getResult()); 5507 } 5508 if (other.hasRecovery()) { 5509 setRecovery(other.getRecovery()); 5510 } 5511 if (taskMessageBuilder_ == null) { 5512 if (!other.taskMessage_.isEmpty()) { 5513 if (taskMessage_.isEmpty()) { 5514 taskMessage_ = other.taskMessage_; 5515 bitField0_ = (bitField0_ & ~0x00000020); 5516 } else { 5517 ensureTaskMessageIsMutable(); 5518 taskMessage_.addAll(other.taskMessage_); 5519 } 5520 onChanged(); 5521 } 5522 } else { 5523 if (!other.taskMessage_.isEmpty()) { 5524 if (taskMessageBuilder_.isEmpty()) { 5525 taskMessageBuilder_.dispose(); 5526 taskMessageBuilder_ = null; 5527 taskMessage_ = other.taskMessage_; 5528 bitField0_ = (bitField0_ & ~0x00000020); 5529 taskMessageBuilder_ = 5530 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? 5531 getTaskMessageFieldBuilder() : null; 5532 } else { 5533 taskMessageBuilder_.addAllMessages(other.taskMessage_); 5534 } 5535 } 5536 } 5537 this.mergeUnknownFields(other.getUnknownFields()); 5538 return this; 5539 } 5540 5541 public final boolean isInitialized() { 5542 if (!hasTaskId()) { 5543 5544 return false; 5545 } 5546 if (!hasContextId()) { 5547 5548 return false; 5549 } 5550 if (!hasState()) { 5551 5552 return false; 5553 } 5554 for (int i = 0; i < getTaskMessageCount(); i++) { 5555 if (!getTaskMessage(i).isInitialized()) { 5556 5557 return false; 5558 } 5559 } 5560 return true; 5561 } 5562 5563 public Builder mergeFrom( 5564 com.google.protobuf.CodedInputStream input, 5565 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 5566 throws java.io.IOException { 5567 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto parsedMessage = null; 5568 try { 5569 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 5570 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 5571 parsedMessage = (org.apache.reef.proto.ReefServiceProtos.TaskStatusProto) e.getUnfinishedMessage(); 5572 throw e; 5573 } finally { 5574 if (parsedMessage != null) { 5575 mergeFrom(parsedMessage); 5576 } 5577 } 5578 return this; 5579 } 5580 private int bitField0_; 5581 5582 // required string task_id = 1; 5583 private java.lang.Object taskId_ = ""; 5584 /** 5585 * <code>required string task_id = 1;</code> 5586 */ 5587 public boolean hasTaskId() { 5588 return ((bitField0_ & 0x00000001) == 0x00000001); 5589 } 5590 /** 5591 * <code>required string task_id = 1;</code> 5592 */ 5593 public java.lang.String getTaskId() { 5594 java.lang.Object ref = taskId_; 5595 if (!(ref instanceof java.lang.String)) { 5596 java.lang.String s = ((com.google.protobuf.ByteString) ref) 5597 .toStringUtf8(); 5598 taskId_ = s; 5599 return s; 5600 } else { 5601 return (java.lang.String) ref; 5602 } 5603 } 5604 /** 5605 * <code>required string task_id = 1;</code> 5606 */ 5607 public com.google.protobuf.ByteString 5608 getTaskIdBytes() { 5609 java.lang.Object ref = taskId_; 5610 if (ref instanceof String) { 5611 com.google.protobuf.ByteString b = 5612 com.google.protobuf.ByteString.copyFromUtf8( 5613 (java.lang.String) ref); 5614 taskId_ = b; 5615 return b; 5616 } else { 5617 return (com.google.protobuf.ByteString) ref; 5618 } 5619 } 5620 /** 5621 * <code>required string task_id = 1;</code> 5622 */ 5623 public Builder setTaskId( 5624 java.lang.String value) { 5625 if (value == null) { 5626 throw new NullPointerException(); 5627 } 5628 bitField0_ |= 0x00000001; 5629 taskId_ = value; 5630 onChanged(); 5631 return this; 5632 } 5633 /** 5634 * <code>required string task_id = 1;</code> 5635 */ 5636 public Builder clearTaskId() { 5637 bitField0_ = (bitField0_ & ~0x00000001); 5638 taskId_ = getDefaultInstance().getTaskId(); 5639 onChanged(); 5640 return this; 5641 } 5642 /** 5643 * <code>required string task_id = 1;</code> 5644 */ 5645 public Builder setTaskIdBytes( 5646 com.google.protobuf.ByteString value) { 5647 if (value == null) { 5648 throw new NullPointerException(); 5649 } 5650 bitField0_ |= 0x00000001; 5651 taskId_ = value; 5652 onChanged(); 5653 return this; 5654 } 5655 5656 // required string context_id = 2; 5657 private java.lang.Object contextId_ = ""; 5658 /** 5659 * <code>required string context_id = 2;</code> 5660 */ 5661 public boolean hasContextId() { 5662 return ((bitField0_ & 0x00000002) == 0x00000002); 5663 } 5664 /** 5665 * <code>required string context_id = 2;</code> 5666 */ 5667 public java.lang.String getContextId() { 5668 java.lang.Object ref = contextId_; 5669 if (!(ref instanceof java.lang.String)) { 5670 java.lang.String s = ((com.google.protobuf.ByteString) ref) 5671 .toStringUtf8(); 5672 contextId_ = s; 5673 return s; 5674 } else { 5675 return (java.lang.String) ref; 5676 } 5677 } 5678 /** 5679 * <code>required string context_id = 2;</code> 5680 */ 5681 public com.google.protobuf.ByteString 5682 getContextIdBytes() { 5683 java.lang.Object ref = contextId_; 5684 if (ref instanceof String) { 5685 com.google.protobuf.ByteString b = 5686 com.google.protobuf.ByteString.copyFromUtf8( 5687 (java.lang.String) ref); 5688 contextId_ = b; 5689 return b; 5690 } else { 5691 return (com.google.protobuf.ByteString) ref; 5692 } 5693 } 5694 /** 5695 * <code>required string context_id = 2;</code> 5696 */ 5697 public Builder setContextId( 5698 java.lang.String value) { 5699 if (value == null) { 5700 throw new NullPointerException(); 5701 } 5702 bitField0_ |= 0x00000002; 5703 contextId_ = value; 5704 onChanged(); 5705 return this; 5706 } 5707 /** 5708 * <code>required string context_id = 2;</code> 5709 */ 5710 public Builder clearContextId() { 5711 bitField0_ = (bitField0_ & ~0x00000002); 5712 contextId_ = getDefaultInstance().getContextId(); 5713 onChanged(); 5714 return this; 5715 } 5716 /** 5717 * <code>required string context_id = 2;</code> 5718 */ 5719 public Builder setContextIdBytes( 5720 com.google.protobuf.ByteString value) { 5721 if (value == null) { 5722 throw new NullPointerException(); 5723 } 5724 bitField0_ |= 0x00000002; 5725 contextId_ = value; 5726 onChanged(); 5727 return this; 5728 } 5729 5730 // required .State state = 3; 5731 private org.apache.reef.proto.ReefServiceProtos.State state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT; 5732 /** 5733 * <code>required .State state = 3;</code> 5734 */ 5735 public boolean hasState() { 5736 return ((bitField0_ & 0x00000004) == 0x00000004); 5737 } 5738 /** 5739 * <code>required .State state = 3;</code> 5740 */ 5741 public org.apache.reef.proto.ReefServiceProtos.State getState() { 5742 return state_; 5743 } 5744 /** 5745 * <code>required .State state = 3;</code> 5746 */ 5747 public Builder setState(org.apache.reef.proto.ReefServiceProtos.State value) { 5748 if (value == null) { 5749 throw new NullPointerException(); 5750 } 5751 bitField0_ |= 0x00000004; 5752 state_ = value; 5753 onChanged(); 5754 return this; 5755 } 5756 /** 5757 * <code>required .State state = 3;</code> 5758 */ 5759 public Builder clearState() { 5760 bitField0_ = (bitField0_ & ~0x00000004); 5761 state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT; 5762 onChanged(); 5763 return this; 5764 } 5765 5766 // optional bytes result = 4; 5767 private com.google.protobuf.ByteString result_ = com.google.protobuf.ByteString.EMPTY; 5768 /** 5769 * <code>optional bytes result = 4;</code> 5770 * 5771 * <pre> 5772 * e.g., return value from Task.call() 5773 * </pre> 5774 */ 5775 public boolean hasResult() { 5776 return ((bitField0_ & 0x00000008) == 0x00000008); 5777 } 5778 /** 5779 * <code>optional bytes result = 4;</code> 5780 * 5781 * <pre> 5782 * e.g., return value from Task.call() 5783 * </pre> 5784 */ 5785 public com.google.protobuf.ByteString getResult() { 5786 return result_; 5787 } 5788 /** 5789 * <code>optional bytes result = 4;</code> 5790 * 5791 * <pre> 5792 * e.g., return value from Task.call() 5793 * </pre> 5794 */ 5795 public Builder setResult(com.google.protobuf.ByteString value) { 5796 if (value == null) { 5797 throw new NullPointerException(); 5798 } 5799 bitField0_ |= 0x00000008; 5800 result_ = value; 5801 onChanged(); 5802 return this; 5803 } 5804 /** 5805 * <code>optional bytes result = 4;</code> 5806 * 5807 * <pre> 5808 * e.g., return value from Task.call() 5809 * </pre> 5810 */ 5811 public Builder clearResult() { 5812 bitField0_ = (bitField0_ & ~0x00000008); 5813 result_ = getDefaultInstance().getResult(); 5814 onChanged(); 5815 return this; 5816 } 5817 5818 // optional bool recovery = 5; 5819 private boolean recovery_ ; 5820 /** 5821 * <code>optional bool recovery = 5;</code> 5822 */ 5823 public boolean hasRecovery() { 5824 return ((bitField0_ & 0x00000010) == 0x00000010); 5825 } 5826 /** 5827 * <code>optional bool recovery = 5;</code> 5828 */ 5829 public boolean getRecovery() { 5830 return recovery_; 5831 } 5832 /** 5833 * <code>optional bool recovery = 5;</code> 5834 */ 5835 public Builder setRecovery(boolean value) { 5836 bitField0_ |= 0x00000010; 5837 recovery_ = value; 5838 onChanged(); 5839 return this; 5840 } 5841 /** 5842 * <code>optional bool recovery = 5;</code> 5843 */ 5844 public Builder clearRecovery() { 5845 bitField0_ = (bitField0_ & ~0x00000010); 5846 recovery_ = false; 5847 onChanged(); 5848 return this; 5849 } 5850 5851 // repeated .TaskStatusProto.TaskMessageProto task_message = 6; 5852 private java.util.List<org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto> taskMessage_ = 5853 java.util.Collections.emptyList(); 5854 private void ensureTaskMessageIsMutable() { 5855 if (!((bitField0_ & 0x00000020) == 0x00000020)) { 5856 taskMessage_ = new java.util.ArrayList<org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto>(taskMessage_); 5857 bitField0_ |= 0x00000020; 5858 } 5859 } 5860 5861 private com.google.protobuf.RepeatedFieldBuilder< 5862 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto, org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.Builder, org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProtoOrBuilder> taskMessageBuilder_; 5863 5864 /** 5865 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 5866 */ 5867 public java.util.List<org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto> getTaskMessageList() { 5868 if (taskMessageBuilder_ == null) { 5869 return java.util.Collections.unmodifiableList(taskMessage_); 5870 } else { 5871 return taskMessageBuilder_.getMessageList(); 5872 } 5873 } 5874 /** 5875 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 5876 */ 5877 public int getTaskMessageCount() { 5878 if (taskMessageBuilder_ == null) { 5879 return taskMessage_.size(); 5880 } else { 5881 return taskMessageBuilder_.getCount(); 5882 } 5883 } 5884 /** 5885 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 5886 */ 5887 public org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto getTaskMessage(int index) { 5888 if (taskMessageBuilder_ == null) { 5889 return taskMessage_.get(index); 5890 } else { 5891 return taskMessageBuilder_.getMessage(index); 5892 } 5893 } 5894 /** 5895 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 5896 */ 5897 public Builder setTaskMessage( 5898 int index, org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto value) { 5899 if (taskMessageBuilder_ == null) { 5900 if (value == null) { 5901 throw new NullPointerException(); 5902 } 5903 ensureTaskMessageIsMutable(); 5904 taskMessage_.set(index, value); 5905 onChanged(); 5906 } else { 5907 taskMessageBuilder_.setMessage(index, value); 5908 } 5909 return this; 5910 } 5911 /** 5912 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 5913 */ 5914 public Builder setTaskMessage( 5915 int index, org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.Builder builderForValue) { 5916 if (taskMessageBuilder_ == null) { 5917 ensureTaskMessageIsMutable(); 5918 taskMessage_.set(index, builderForValue.build()); 5919 onChanged(); 5920 } else { 5921 taskMessageBuilder_.setMessage(index, builderForValue.build()); 5922 } 5923 return this; 5924 } 5925 /** 5926 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 5927 */ 5928 public Builder addTaskMessage(org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto value) { 5929 if (taskMessageBuilder_ == null) { 5930 if (value == null) { 5931 throw new NullPointerException(); 5932 } 5933 ensureTaskMessageIsMutable(); 5934 taskMessage_.add(value); 5935 onChanged(); 5936 } else { 5937 taskMessageBuilder_.addMessage(value); 5938 } 5939 return this; 5940 } 5941 /** 5942 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 5943 */ 5944 public Builder addTaskMessage( 5945 int index, org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto value) { 5946 if (taskMessageBuilder_ == null) { 5947 if (value == null) { 5948 throw new NullPointerException(); 5949 } 5950 ensureTaskMessageIsMutable(); 5951 taskMessage_.add(index, value); 5952 onChanged(); 5953 } else { 5954 taskMessageBuilder_.addMessage(index, value); 5955 } 5956 return this; 5957 } 5958 /** 5959 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 5960 */ 5961 public Builder addTaskMessage( 5962 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.Builder builderForValue) { 5963 if (taskMessageBuilder_ == null) { 5964 ensureTaskMessageIsMutable(); 5965 taskMessage_.add(builderForValue.build()); 5966 onChanged(); 5967 } else { 5968 taskMessageBuilder_.addMessage(builderForValue.build()); 5969 } 5970 return this; 5971 } 5972 /** 5973 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 5974 */ 5975 public Builder addTaskMessage( 5976 int index, org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.Builder builderForValue) { 5977 if (taskMessageBuilder_ == null) { 5978 ensureTaskMessageIsMutable(); 5979 taskMessage_.add(index, builderForValue.build()); 5980 onChanged(); 5981 } else { 5982 taskMessageBuilder_.addMessage(index, builderForValue.build()); 5983 } 5984 return this; 5985 } 5986 /** 5987 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 5988 */ 5989 public Builder addAllTaskMessage( 5990 java.lang.Iterable<? extends org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto> values) { 5991 if (taskMessageBuilder_ == null) { 5992 ensureTaskMessageIsMutable(); 5993 super.addAll(values, taskMessage_); 5994 onChanged(); 5995 } else { 5996 taskMessageBuilder_.addAllMessages(values); 5997 } 5998 return this; 5999 } 6000 /** 6001 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 6002 */ 6003 public Builder clearTaskMessage() { 6004 if (taskMessageBuilder_ == null) { 6005 taskMessage_ = java.util.Collections.emptyList(); 6006 bitField0_ = (bitField0_ & ~0x00000020); 6007 onChanged(); 6008 } else { 6009 taskMessageBuilder_.clear(); 6010 } 6011 return this; 6012 } 6013 /** 6014 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 6015 */ 6016 public Builder removeTaskMessage(int index) { 6017 if (taskMessageBuilder_ == null) { 6018 ensureTaskMessageIsMutable(); 6019 taskMessage_.remove(index); 6020 onChanged(); 6021 } else { 6022 taskMessageBuilder_.remove(index); 6023 } 6024 return this; 6025 } 6026 /** 6027 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 6028 */ 6029 public org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.Builder getTaskMessageBuilder( 6030 int index) { 6031 return getTaskMessageFieldBuilder().getBuilder(index); 6032 } 6033 /** 6034 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 6035 */ 6036 public org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProtoOrBuilder getTaskMessageOrBuilder( 6037 int index) { 6038 if (taskMessageBuilder_ == null) { 6039 return taskMessage_.get(index); } else { 6040 return taskMessageBuilder_.getMessageOrBuilder(index); 6041 } 6042 } 6043 /** 6044 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 6045 */ 6046 public java.util.List<? extends org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProtoOrBuilder> 6047 getTaskMessageOrBuilderList() { 6048 if (taskMessageBuilder_ != null) { 6049 return taskMessageBuilder_.getMessageOrBuilderList(); 6050 } else { 6051 return java.util.Collections.unmodifiableList(taskMessage_); 6052 } 6053 } 6054 /** 6055 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 6056 */ 6057 public org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.Builder addTaskMessageBuilder() { 6058 return getTaskMessageFieldBuilder().addBuilder( 6059 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.getDefaultInstance()); 6060 } 6061 /** 6062 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 6063 */ 6064 public org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.Builder addTaskMessageBuilder( 6065 int index) { 6066 return getTaskMessageFieldBuilder().addBuilder( 6067 index, org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.getDefaultInstance()); 6068 } 6069 /** 6070 * <code>repeated .TaskStatusProto.TaskMessageProto task_message = 6;</code> 6071 */ 6072 public java.util.List<org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.Builder> 6073 getTaskMessageBuilderList() { 6074 return getTaskMessageFieldBuilder().getBuilderList(); 6075 } 6076 private com.google.protobuf.RepeatedFieldBuilder< 6077 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto, org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.Builder, org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProtoOrBuilder> 6078 getTaskMessageFieldBuilder() { 6079 if (taskMessageBuilder_ == null) { 6080 taskMessageBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< 6081 org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto, org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProto.Builder, org.apache.reef.proto.ReefServiceProtos.TaskStatusProto.TaskMessageProtoOrBuilder>( 6082 taskMessage_, 6083 ((bitField0_ & 0x00000020) == 0x00000020), 6084 getParentForChildren(), 6085 isClean()); 6086 taskMessage_ = null; 6087 } 6088 return taskMessageBuilder_; 6089 } 6090 6091 // @@protoc_insertion_point(builder_scope:TaskStatusProto) 6092 } 6093 6094 static { 6095 defaultInstance = new TaskStatusProto(true); 6096 defaultInstance.initFields(); 6097 } 6098 6099 // @@protoc_insertion_point(class_scope:TaskStatusProto) 6100 } 6101 6102 public interface EvaluatorStatusProtoOrBuilder 6103 extends com.google.protobuf.MessageOrBuilder { 6104 6105 // required string evaluator_id = 1; 6106 /** 6107 * <code>required string evaluator_id = 1;</code> 6108 */ 6109 boolean hasEvaluatorId(); 6110 /** 6111 * <code>required string evaluator_id = 1;</code> 6112 */ 6113 java.lang.String getEvaluatorId(); 6114 /** 6115 * <code>required string evaluator_id = 1;</code> 6116 */ 6117 com.google.protobuf.ByteString 6118 getEvaluatorIdBytes(); 6119 6120 // required .State state = 2; 6121 /** 6122 * <code>required .State state = 2;</code> 6123 */ 6124 boolean hasState(); 6125 /** 6126 * <code>required .State state = 2;</code> 6127 */ 6128 org.apache.reef.proto.ReefServiceProtos.State getState(); 6129 6130 // optional bytes error = 3; 6131 /** 6132 * <code>optional bytes error = 3;</code> 6133 */ 6134 boolean hasError(); 6135 /** 6136 * <code>optional bytes error = 3;</code> 6137 */ 6138 com.google.protobuf.ByteString getError(); 6139 } 6140 /** 6141 * Protobuf type {@code EvaluatorStatusProto} 6142 */ 6143 public static final class EvaluatorStatusProto extends 6144 com.google.protobuf.GeneratedMessage 6145 implements EvaluatorStatusProtoOrBuilder { 6146 // Use EvaluatorStatusProto.newBuilder() to construct. 6147 private EvaluatorStatusProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) { 6148 super(builder); 6149 this.unknownFields = builder.getUnknownFields(); 6150 } 6151 private EvaluatorStatusProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } 6152 6153 private static final EvaluatorStatusProto defaultInstance; 6154 public static EvaluatorStatusProto getDefaultInstance() { 6155 return defaultInstance; 6156 } 6157 6158 public EvaluatorStatusProto getDefaultInstanceForType() { 6159 return defaultInstance; 6160 } 6161 6162 private final com.google.protobuf.UnknownFieldSet unknownFields; 6163 @java.lang.Override 6164 public final com.google.protobuf.UnknownFieldSet 6165 getUnknownFields() { 6166 return this.unknownFields; 6167 } 6168 private EvaluatorStatusProto( 6169 com.google.protobuf.CodedInputStream input, 6170 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 6171 throws com.google.protobuf.InvalidProtocolBufferException { 6172 initFields(); 6173 int mutable_bitField0_ = 0; 6174 com.google.protobuf.UnknownFieldSet.Builder unknownFields = 6175 com.google.protobuf.UnknownFieldSet.newBuilder(); 6176 try { 6177 boolean done = false; 6178 while (!done) { 6179 int tag = input.readTag(); 6180 switch (tag) { 6181 case 0: 6182 done = true; 6183 break; 6184 default: { 6185 if (!parseUnknownField(input, unknownFields, 6186 extensionRegistry, tag)) { 6187 done = true; 6188 } 6189 break; 6190 } 6191 case 10: { 6192 bitField0_ |= 0x00000001; 6193 evaluatorId_ = input.readBytes(); 6194 break; 6195 } 6196 case 16: { 6197 int rawValue = input.readEnum(); 6198 org.apache.reef.proto.ReefServiceProtos.State value = org.apache.reef.proto.ReefServiceProtos.State.valueOf(rawValue); 6199 if (value == null) { 6200 unknownFields.mergeVarintField(2, rawValue); 6201 } else { 6202 bitField0_ |= 0x00000002; 6203 state_ = value; 6204 } 6205 break; 6206 } 6207 case 26: { 6208 bitField0_ |= 0x00000004; 6209 error_ = input.readBytes(); 6210 break; 6211 } 6212 } 6213 } 6214 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 6215 throw e.setUnfinishedMessage(this); 6216 } catch (java.io.IOException e) { 6217 throw new com.google.protobuf.InvalidProtocolBufferException( 6218 e.getMessage()).setUnfinishedMessage(this); 6219 } finally { 6220 this.unknownFields = unknownFields.build(); 6221 makeExtensionsImmutable(); 6222 } 6223 } 6224 public static final com.google.protobuf.Descriptors.Descriptor 6225 getDescriptor() { 6226 return org.apache.reef.proto.ReefServiceProtos.internal_static_EvaluatorStatusProto_descriptor; 6227 } 6228 6229 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 6230 internalGetFieldAccessorTable() { 6231 return org.apache.reef.proto.ReefServiceProtos.internal_static_EvaluatorStatusProto_fieldAccessorTable 6232 .ensureFieldAccessorsInitialized( 6233 org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto.class, org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto.Builder.class); 6234 } 6235 6236 public static com.google.protobuf.Parser<EvaluatorStatusProto> PARSER = 6237 new com.google.protobuf.AbstractParser<EvaluatorStatusProto>() { 6238 public EvaluatorStatusProto parsePartialFrom( 6239 com.google.protobuf.CodedInputStream input, 6240 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 6241 throws com.google.protobuf.InvalidProtocolBufferException { 6242 return new EvaluatorStatusProto(input, extensionRegistry); 6243 } 6244 }; 6245 6246 @java.lang.Override 6247 public com.google.protobuf.Parser<EvaluatorStatusProto> getParserForType() { 6248 return PARSER; 6249 } 6250 6251 private int bitField0_; 6252 // required string evaluator_id = 1; 6253 public static final int EVALUATOR_ID_FIELD_NUMBER = 1; 6254 private java.lang.Object evaluatorId_; 6255 /** 6256 * <code>required string evaluator_id = 1;</code> 6257 */ 6258 public boolean hasEvaluatorId() { 6259 return ((bitField0_ & 0x00000001) == 0x00000001); 6260 } 6261 /** 6262 * <code>required string evaluator_id = 1;</code> 6263 */ 6264 public java.lang.String getEvaluatorId() { 6265 java.lang.Object ref = evaluatorId_; 6266 if (ref instanceof java.lang.String) { 6267 return (java.lang.String) ref; 6268 } else { 6269 com.google.protobuf.ByteString bs = 6270 (com.google.protobuf.ByteString) ref; 6271 java.lang.String s = bs.toStringUtf8(); 6272 if (bs.isValidUtf8()) { 6273 evaluatorId_ = s; 6274 } 6275 return s; 6276 } 6277 } 6278 /** 6279 * <code>required string evaluator_id = 1;</code> 6280 */ 6281 public com.google.protobuf.ByteString 6282 getEvaluatorIdBytes() { 6283 java.lang.Object ref = evaluatorId_; 6284 if (ref instanceof java.lang.String) { 6285 com.google.protobuf.ByteString b = 6286 com.google.protobuf.ByteString.copyFromUtf8( 6287 (java.lang.String) ref); 6288 evaluatorId_ = b; 6289 return b; 6290 } else { 6291 return (com.google.protobuf.ByteString) ref; 6292 } 6293 } 6294 6295 // required .State state = 2; 6296 public static final int STATE_FIELD_NUMBER = 2; 6297 private org.apache.reef.proto.ReefServiceProtos.State state_; 6298 /** 6299 * <code>required .State state = 2;</code> 6300 */ 6301 public boolean hasState() { 6302 return ((bitField0_ & 0x00000002) == 0x00000002); 6303 } 6304 /** 6305 * <code>required .State state = 2;</code> 6306 */ 6307 public org.apache.reef.proto.ReefServiceProtos.State getState() { 6308 return state_; 6309 } 6310 6311 // optional bytes error = 3; 6312 public static final int ERROR_FIELD_NUMBER = 3; 6313 private com.google.protobuf.ByteString error_; 6314 /** 6315 * <code>optional bytes error = 3;</code> 6316 */ 6317 public boolean hasError() { 6318 return ((bitField0_ & 0x00000004) == 0x00000004); 6319 } 6320 /** 6321 * <code>optional bytes error = 3;</code> 6322 */ 6323 public com.google.protobuf.ByteString getError() { 6324 return error_; 6325 } 6326 6327 private void initFields() { 6328 evaluatorId_ = ""; 6329 state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT; 6330 error_ = com.google.protobuf.ByteString.EMPTY; 6331 } 6332 private byte memoizedIsInitialized = -1; 6333 public final boolean isInitialized() { 6334 byte isInitialized = memoizedIsInitialized; 6335 if (isInitialized != -1) return isInitialized == 1; 6336 6337 if (!hasEvaluatorId()) { 6338 memoizedIsInitialized = 0; 6339 return false; 6340 } 6341 if (!hasState()) { 6342 memoizedIsInitialized = 0; 6343 return false; 6344 } 6345 memoizedIsInitialized = 1; 6346 return true; 6347 } 6348 6349 public void writeTo(com.google.protobuf.CodedOutputStream output) 6350 throws java.io.IOException { 6351 getSerializedSize(); 6352 if (((bitField0_ & 0x00000001) == 0x00000001)) { 6353 output.writeBytes(1, getEvaluatorIdBytes()); 6354 } 6355 if (((bitField0_ & 0x00000002) == 0x00000002)) { 6356 output.writeEnum(2, state_.getNumber()); 6357 } 6358 if (((bitField0_ & 0x00000004) == 0x00000004)) { 6359 output.writeBytes(3, error_); 6360 } 6361 getUnknownFields().writeTo(output); 6362 } 6363 6364 private int memoizedSerializedSize = -1; 6365 public int getSerializedSize() { 6366 int size = memoizedSerializedSize; 6367 if (size != -1) return size; 6368 6369 size = 0; 6370 if (((bitField0_ & 0x00000001) == 0x00000001)) { 6371 size += com.google.protobuf.CodedOutputStream 6372 .computeBytesSize(1, getEvaluatorIdBytes()); 6373 } 6374 if (((bitField0_ & 0x00000002) == 0x00000002)) { 6375 size += com.google.protobuf.CodedOutputStream 6376 .computeEnumSize(2, state_.getNumber()); 6377 } 6378 if (((bitField0_ & 0x00000004) == 0x00000004)) { 6379 size += com.google.protobuf.CodedOutputStream 6380 .computeBytesSize(3, error_); 6381 } 6382 size += getUnknownFields().getSerializedSize(); 6383 memoizedSerializedSize = size; 6384 return size; 6385 } 6386 6387 private static final long serialVersionUID = 0L; 6388 @java.lang.Override 6389 protected java.lang.Object writeReplace() 6390 throws java.io.ObjectStreamException { 6391 return super.writeReplace(); 6392 } 6393 6394 @java.lang.Override 6395 public boolean equals(final java.lang.Object obj) { 6396 if (obj == this) { 6397 return true; 6398 } 6399 if (!(obj instanceof org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto)) { 6400 return super.equals(obj); 6401 } 6402 org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto other = (org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto) obj; 6403 6404 boolean result = true; 6405 result = result && (hasEvaluatorId() == other.hasEvaluatorId()); 6406 if (hasEvaluatorId()) { 6407 result = result && getEvaluatorId() 6408 .equals(other.getEvaluatorId()); 6409 } 6410 result = result && (hasState() == other.hasState()); 6411 if (hasState()) { 6412 result = result && 6413 (getState() == other.getState()); 6414 } 6415 result = result && (hasError() == other.hasError()); 6416 if (hasError()) { 6417 result = result && getError() 6418 .equals(other.getError()); 6419 } 6420 result = result && 6421 getUnknownFields().equals(other.getUnknownFields()); 6422 return result; 6423 } 6424 6425 private int memoizedHashCode = 0; 6426 @java.lang.Override 6427 public int hashCode() { 6428 if (memoizedHashCode != 0) { 6429 return memoizedHashCode; 6430 } 6431 int hash = 41; 6432 hash = (19 * hash) + getDescriptorForType().hashCode(); 6433 if (hasEvaluatorId()) { 6434 hash = (37 * hash) + EVALUATOR_ID_FIELD_NUMBER; 6435 hash = (53 * hash) + getEvaluatorId().hashCode(); 6436 } 6437 if (hasState()) { 6438 hash = (37 * hash) + STATE_FIELD_NUMBER; 6439 hash = (53 * hash) + hashEnum(getState()); 6440 } 6441 if (hasError()) { 6442 hash = (37 * hash) + ERROR_FIELD_NUMBER; 6443 hash = (53 * hash) + getError().hashCode(); 6444 } 6445 hash = (29 * hash) + getUnknownFields().hashCode(); 6446 memoizedHashCode = hash; 6447 return hash; 6448 } 6449 6450 public static org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto parseFrom( 6451 com.google.protobuf.ByteString data) 6452 throws com.google.protobuf.InvalidProtocolBufferException { 6453 return PARSER.parseFrom(data); 6454 } 6455 public static org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto parseFrom( 6456 com.google.protobuf.ByteString data, 6457 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 6458 throws com.google.protobuf.InvalidProtocolBufferException { 6459 return PARSER.parseFrom(data, extensionRegistry); 6460 } 6461 public static org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto parseFrom(byte[] data) 6462 throws com.google.protobuf.InvalidProtocolBufferException { 6463 return PARSER.parseFrom(data); 6464 } 6465 public static org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto parseFrom( 6466 byte[] data, 6467 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 6468 throws com.google.protobuf.InvalidProtocolBufferException { 6469 return PARSER.parseFrom(data, extensionRegistry); 6470 } 6471 public static org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto parseFrom(java.io.InputStream input) 6472 throws java.io.IOException { 6473 return PARSER.parseFrom(input); 6474 } 6475 public static org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto parseFrom( 6476 java.io.InputStream input, 6477 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 6478 throws java.io.IOException { 6479 return PARSER.parseFrom(input, extensionRegistry); 6480 } 6481 public static org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto parseDelimitedFrom(java.io.InputStream input) 6482 throws java.io.IOException { 6483 return PARSER.parseDelimitedFrom(input); 6484 } 6485 public static org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto parseDelimitedFrom( 6486 java.io.InputStream input, 6487 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 6488 throws java.io.IOException { 6489 return PARSER.parseDelimitedFrom(input, extensionRegistry); 6490 } 6491 public static org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto parseFrom( 6492 com.google.protobuf.CodedInputStream input) 6493 throws java.io.IOException { 6494 return PARSER.parseFrom(input); 6495 } 6496 public static org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto parseFrom( 6497 com.google.protobuf.CodedInputStream input, 6498 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 6499 throws java.io.IOException { 6500 return PARSER.parseFrom(input, extensionRegistry); 6501 } 6502 6503 public static Builder newBuilder() { return Builder.create(); } 6504 public Builder newBuilderForType() { return newBuilder(); } 6505 public static Builder newBuilder(org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto prototype) { 6506 return newBuilder().mergeFrom(prototype); 6507 } 6508 public Builder toBuilder() { return newBuilder(this); } 6509 6510 @java.lang.Override 6511 protected Builder newBuilderForType( 6512 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 6513 Builder builder = new Builder(parent); 6514 return builder; 6515 } 6516 /** 6517 * Protobuf type {@code EvaluatorStatusProto} 6518 */ 6519 public static final class Builder extends 6520 com.google.protobuf.GeneratedMessage.Builder<Builder> 6521 implements org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProtoOrBuilder { 6522 public static final com.google.protobuf.Descriptors.Descriptor 6523 getDescriptor() { 6524 return org.apache.reef.proto.ReefServiceProtos.internal_static_EvaluatorStatusProto_descriptor; 6525 } 6526 6527 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 6528 internalGetFieldAccessorTable() { 6529 return org.apache.reef.proto.ReefServiceProtos.internal_static_EvaluatorStatusProto_fieldAccessorTable 6530 .ensureFieldAccessorsInitialized( 6531 org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto.class, org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto.Builder.class); 6532 } 6533 6534 // Construct using org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto.newBuilder() 6535 private Builder() { 6536 maybeForceBuilderInitialization(); 6537 } 6538 6539 private Builder( 6540 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 6541 super(parent); 6542 maybeForceBuilderInitialization(); 6543 } 6544 private void maybeForceBuilderInitialization() { 6545 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { 6546 } 6547 } 6548 private static Builder create() { 6549 return new Builder(); 6550 } 6551 6552 public Builder clear() { 6553 super.clear(); 6554 evaluatorId_ = ""; 6555 bitField0_ = (bitField0_ & ~0x00000001); 6556 state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT; 6557 bitField0_ = (bitField0_ & ~0x00000002); 6558 error_ = com.google.protobuf.ByteString.EMPTY; 6559 bitField0_ = (bitField0_ & ~0x00000004); 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.ReefServiceProtos.internal_static_EvaluatorStatusProto_descriptor; 6570 } 6571 6572 public org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto getDefaultInstanceForType() { 6573 return org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto.getDefaultInstance(); 6574 } 6575 6576 public org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto build() { 6577 org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto result = buildPartial(); 6578 if (!result.isInitialized()) { 6579 throw newUninitializedMessageException(result); 6580 } 6581 return result; 6582 } 6583 6584 public org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto buildPartial() { 6585 org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto result = new org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto(this); 6586 int from_bitField0_ = bitField0_; 6587 int to_bitField0_ = 0; 6588 if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 6589 to_bitField0_ |= 0x00000001; 6590 } 6591 result.evaluatorId_ = evaluatorId_; 6592 if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 6593 to_bitField0_ |= 0x00000002; 6594 } 6595 result.state_ = state_; 6596 if (((from_bitField0_ & 0x00000004) == 0x00000004)) { 6597 to_bitField0_ |= 0x00000004; 6598 } 6599 result.error_ = error_; 6600 result.bitField0_ = to_bitField0_; 6601 onBuilt(); 6602 return result; 6603 } 6604 6605 public Builder mergeFrom(com.google.protobuf.Message other) { 6606 if (other instanceof org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto) { 6607 return mergeFrom((org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto)other); 6608 } else { 6609 super.mergeFrom(other); 6610 return this; 6611 } 6612 } 6613 6614 public Builder mergeFrom(org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto other) { 6615 if (other == org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto.getDefaultInstance()) return this; 6616 if (other.hasEvaluatorId()) { 6617 bitField0_ |= 0x00000001; 6618 evaluatorId_ = other.evaluatorId_; 6619 onChanged(); 6620 } 6621 if (other.hasState()) { 6622 setState(other.getState()); 6623 } 6624 if (other.hasError()) { 6625 setError(other.getError()); 6626 } 6627 this.mergeUnknownFields(other.getUnknownFields()); 6628 return this; 6629 } 6630 6631 public final boolean isInitialized() { 6632 if (!hasEvaluatorId()) { 6633 6634 return false; 6635 } 6636 if (!hasState()) { 6637 6638 return false; 6639 } 6640 return true; 6641 } 6642 6643 public Builder mergeFrom( 6644 com.google.protobuf.CodedInputStream input, 6645 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 6646 throws java.io.IOException { 6647 org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto parsedMessage = null; 6648 try { 6649 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 6650 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 6651 parsedMessage = (org.apache.reef.proto.ReefServiceProtos.EvaluatorStatusProto) e.getUnfinishedMessage(); 6652 throw e; 6653 } finally { 6654 if (parsedMessage != null) { 6655 mergeFrom(parsedMessage); 6656 } 6657 } 6658 return this; 6659 } 6660 private int bitField0_; 6661 6662 // required string evaluator_id = 1; 6663 private java.lang.Object evaluatorId_ = ""; 6664 /** 6665 * <code>required string evaluator_id = 1;</code> 6666 */ 6667 public boolean hasEvaluatorId() { 6668 return ((bitField0_ & 0x00000001) == 0x00000001); 6669 } 6670 /** 6671 * <code>required string evaluator_id = 1;</code> 6672 */ 6673 public java.lang.String getEvaluatorId() { 6674 java.lang.Object ref = evaluatorId_; 6675 if (!(ref instanceof java.lang.String)) { 6676 java.lang.String s = ((com.google.protobuf.ByteString) ref) 6677 .toStringUtf8(); 6678 evaluatorId_ = s; 6679 return s; 6680 } else { 6681 return (java.lang.String) ref; 6682 } 6683 } 6684 /** 6685 * <code>required string evaluator_id = 1;</code> 6686 */ 6687 public com.google.protobuf.ByteString 6688 getEvaluatorIdBytes() { 6689 java.lang.Object ref = evaluatorId_; 6690 if (ref instanceof String) { 6691 com.google.protobuf.ByteString b = 6692 com.google.protobuf.ByteString.copyFromUtf8( 6693 (java.lang.String) ref); 6694 evaluatorId_ = b; 6695 return b; 6696 } else { 6697 return (com.google.protobuf.ByteString) ref; 6698 } 6699 } 6700 /** 6701 * <code>required string evaluator_id = 1;</code> 6702 */ 6703 public Builder setEvaluatorId( 6704 java.lang.String value) { 6705 if (value == null) { 6706 throw new NullPointerException(); 6707 } 6708 bitField0_ |= 0x00000001; 6709 evaluatorId_ = value; 6710 onChanged(); 6711 return this; 6712 } 6713 /** 6714 * <code>required string evaluator_id = 1;</code> 6715 */ 6716 public Builder clearEvaluatorId() { 6717 bitField0_ = (bitField0_ & ~0x00000001); 6718 evaluatorId_ = getDefaultInstance().getEvaluatorId(); 6719 onChanged(); 6720 return this; 6721 } 6722 /** 6723 * <code>required string evaluator_id = 1;</code> 6724 */ 6725 public Builder setEvaluatorIdBytes( 6726 com.google.protobuf.ByteString value) { 6727 if (value == null) { 6728 throw new NullPointerException(); 6729 } 6730 bitField0_ |= 0x00000001; 6731 evaluatorId_ = value; 6732 onChanged(); 6733 return this; 6734 } 6735 6736 // required .State state = 2; 6737 private org.apache.reef.proto.ReefServiceProtos.State state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT; 6738 /** 6739 * <code>required .State state = 2;</code> 6740 */ 6741 public boolean hasState() { 6742 return ((bitField0_ & 0x00000002) == 0x00000002); 6743 } 6744 /** 6745 * <code>required .State state = 2;</code> 6746 */ 6747 public org.apache.reef.proto.ReefServiceProtos.State getState() { 6748 return state_; 6749 } 6750 /** 6751 * <code>required .State state = 2;</code> 6752 */ 6753 public Builder setState(org.apache.reef.proto.ReefServiceProtos.State value) { 6754 if (value == null) { 6755 throw new NullPointerException(); 6756 } 6757 bitField0_ |= 0x00000002; 6758 state_ = value; 6759 onChanged(); 6760 return this; 6761 } 6762 /** 6763 * <code>required .State state = 2;</code> 6764 */ 6765 public Builder clearState() { 6766 bitField0_ = (bitField0_ & ~0x00000002); 6767 state_ = org.apache.reef.proto.ReefServiceProtos.State.INIT; 6768 onChanged(); 6769 return this; 6770 } 6771 6772 // optional bytes error = 3; 6773 private com.google.protobuf.ByteString error_ = com.google.protobuf.ByteString.EMPTY; 6774 /** 6775 * <code>optional bytes error = 3;</code> 6776 */ 6777 public boolean hasError() { 6778 return ((bitField0_ & 0x00000004) == 0x00000004); 6779 } 6780 /** 6781 * <code>optional bytes error = 3;</code> 6782 */ 6783 public com.google.protobuf.ByteString getError() { 6784 return error_; 6785 } 6786 /** 6787 * <code>optional bytes error = 3;</code> 6788 */ 6789 public Builder setError(com.google.protobuf.ByteString value) { 6790 if (value == null) { 6791 throw new NullPointerException(); 6792 } 6793 bitField0_ |= 0x00000004; 6794 error_ = value; 6795 onChanged(); 6796 return this; 6797 } 6798 /** 6799 * <code>optional bytes error = 3;</code> 6800 */ 6801 public Builder clearError() { 6802 bitField0_ = (bitField0_ & ~0x00000004); 6803 error_ = getDefaultInstance().getError(); 6804 onChanged(); 6805 return this; 6806 } 6807 6808 // @@protoc_insertion_point(builder_scope:EvaluatorStatusProto) 6809 } 6810 6811 static { 6812 defaultInstance = new EvaluatorStatusProto(true); 6813 defaultInstance.initFields(); 6814 } 6815 6816 // @@protoc_insertion_point(class_scope:EvaluatorStatusProto) 6817 } 6818 6819 private static com.google.protobuf.Descriptors.Descriptor 6820 internal_static_RuntimeErrorProto_descriptor; 6821 private static 6822 com.google.protobuf.GeneratedMessage.FieldAccessorTable 6823 internal_static_RuntimeErrorProto_fieldAccessorTable; 6824 private static com.google.protobuf.Descriptors.Descriptor 6825 internal_static_JobStatusProto_descriptor; 6826 private static 6827 com.google.protobuf.GeneratedMessage.FieldAccessorTable 6828 internal_static_JobStatusProto_fieldAccessorTable; 6829 private static com.google.protobuf.Descriptors.Descriptor 6830 internal_static_ContextStatusProto_descriptor; 6831 private static 6832 com.google.protobuf.GeneratedMessage.FieldAccessorTable 6833 internal_static_ContextStatusProto_fieldAccessorTable; 6834 private static com.google.protobuf.Descriptors.Descriptor 6835 internal_static_ContextStatusProto_ContextMessageProto_descriptor; 6836 private static 6837 com.google.protobuf.GeneratedMessage.FieldAccessorTable 6838 internal_static_ContextStatusProto_ContextMessageProto_fieldAccessorTable; 6839 private static com.google.protobuf.Descriptors.Descriptor 6840 internal_static_TaskStatusProto_descriptor; 6841 private static 6842 com.google.protobuf.GeneratedMessage.FieldAccessorTable 6843 internal_static_TaskStatusProto_fieldAccessorTable; 6844 private static com.google.protobuf.Descriptors.Descriptor 6845 internal_static_TaskStatusProto_TaskMessageProto_descriptor; 6846 private static 6847 com.google.protobuf.GeneratedMessage.FieldAccessorTable 6848 internal_static_TaskStatusProto_TaskMessageProto_fieldAccessorTable; 6849 private static com.google.protobuf.Descriptors.Descriptor 6850 internal_static_EvaluatorStatusProto_descriptor; 6851 private static 6852 com.google.protobuf.GeneratedMessage.FieldAccessorTable 6853 internal_static_EvaluatorStatusProto_fieldAccessorTable; 6854 6855 public static com.google.protobuf.Descriptors.FileDescriptor 6856 getDescriptor() { 6857 return descriptor; 6858 } 6859 private static com.google.protobuf.Descriptors.FileDescriptor 6860 descriptor; 6861 static { 6862 java.lang.String[] descriptorData = { 6863 "\n\031reef_service_protos.proto\"Y\n\021RuntimeEr" + 6864 "rorProto\022\014\n\004name\030\001 \002(\t\022\017\n\007message\030\002 \002(\t\022" + 6865 "\021\n\texception\030\003 \001(\014\022\022\n\nidentifier\030\005 \001(\t\"_" + 6866 "\n\016JobStatusProto\022\022\n\nidentifier\030\001 \002(\t\022\025\n\005" + 6867 "state\030\002 \002(\0162\006.State\022\017\n\007message\030\003 \001(\014\022\021\n\t" + 6868 "exception\030\004 \001(\014\"\263\002\n\022ContextStatusProto\0220" + 6869 "\n\rcontext_state\030\001 \002(\0162\031.ContextStatusPro" + 6870 "to.State\022\022\n\ncontext_id\030\002 \002(\t\022\021\n\tparent_i" + 6871 "d\030\003 \001(\t\022\r\n\005error\030\005 \001(\014\022\020\n\010recovery\030\006 \001(\010" + 6872 "\022@\n\017context_message\030\007 \003(\0132\'.ContextStatu", 6873 "sProto.ContextMessageProto\0329\n\023ContextMes" + 6874 "sageProto\022\021\n\tsource_id\030\001 \002(\t\022\017\n\007message\030" + 6875 "\002 \002(\014\"&\n\005State\022\t\n\005READY\020\000\022\010\n\004DONE\020\001\022\010\n\004F" + 6876 "AIL\020\002\"\340\001\n\017TaskStatusProto\022\017\n\007task_id\030\001 \002" + 6877 "(\t\022\022\n\ncontext_id\030\002 \002(\t\022\025\n\005state\030\003 \002(\0162\006." + 6878 "State\022\016\n\006result\030\004 \001(\014\022\020\n\010recovery\030\005 \001(\010\022" + 6879 "7\n\014task_message\030\006 \003(\0132!.TaskStatusProto." + 6880 "TaskMessageProto\0326\n\020TaskMessageProto\022\021\n\t" + 6881 "source_id\030\001 \002(\t\022\017\n\007message\030\002 \002(\014\"R\n\024Eval" + 6882 "uatorStatusProto\022\024\n\014evaluator_id\030\001 \002(\t\022\025", 6883 "\n\005state\030\002 \002(\0162\006.State\022\r\n\005error\030\003 \001(\014*M\n\005" + 6884 "State\022\010\n\004INIT\020\000\022\013\n\007RUNNING\020\001\022\010\n\004DONE\020\002\022\013" + 6885 "\n\007SUSPEND\020\003\022\n\n\006FAILED\020\004\022\n\n\006KILLED\020\005B0\n\025o" + 6886 "rg.apache.reef.protoB\021ReefServiceProtos\210" + 6887 "\001\001\240\001\001" 6888 }; 6889 com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 6890 new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { 6891 public com.google.protobuf.ExtensionRegistry assignDescriptors( 6892 com.google.protobuf.Descriptors.FileDescriptor root) { 6893 descriptor = root; 6894 internal_static_RuntimeErrorProto_descriptor = 6895 getDescriptor().getMessageTypes().get(0); 6896 internal_static_RuntimeErrorProto_fieldAccessorTable = new 6897 com.google.protobuf.GeneratedMessage.FieldAccessorTable( 6898 internal_static_RuntimeErrorProto_descriptor, 6899 new java.lang.String[] { "Name", "Message", "Exception", "Identifier", }); 6900 internal_static_JobStatusProto_descriptor = 6901 getDescriptor().getMessageTypes().get(1); 6902 internal_static_JobStatusProto_fieldAccessorTable = new 6903 com.google.protobuf.GeneratedMessage.FieldAccessorTable( 6904 internal_static_JobStatusProto_descriptor, 6905 new java.lang.String[] { "Identifier", "State", "Message", "Exception", }); 6906 internal_static_ContextStatusProto_descriptor = 6907 getDescriptor().getMessageTypes().get(2); 6908 internal_static_ContextStatusProto_fieldAccessorTable = new 6909 com.google.protobuf.GeneratedMessage.FieldAccessorTable( 6910 internal_static_ContextStatusProto_descriptor, 6911 new java.lang.String[] { "ContextState", "ContextId", "ParentId", "Error", "Recovery", "ContextMessage", }); 6912 internal_static_ContextStatusProto_ContextMessageProto_descriptor = 6913 internal_static_ContextStatusProto_descriptor.getNestedTypes().get(0); 6914 internal_static_ContextStatusProto_ContextMessageProto_fieldAccessorTable = new 6915 com.google.protobuf.GeneratedMessage.FieldAccessorTable( 6916 internal_static_ContextStatusProto_ContextMessageProto_descriptor, 6917 new java.lang.String[] { "SourceId", "Message", }); 6918 internal_static_TaskStatusProto_descriptor = 6919 getDescriptor().getMessageTypes().get(3); 6920 internal_static_TaskStatusProto_fieldAccessorTable = new 6921 com.google.protobuf.GeneratedMessage.FieldAccessorTable( 6922 internal_static_TaskStatusProto_descriptor, 6923 new java.lang.String[] { "TaskId", "ContextId", "State", "Result", "Recovery", "TaskMessage", }); 6924 internal_static_TaskStatusProto_TaskMessageProto_descriptor = 6925 internal_static_TaskStatusProto_descriptor.getNestedTypes().get(0); 6926 internal_static_TaskStatusProto_TaskMessageProto_fieldAccessorTable = new 6927 com.google.protobuf.GeneratedMessage.FieldAccessorTable( 6928 internal_static_TaskStatusProto_TaskMessageProto_descriptor, 6929 new java.lang.String[] { "SourceId", "Message", }); 6930 internal_static_EvaluatorStatusProto_descriptor = 6931 getDescriptor().getMessageTypes().get(4); 6932 internal_static_EvaluatorStatusProto_fieldAccessorTable = new 6933 com.google.protobuf.GeneratedMessage.FieldAccessorTable( 6934 internal_static_EvaluatorStatusProto_descriptor, 6935 new java.lang.String[] { "EvaluatorId", "State", "Error", }); 6936 return null; 6937 } 6938 }; 6939 com.google.protobuf.Descriptors.FileDescriptor 6940 .internalBuildGeneratedFileFrom(descriptorData, 6941 new com.google.protobuf.Descriptors.FileDescriptor[] { 6942 }, assigner); 6943 } 6944 6945 // @@protoc_insertion_point(outer_class_scope) 6946}