001// Generated by the protocol buffer compiler. DO NOT EDIT! 002// source: HAZKInfo.proto 003 004package org.apache.hadoop.hdfs.server.namenode.ha.proto; 005 006public final class HAZKInfoProtos { 007 private HAZKInfoProtos() {} 008 public static void registerAllExtensions( 009 com.google.protobuf.ExtensionRegistry registry) { 010 } 011 public interface ActiveNodeInfoOrBuilder 012 extends com.google.protobuf.MessageOrBuilder { 013 014 // required string nameserviceId = 1; 015 /** 016 * <code>required string nameserviceId = 1;</code> 017 */ 018 boolean hasNameserviceId(); 019 /** 020 * <code>required string nameserviceId = 1;</code> 021 */ 022 java.lang.String getNameserviceId(); 023 /** 024 * <code>required string nameserviceId = 1;</code> 025 */ 026 com.google.protobuf.ByteString 027 getNameserviceIdBytes(); 028 029 // required string namenodeId = 2; 030 /** 031 * <code>required string namenodeId = 2;</code> 032 */ 033 boolean hasNamenodeId(); 034 /** 035 * <code>required string namenodeId = 2;</code> 036 */ 037 java.lang.String getNamenodeId(); 038 /** 039 * <code>required string namenodeId = 2;</code> 040 */ 041 com.google.protobuf.ByteString 042 getNamenodeIdBytes(); 043 044 // required string hostname = 3; 045 /** 046 * <code>required string hostname = 3;</code> 047 */ 048 boolean hasHostname(); 049 /** 050 * <code>required string hostname = 3;</code> 051 */ 052 java.lang.String getHostname(); 053 /** 054 * <code>required string hostname = 3;</code> 055 */ 056 com.google.protobuf.ByteString 057 getHostnameBytes(); 058 059 // required int32 port = 4; 060 /** 061 * <code>required int32 port = 4;</code> 062 */ 063 boolean hasPort(); 064 /** 065 * <code>required int32 port = 4;</code> 066 */ 067 int getPort(); 068 069 // required int32 zkfcPort = 5; 070 /** 071 * <code>required int32 zkfcPort = 5;</code> 072 */ 073 boolean hasZkfcPort(); 074 /** 075 * <code>required int32 zkfcPort = 5;</code> 076 */ 077 int getZkfcPort(); 078 } 079 /** 080 * Protobuf type {@code hadoop.hdfs.ActiveNodeInfo} 081 */ 082 public static final class ActiveNodeInfo extends 083 com.google.protobuf.GeneratedMessage 084 implements ActiveNodeInfoOrBuilder { 085 // Use ActiveNodeInfo.newBuilder() to construct. 086 private ActiveNodeInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) { 087 super(builder); 088 this.unknownFields = builder.getUnknownFields(); 089 } 090 private ActiveNodeInfo(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } 091 092 private static final ActiveNodeInfo defaultInstance; 093 public static ActiveNodeInfo getDefaultInstance() { 094 return defaultInstance; 095 } 096 097 public ActiveNodeInfo getDefaultInstanceForType() { 098 return defaultInstance; 099 } 100 101 private final com.google.protobuf.UnknownFieldSet unknownFields; 102 @java.lang.Override 103 public final com.google.protobuf.UnknownFieldSet 104 getUnknownFields() { 105 return this.unknownFields; 106 } 107 private ActiveNodeInfo( 108 com.google.protobuf.CodedInputStream input, 109 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 110 throws com.google.protobuf.InvalidProtocolBufferException { 111 initFields(); 112 int mutable_bitField0_ = 0; 113 com.google.protobuf.UnknownFieldSet.Builder unknownFields = 114 com.google.protobuf.UnknownFieldSet.newBuilder(); 115 try { 116 boolean done = false; 117 while (!done) { 118 int tag = input.readTag(); 119 switch (tag) { 120 case 0: 121 done = true; 122 break; 123 default: { 124 if (!parseUnknownField(input, unknownFields, 125 extensionRegistry, tag)) { 126 done = true; 127 } 128 break; 129 } 130 case 10: { 131 bitField0_ |= 0x00000001; 132 nameserviceId_ = input.readBytes(); 133 break; 134 } 135 case 18: { 136 bitField0_ |= 0x00000002; 137 namenodeId_ = input.readBytes(); 138 break; 139 } 140 case 26: { 141 bitField0_ |= 0x00000004; 142 hostname_ = input.readBytes(); 143 break; 144 } 145 case 32: { 146 bitField0_ |= 0x00000008; 147 port_ = input.readInt32(); 148 break; 149 } 150 case 40: { 151 bitField0_ |= 0x00000010; 152 zkfcPort_ = input.readInt32(); 153 break; 154 } 155 } 156 } 157 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 158 throw e.setUnfinishedMessage(this); 159 } catch (java.io.IOException e) { 160 throw new com.google.protobuf.InvalidProtocolBufferException( 161 e.getMessage()).setUnfinishedMessage(this); 162 } finally { 163 this.unknownFields = unknownFields.build(); 164 makeExtensionsImmutable(); 165 } 166 } 167 public static final com.google.protobuf.Descriptors.Descriptor 168 getDescriptor() { 169 return org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.internal_static_hadoop_hdfs_ActiveNodeInfo_descriptor; 170 } 171 172 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 173 internalGetFieldAccessorTable() { 174 return org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.internal_static_hadoop_hdfs_ActiveNodeInfo_fieldAccessorTable 175 .ensureFieldAccessorsInitialized( 176 org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo.class, org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo.Builder.class); 177 } 178 179 public static com.google.protobuf.Parser<ActiveNodeInfo> PARSER = 180 new com.google.protobuf.AbstractParser<ActiveNodeInfo>() { 181 public ActiveNodeInfo parsePartialFrom( 182 com.google.protobuf.CodedInputStream input, 183 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 184 throws com.google.protobuf.InvalidProtocolBufferException { 185 return new ActiveNodeInfo(input, extensionRegistry); 186 } 187 }; 188 189 @java.lang.Override 190 public com.google.protobuf.Parser<ActiveNodeInfo> getParserForType() { 191 return PARSER; 192 } 193 194 private int bitField0_; 195 // required string nameserviceId = 1; 196 public static final int NAMESERVICEID_FIELD_NUMBER = 1; 197 private java.lang.Object nameserviceId_; 198 /** 199 * <code>required string nameserviceId = 1;</code> 200 */ 201 public boolean hasNameserviceId() { 202 return ((bitField0_ & 0x00000001) == 0x00000001); 203 } 204 /** 205 * <code>required string nameserviceId = 1;</code> 206 */ 207 public java.lang.String getNameserviceId() { 208 java.lang.Object ref = nameserviceId_; 209 if (ref instanceof java.lang.String) { 210 return (java.lang.String) ref; 211 } else { 212 com.google.protobuf.ByteString bs = 213 (com.google.protobuf.ByteString) ref; 214 java.lang.String s = bs.toStringUtf8(); 215 if (bs.isValidUtf8()) { 216 nameserviceId_ = s; 217 } 218 return s; 219 } 220 } 221 /** 222 * <code>required string nameserviceId = 1;</code> 223 */ 224 public com.google.protobuf.ByteString 225 getNameserviceIdBytes() { 226 java.lang.Object ref = nameserviceId_; 227 if (ref instanceof java.lang.String) { 228 com.google.protobuf.ByteString b = 229 com.google.protobuf.ByteString.copyFromUtf8( 230 (java.lang.String) ref); 231 nameserviceId_ = b; 232 return b; 233 } else { 234 return (com.google.protobuf.ByteString) ref; 235 } 236 } 237 238 // required string namenodeId = 2; 239 public static final int NAMENODEID_FIELD_NUMBER = 2; 240 private java.lang.Object namenodeId_; 241 /** 242 * <code>required string namenodeId = 2;</code> 243 */ 244 public boolean hasNamenodeId() { 245 return ((bitField0_ & 0x00000002) == 0x00000002); 246 } 247 /** 248 * <code>required string namenodeId = 2;</code> 249 */ 250 public java.lang.String getNamenodeId() { 251 java.lang.Object ref = namenodeId_; 252 if (ref instanceof java.lang.String) { 253 return (java.lang.String) ref; 254 } else { 255 com.google.protobuf.ByteString bs = 256 (com.google.protobuf.ByteString) ref; 257 java.lang.String s = bs.toStringUtf8(); 258 if (bs.isValidUtf8()) { 259 namenodeId_ = s; 260 } 261 return s; 262 } 263 } 264 /** 265 * <code>required string namenodeId = 2;</code> 266 */ 267 public com.google.protobuf.ByteString 268 getNamenodeIdBytes() { 269 java.lang.Object ref = namenodeId_; 270 if (ref instanceof java.lang.String) { 271 com.google.protobuf.ByteString b = 272 com.google.protobuf.ByteString.copyFromUtf8( 273 (java.lang.String) ref); 274 namenodeId_ = b; 275 return b; 276 } else { 277 return (com.google.protobuf.ByteString) ref; 278 } 279 } 280 281 // required string hostname = 3; 282 public static final int HOSTNAME_FIELD_NUMBER = 3; 283 private java.lang.Object hostname_; 284 /** 285 * <code>required string hostname = 3;</code> 286 */ 287 public boolean hasHostname() { 288 return ((bitField0_ & 0x00000004) == 0x00000004); 289 } 290 /** 291 * <code>required string hostname = 3;</code> 292 */ 293 public java.lang.String getHostname() { 294 java.lang.Object ref = hostname_; 295 if (ref instanceof java.lang.String) { 296 return (java.lang.String) ref; 297 } else { 298 com.google.protobuf.ByteString bs = 299 (com.google.protobuf.ByteString) ref; 300 java.lang.String s = bs.toStringUtf8(); 301 if (bs.isValidUtf8()) { 302 hostname_ = s; 303 } 304 return s; 305 } 306 } 307 /** 308 * <code>required string hostname = 3;</code> 309 */ 310 public com.google.protobuf.ByteString 311 getHostnameBytes() { 312 java.lang.Object ref = hostname_; 313 if (ref instanceof java.lang.String) { 314 com.google.protobuf.ByteString b = 315 com.google.protobuf.ByteString.copyFromUtf8( 316 (java.lang.String) ref); 317 hostname_ = b; 318 return b; 319 } else { 320 return (com.google.protobuf.ByteString) ref; 321 } 322 } 323 324 // required int32 port = 4; 325 public static final int PORT_FIELD_NUMBER = 4; 326 private int port_; 327 /** 328 * <code>required int32 port = 4;</code> 329 */ 330 public boolean hasPort() { 331 return ((bitField0_ & 0x00000008) == 0x00000008); 332 } 333 /** 334 * <code>required int32 port = 4;</code> 335 */ 336 public int getPort() { 337 return port_; 338 } 339 340 // required int32 zkfcPort = 5; 341 public static final int ZKFCPORT_FIELD_NUMBER = 5; 342 private int zkfcPort_; 343 /** 344 * <code>required int32 zkfcPort = 5;</code> 345 */ 346 public boolean hasZkfcPort() { 347 return ((bitField0_ & 0x00000010) == 0x00000010); 348 } 349 /** 350 * <code>required int32 zkfcPort = 5;</code> 351 */ 352 public int getZkfcPort() { 353 return zkfcPort_; 354 } 355 356 private void initFields() { 357 nameserviceId_ = ""; 358 namenodeId_ = ""; 359 hostname_ = ""; 360 port_ = 0; 361 zkfcPort_ = 0; 362 } 363 private byte memoizedIsInitialized = -1; 364 public final boolean isInitialized() { 365 byte isInitialized = memoizedIsInitialized; 366 if (isInitialized != -1) return isInitialized == 1; 367 368 if (!hasNameserviceId()) { 369 memoizedIsInitialized = 0; 370 return false; 371 } 372 if (!hasNamenodeId()) { 373 memoizedIsInitialized = 0; 374 return false; 375 } 376 if (!hasHostname()) { 377 memoizedIsInitialized = 0; 378 return false; 379 } 380 if (!hasPort()) { 381 memoizedIsInitialized = 0; 382 return false; 383 } 384 if (!hasZkfcPort()) { 385 memoizedIsInitialized = 0; 386 return false; 387 } 388 memoizedIsInitialized = 1; 389 return true; 390 } 391 392 public void writeTo(com.google.protobuf.CodedOutputStream output) 393 throws java.io.IOException { 394 getSerializedSize(); 395 if (((bitField0_ & 0x00000001) == 0x00000001)) { 396 output.writeBytes(1, getNameserviceIdBytes()); 397 } 398 if (((bitField0_ & 0x00000002) == 0x00000002)) { 399 output.writeBytes(2, getNamenodeIdBytes()); 400 } 401 if (((bitField0_ & 0x00000004) == 0x00000004)) { 402 output.writeBytes(3, getHostnameBytes()); 403 } 404 if (((bitField0_ & 0x00000008) == 0x00000008)) { 405 output.writeInt32(4, port_); 406 } 407 if (((bitField0_ & 0x00000010) == 0x00000010)) { 408 output.writeInt32(5, zkfcPort_); 409 } 410 getUnknownFields().writeTo(output); 411 } 412 413 private int memoizedSerializedSize = -1; 414 public int getSerializedSize() { 415 int size = memoizedSerializedSize; 416 if (size != -1) return size; 417 418 size = 0; 419 if (((bitField0_ & 0x00000001) == 0x00000001)) { 420 size += com.google.protobuf.CodedOutputStream 421 .computeBytesSize(1, getNameserviceIdBytes()); 422 } 423 if (((bitField0_ & 0x00000002) == 0x00000002)) { 424 size += com.google.protobuf.CodedOutputStream 425 .computeBytesSize(2, getNamenodeIdBytes()); 426 } 427 if (((bitField0_ & 0x00000004) == 0x00000004)) { 428 size += com.google.protobuf.CodedOutputStream 429 .computeBytesSize(3, getHostnameBytes()); 430 } 431 if (((bitField0_ & 0x00000008) == 0x00000008)) { 432 size += com.google.protobuf.CodedOutputStream 433 .computeInt32Size(4, port_); 434 } 435 if (((bitField0_ & 0x00000010) == 0x00000010)) { 436 size += com.google.protobuf.CodedOutputStream 437 .computeInt32Size(5, zkfcPort_); 438 } 439 size += getUnknownFields().getSerializedSize(); 440 memoizedSerializedSize = size; 441 return size; 442 } 443 444 private static final long serialVersionUID = 0L; 445 @java.lang.Override 446 protected java.lang.Object writeReplace() 447 throws java.io.ObjectStreamException { 448 return super.writeReplace(); 449 } 450 451 public static org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo parseFrom( 452 com.google.protobuf.ByteString data) 453 throws com.google.protobuf.InvalidProtocolBufferException { 454 return PARSER.parseFrom(data); 455 } 456 public static org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo parseFrom( 457 com.google.protobuf.ByteString data, 458 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 459 throws com.google.protobuf.InvalidProtocolBufferException { 460 return PARSER.parseFrom(data, extensionRegistry); 461 } 462 public static org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo parseFrom(byte[] data) 463 throws com.google.protobuf.InvalidProtocolBufferException { 464 return PARSER.parseFrom(data); 465 } 466 public static org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo parseFrom( 467 byte[] data, 468 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 469 throws com.google.protobuf.InvalidProtocolBufferException { 470 return PARSER.parseFrom(data, extensionRegistry); 471 } 472 public static org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo parseFrom(java.io.InputStream input) 473 throws java.io.IOException { 474 return PARSER.parseFrom(input); 475 } 476 public static org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo parseFrom( 477 java.io.InputStream input, 478 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 479 throws java.io.IOException { 480 return PARSER.parseFrom(input, extensionRegistry); 481 } 482 public static org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo parseDelimitedFrom(java.io.InputStream input) 483 throws java.io.IOException { 484 return PARSER.parseDelimitedFrom(input); 485 } 486 public static org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo parseDelimitedFrom( 487 java.io.InputStream input, 488 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 489 throws java.io.IOException { 490 return PARSER.parseDelimitedFrom(input, extensionRegistry); 491 } 492 public static org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo parseFrom( 493 com.google.protobuf.CodedInputStream input) 494 throws java.io.IOException { 495 return PARSER.parseFrom(input); 496 } 497 public static org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo parseFrom( 498 com.google.protobuf.CodedInputStream input, 499 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 500 throws java.io.IOException { 501 return PARSER.parseFrom(input, extensionRegistry); 502 } 503 504 public static Builder newBuilder() { return Builder.create(); } 505 public Builder newBuilderForType() { return newBuilder(); } 506 public static Builder newBuilder(org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo prototype) { 507 return newBuilder().mergeFrom(prototype); 508 } 509 public Builder toBuilder() { return newBuilder(this); } 510 511 @java.lang.Override 512 protected Builder newBuilderForType( 513 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 514 Builder builder = new Builder(parent); 515 return builder; 516 } 517 /** 518 * Protobuf type {@code hadoop.hdfs.ActiveNodeInfo} 519 */ 520 public static final class Builder extends 521 com.google.protobuf.GeneratedMessage.Builder<Builder> 522 implements org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfoOrBuilder { 523 public static final com.google.protobuf.Descriptors.Descriptor 524 getDescriptor() { 525 return org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.internal_static_hadoop_hdfs_ActiveNodeInfo_descriptor; 526 } 527 528 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable 529 internalGetFieldAccessorTable() { 530 return org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.internal_static_hadoop_hdfs_ActiveNodeInfo_fieldAccessorTable 531 .ensureFieldAccessorsInitialized( 532 org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo.class, org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo.Builder.class); 533 } 534 535 // Construct using org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo.newBuilder() 536 private Builder() { 537 maybeForceBuilderInitialization(); 538 } 539 540 private Builder( 541 com.google.protobuf.GeneratedMessage.BuilderParent parent) { 542 super(parent); 543 maybeForceBuilderInitialization(); 544 } 545 private void maybeForceBuilderInitialization() { 546 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { 547 } 548 } 549 private static Builder create() { 550 return new Builder(); 551 } 552 553 public Builder clear() { 554 super.clear(); 555 nameserviceId_ = ""; 556 bitField0_ = (bitField0_ & ~0x00000001); 557 namenodeId_ = ""; 558 bitField0_ = (bitField0_ & ~0x00000002); 559 hostname_ = ""; 560 bitField0_ = (bitField0_ & ~0x00000004); 561 port_ = 0; 562 bitField0_ = (bitField0_ & ~0x00000008); 563 zkfcPort_ = 0; 564 bitField0_ = (bitField0_ & ~0x00000010); 565 return this; 566 } 567 568 public Builder clone() { 569 return create().mergeFrom(buildPartial()); 570 } 571 572 public com.google.protobuf.Descriptors.Descriptor 573 getDescriptorForType() { 574 return org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.internal_static_hadoop_hdfs_ActiveNodeInfo_descriptor; 575 } 576 577 public org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo getDefaultInstanceForType() { 578 return org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo.getDefaultInstance(); 579 } 580 581 public org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo build() { 582 org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo result = buildPartial(); 583 if (!result.isInitialized()) { 584 throw newUninitializedMessageException(result); 585 } 586 return result; 587 } 588 589 public org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo buildPartial() { 590 org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo result = new org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo(this); 591 int from_bitField0_ = bitField0_; 592 int to_bitField0_ = 0; 593 if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 594 to_bitField0_ |= 0x00000001; 595 } 596 result.nameserviceId_ = nameserviceId_; 597 if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 598 to_bitField0_ |= 0x00000002; 599 } 600 result.namenodeId_ = namenodeId_; 601 if (((from_bitField0_ & 0x00000004) == 0x00000004)) { 602 to_bitField0_ |= 0x00000004; 603 } 604 result.hostname_ = hostname_; 605 if (((from_bitField0_ & 0x00000008) == 0x00000008)) { 606 to_bitField0_ |= 0x00000008; 607 } 608 result.port_ = port_; 609 if (((from_bitField0_ & 0x00000010) == 0x00000010)) { 610 to_bitField0_ |= 0x00000010; 611 } 612 result.zkfcPort_ = zkfcPort_; 613 result.bitField0_ = to_bitField0_; 614 onBuilt(); 615 return result; 616 } 617 618 public Builder mergeFrom(com.google.protobuf.Message other) { 619 if (other instanceof org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo) { 620 return mergeFrom((org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo)other); 621 } else { 622 super.mergeFrom(other); 623 return this; 624 } 625 } 626 627 public Builder mergeFrom(org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo other) { 628 if (other == org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo.getDefaultInstance()) return this; 629 if (other.hasNameserviceId()) { 630 bitField0_ |= 0x00000001; 631 nameserviceId_ = other.nameserviceId_; 632 onChanged(); 633 } 634 if (other.hasNamenodeId()) { 635 bitField0_ |= 0x00000002; 636 namenodeId_ = other.namenodeId_; 637 onChanged(); 638 } 639 if (other.hasHostname()) { 640 bitField0_ |= 0x00000004; 641 hostname_ = other.hostname_; 642 onChanged(); 643 } 644 if (other.hasPort()) { 645 setPort(other.getPort()); 646 } 647 if (other.hasZkfcPort()) { 648 setZkfcPort(other.getZkfcPort()); 649 } 650 this.mergeUnknownFields(other.getUnknownFields()); 651 return this; 652 } 653 654 public final boolean isInitialized() { 655 if (!hasNameserviceId()) { 656 657 return false; 658 } 659 if (!hasNamenodeId()) { 660 661 return false; 662 } 663 if (!hasHostname()) { 664 665 return false; 666 } 667 if (!hasPort()) { 668 669 return false; 670 } 671 if (!hasZkfcPort()) { 672 673 return false; 674 } 675 return true; 676 } 677 678 public Builder mergeFrom( 679 com.google.protobuf.CodedInputStream input, 680 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 681 throws java.io.IOException { 682 org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo parsedMessage = null; 683 try { 684 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 685 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 686 parsedMessage = (org.apache.hadoop.hdfs.server.namenode.ha.proto.HAZKInfoProtos.ActiveNodeInfo) e.getUnfinishedMessage(); 687 throw e; 688 } finally { 689 if (parsedMessage != null) { 690 mergeFrom(parsedMessage); 691 } 692 } 693 return this; 694 } 695 private int bitField0_; 696 697 // required string nameserviceId = 1; 698 private java.lang.Object nameserviceId_ = ""; 699 /** 700 * <code>required string nameserviceId = 1;</code> 701 */ 702 public boolean hasNameserviceId() { 703 return ((bitField0_ & 0x00000001) == 0x00000001); 704 } 705 /** 706 * <code>required string nameserviceId = 1;</code> 707 */ 708 public java.lang.String getNameserviceId() { 709 java.lang.Object ref = nameserviceId_; 710 if (!(ref instanceof java.lang.String)) { 711 java.lang.String s = ((com.google.protobuf.ByteString) ref) 712 .toStringUtf8(); 713 nameserviceId_ = s; 714 return s; 715 } else { 716 return (java.lang.String) ref; 717 } 718 } 719 /** 720 * <code>required string nameserviceId = 1;</code> 721 */ 722 public com.google.protobuf.ByteString 723 getNameserviceIdBytes() { 724 java.lang.Object ref = nameserviceId_; 725 if (ref instanceof String) { 726 com.google.protobuf.ByteString b = 727 com.google.protobuf.ByteString.copyFromUtf8( 728 (java.lang.String) ref); 729 nameserviceId_ = b; 730 return b; 731 } else { 732 return (com.google.protobuf.ByteString) ref; 733 } 734 } 735 /** 736 * <code>required string nameserviceId = 1;</code> 737 */ 738 public Builder setNameserviceId( 739 java.lang.String value) { 740 if (value == null) { 741 throw new NullPointerException(); 742 } 743 bitField0_ |= 0x00000001; 744 nameserviceId_ = value; 745 onChanged(); 746 return this; 747 } 748 /** 749 * <code>required string nameserviceId = 1;</code> 750 */ 751 public Builder clearNameserviceId() { 752 bitField0_ = (bitField0_ & ~0x00000001); 753 nameserviceId_ = getDefaultInstance().getNameserviceId(); 754 onChanged(); 755 return this; 756 } 757 /** 758 * <code>required string nameserviceId = 1;</code> 759 */ 760 public Builder setNameserviceIdBytes( 761 com.google.protobuf.ByteString value) { 762 if (value == null) { 763 throw new NullPointerException(); 764 } 765 bitField0_ |= 0x00000001; 766 nameserviceId_ = value; 767 onChanged(); 768 return this; 769 } 770 771 // required string namenodeId = 2; 772 private java.lang.Object namenodeId_ = ""; 773 /** 774 * <code>required string namenodeId = 2;</code> 775 */ 776 public boolean hasNamenodeId() { 777 return ((bitField0_ & 0x00000002) == 0x00000002); 778 } 779 /** 780 * <code>required string namenodeId = 2;</code> 781 */ 782 public java.lang.String getNamenodeId() { 783 java.lang.Object ref = namenodeId_; 784 if (!(ref instanceof java.lang.String)) { 785 java.lang.String s = ((com.google.protobuf.ByteString) ref) 786 .toStringUtf8(); 787 namenodeId_ = s; 788 return s; 789 } else { 790 return (java.lang.String) ref; 791 } 792 } 793 /** 794 * <code>required string namenodeId = 2;</code> 795 */ 796 public com.google.protobuf.ByteString 797 getNamenodeIdBytes() { 798 java.lang.Object ref = namenodeId_; 799 if (ref instanceof String) { 800 com.google.protobuf.ByteString b = 801 com.google.protobuf.ByteString.copyFromUtf8( 802 (java.lang.String) ref); 803 namenodeId_ = b; 804 return b; 805 } else { 806 return (com.google.protobuf.ByteString) ref; 807 } 808 } 809 /** 810 * <code>required string namenodeId = 2;</code> 811 */ 812 public Builder setNamenodeId( 813 java.lang.String value) { 814 if (value == null) { 815 throw new NullPointerException(); 816 } 817 bitField0_ |= 0x00000002; 818 namenodeId_ = value; 819 onChanged(); 820 return this; 821 } 822 /** 823 * <code>required string namenodeId = 2;</code> 824 */ 825 public Builder clearNamenodeId() { 826 bitField0_ = (bitField0_ & ~0x00000002); 827 namenodeId_ = getDefaultInstance().getNamenodeId(); 828 onChanged(); 829 return this; 830 } 831 /** 832 * <code>required string namenodeId = 2;</code> 833 */ 834 public Builder setNamenodeIdBytes( 835 com.google.protobuf.ByteString value) { 836 if (value == null) { 837 throw new NullPointerException(); 838 } 839 bitField0_ |= 0x00000002; 840 namenodeId_ = value; 841 onChanged(); 842 return this; 843 } 844 845 // required string hostname = 3; 846 private java.lang.Object hostname_ = ""; 847 /** 848 * <code>required string hostname = 3;</code> 849 */ 850 public boolean hasHostname() { 851 return ((bitField0_ & 0x00000004) == 0x00000004); 852 } 853 /** 854 * <code>required string hostname = 3;</code> 855 */ 856 public java.lang.String getHostname() { 857 java.lang.Object ref = hostname_; 858 if (!(ref instanceof java.lang.String)) { 859 java.lang.String s = ((com.google.protobuf.ByteString) ref) 860 .toStringUtf8(); 861 hostname_ = s; 862 return s; 863 } else { 864 return (java.lang.String) ref; 865 } 866 } 867 /** 868 * <code>required string hostname = 3;</code> 869 */ 870 public com.google.protobuf.ByteString 871 getHostnameBytes() { 872 java.lang.Object ref = hostname_; 873 if (ref instanceof String) { 874 com.google.protobuf.ByteString b = 875 com.google.protobuf.ByteString.copyFromUtf8( 876 (java.lang.String) ref); 877 hostname_ = b; 878 return b; 879 } else { 880 return (com.google.protobuf.ByteString) ref; 881 } 882 } 883 /** 884 * <code>required string hostname = 3;</code> 885 */ 886 public Builder setHostname( 887 java.lang.String value) { 888 if (value == null) { 889 throw new NullPointerException(); 890 } 891 bitField0_ |= 0x00000004; 892 hostname_ = value; 893 onChanged(); 894 return this; 895 } 896 /** 897 * <code>required string hostname = 3;</code> 898 */ 899 public Builder clearHostname() { 900 bitField0_ = (bitField0_ & ~0x00000004); 901 hostname_ = getDefaultInstance().getHostname(); 902 onChanged(); 903 return this; 904 } 905 /** 906 * <code>required string hostname = 3;</code> 907 */ 908 public Builder setHostnameBytes( 909 com.google.protobuf.ByteString value) { 910 if (value == null) { 911 throw new NullPointerException(); 912 } 913 bitField0_ |= 0x00000004; 914 hostname_ = value; 915 onChanged(); 916 return this; 917 } 918 919 // required int32 port = 4; 920 private int port_ ; 921 /** 922 * <code>required int32 port = 4;</code> 923 */ 924 public boolean hasPort() { 925 return ((bitField0_ & 0x00000008) == 0x00000008); 926 } 927 /** 928 * <code>required int32 port = 4;</code> 929 */ 930 public int getPort() { 931 return port_; 932 } 933 /** 934 * <code>required int32 port = 4;</code> 935 */ 936 public Builder setPort(int value) { 937 bitField0_ |= 0x00000008; 938 port_ = value; 939 onChanged(); 940 return this; 941 } 942 /** 943 * <code>required int32 port = 4;</code> 944 */ 945 public Builder clearPort() { 946 bitField0_ = (bitField0_ & ~0x00000008); 947 port_ = 0; 948 onChanged(); 949 return this; 950 } 951 952 // required int32 zkfcPort = 5; 953 private int zkfcPort_ ; 954 /** 955 * <code>required int32 zkfcPort = 5;</code> 956 */ 957 public boolean hasZkfcPort() { 958 return ((bitField0_ & 0x00000010) == 0x00000010); 959 } 960 /** 961 * <code>required int32 zkfcPort = 5;</code> 962 */ 963 public int getZkfcPort() { 964 return zkfcPort_; 965 } 966 /** 967 * <code>required int32 zkfcPort = 5;</code> 968 */ 969 public Builder setZkfcPort(int value) { 970 bitField0_ |= 0x00000010; 971 zkfcPort_ = value; 972 onChanged(); 973 return this; 974 } 975 /** 976 * <code>required int32 zkfcPort = 5;</code> 977 */ 978 public Builder clearZkfcPort() { 979 bitField0_ = (bitField0_ & ~0x00000010); 980 zkfcPort_ = 0; 981 onChanged(); 982 return this; 983 } 984 985 // @@protoc_insertion_point(builder_scope:hadoop.hdfs.ActiveNodeInfo) 986 } 987 988 static { 989 defaultInstance = new ActiveNodeInfo(true); 990 defaultInstance.initFields(); 991 } 992 993 // @@protoc_insertion_point(class_scope:hadoop.hdfs.ActiveNodeInfo) 994 } 995 996 private static com.google.protobuf.Descriptors.Descriptor 997 internal_static_hadoop_hdfs_ActiveNodeInfo_descriptor; 998 private static 999 com.google.protobuf.GeneratedMessage.FieldAccessorTable 1000 internal_static_hadoop_hdfs_ActiveNodeInfo_fieldAccessorTable; 1001 1002 public static com.google.protobuf.Descriptors.FileDescriptor 1003 getDescriptor() { 1004 return descriptor; 1005 } 1006 private static com.google.protobuf.Descriptors.FileDescriptor 1007 descriptor; 1008 static { 1009 java.lang.String[] descriptorData = { 1010 "\n\016HAZKInfo.proto\022\013hadoop.hdfs\"m\n\016ActiveN" + 1011 "odeInfo\022\025\n\rnameserviceId\030\001 \002(\t\022\022\n\nnameno" + 1012 "deId\030\002 \002(\t\022\020\n\010hostname\030\003 \002(\t\022\014\n\004port\030\004 \002" + 1013 "(\005\022\020\n\010zkfcPort\030\005 \002(\005BA\n/org.apache.hadoo" + 1014 "p.hdfs.server.namenode.ha.protoB\016HAZKInf" + 1015 "oProtos" 1016 }; 1017 com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 1018 new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { 1019 public com.google.protobuf.ExtensionRegistry assignDescriptors( 1020 com.google.protobuf.Descriptors.FileDescriptor root) { 1021 descriptor = root; 1022 internal_static_hadoop_hdfs_ActiveNodeInfo_descriptor = 1023 getDescriptor().getMessageTypes().get(0); 1024 internal_static_hadoop_hdfs_ActiveNodeInfo_fieldAccessorTable = new 1025 com.google.protobuf.GeneratedMessage.FieldAccessorTable( 1026 internal_static_hadoop_hdfs_ActiveNodeInfo_descriptor, 1027 new java.lang.String[] { "NameserviceId", "NamenodeId", "Hostname", "Port", "ZkfcPort", }); 1028 return null; 1029 } 1030 }; 1031 com.google.protobuf.Descriptors.FileDescriptor 1032 .internalBuildGeneratedFileFrom(descriptorData, 1033 new com.google.protobuf.Descriptors.FileDescriptor[] { 1034 }, assigner); 1035 } 1036 1037 // @@protoc_insertion_point(outer_class_scope) 1038}