diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 7e7be88a298..2bb9a73d46a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -5,6 +5,8 @@ Trunk (unreleased changes) HDFS-395. DFS Scalability: Incremental block reports. (Tomasz Nykiel via hairong) + HDFS-2517. Add protobuf service for JounralProtocol. (suresh) + IMPROVEMENTS HADOOP-7524 Change RPC to allow multiple protocols including multuple diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/proto/HdfsProtos.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/proto/HdfsProtos.java index 829495db810..769794c8615 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/proto/HdfsProtos.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/proto/HdfsProtos.java @@ -1,20 +1,3 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: hdfs.proto @@ -25,6 +8,84 @@ public final class HdfsProtos { public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } + public enum ReplicaState + implements com.google.protobuf.ProtocolMessageEnum { + FINALIZED(0, 0), + RBW(1, 1), + RWR(2, 2), + RUR(3, 3), + TEMPORARY(4, 4), + ; + + public static final int FINALIZED_VALUE = 0; + public static final int RBW_VALUE = 1; + public static final int RWR_VALUE = 2; + public static final int RUR_VALUE = 3; + public static final int TEMPORARY_VALUE = 4; + + + public final int getNumber() { return value; } + + public static ReplicaState valueOf(int value) { + switch (value) { + case 0: return FINALIZED; + case 1: return RBW; + case 2: return RWR; + case 3: return RUR; + case 4: return TEMPORARY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ReplicaState findValueByNumber(int number) { + return ReplicaState.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.getDescriptor().getEnumTypes().get(0); + } + + private static final ReplicaState[] VALUES = { + FINALIZED, RBW, RWR, RUR, TEMPORARY, + }; + + public static ReplicaState valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private ReplicaState(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:ReplicaState) + } + public interface ExtendedBlockProtoOrBuilder extends com.google.protobuf.MessageOrBuilder { @@ -2011,6 +2072,599 @@ public final class HdfsProtos { // @@protoc_insertion_point(class_scope:DatanodeIDProto) } + public interface DatanodeIDsProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .DatanodeIDProto datanodes = 1; + java.util.List + getDatanodesList(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto getDatanodes(int index); + int getDatanodesCount(); + java.util.List + getDatanodesOrBuilderList(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProtoOrBuilder getDatanodesOrBuilder( + int index); + } + public static final class DatanodeIDsProto extends + com.google.protobuf.GeneratedMessage + implements DatanodeIDsProtoOrBuilder { + // Use DatanodeIDsProto.newBuilder() to construct. + private DatanodeIDsProto(Builder builder) { + super(builder); + } + private DatanodeIDsProto(boolean noInit) {} + + private static final DatanodeIDsProto defaultInstance; + public static DatanodeIDsProto getDefaultInstance() { + return defaultInstance; + } + + public DatanodeIDsProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_DatanodeIDsProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_DatanodeIDsProto_fieldAccessorTable; + } + + // repeated .DatanodeIDProto datanodes = 1; + public static final int DATANODES_FIELD_NUMBER = 1; + private java.util.List datanodes_; + public java.util.List getDatanodesList() { + return datanodes_; + } + public java.util.List + getDatanodesOrBuilderList() { + return datanodes_; + } + public int getDatanodesCount() { + return datanodes_.size(); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto getDatanodes(int index) { + return datanodes_.get(index); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProtoOrBuilder getDatanodesOrBuilder( + int index) { + return datanodes_.get(index); + } + + private void initFields() { + datanodes_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getDatanodesCount(); i++) { + if (!getDatanodes(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < datanodes_.size(); i++) { + output.writeMessage(1, datanodes_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < datanodes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, datanodes_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto other = (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto) obj; + + boolean result = true; + result = result && getDatanodesList() + .equals(other.getDatanodesList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (getDatanodesCount() > 0) { + hash = (37 * hash) + DATANODES_FIELD_NUMBER; + hash = (53 * hash) + getDatanodesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_DatanodeIDsProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_DatanodeIDsProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getDatanodesFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (datanodesBuilder_ == null) { + datanodes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + datanodesBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto build() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto result = new org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto(this); + int from_bitField0_ = bitField0_; + if (datanodesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + datanodes_ = java.util.Collections.unmodifiableList(datanodes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.datanodes_ = datanodes_; + } else { + result.datanodes_ = datanodesBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto.getDefaultInstance()) return this; + if (datanodesBuilder_ == null) { + if (!other.datanodes_.isEmpty()) { + if (datanodes_.isEmpty()) { + datanodes_ = other.datanodes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDatanodesIsMutable(); + datanodes_.addAll(other.datanodes_); + } + onChanged(); + } + } else { + if (!other.datanodes_.isEmpty()) { + if (datanodesBuilder_.isEmpty()) { + datanodesBuilder_.dispose(); + datanodesBuilder_ = null; + datanodes_ = other.datanodes_; + bitField0_ = (bitField0_ & ~0x00000001); + datanodesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getDatanodesFieldBuilder() : null; + } else { + datanodesBuilder_.addAllMessages(other.datanodes_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getDatanodesCount(); i++) { + if (!getDatanodes(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder subBuilder = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addDatanodes(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .DatanodeIDProto datanodes = 1; + private java.util.List datanodes_ = + java.util.Collections.emptyList(); + private void ensureDatanodesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + datanodes_ = new java.util.ArrayList(datanodes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProtoOrBuilder> datanodesBuilder_; + + public java.util.List getDatanodesList() { + if (datanodesBuilder_ == null) { + return java.util.Collections.unmodifiableList(datanodes_); + } else { + return datanodesBuilder_.getMessageList(); + } + } + public int getDatanodesCount() { + if (datanodesBuilder_ == null) { + return datanodes_.size(); + } else { + return datanodesBuilder_.getCount(); + } + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto getDatanodes(int index) { + if (datanodesBuilder_ == null) { + return datanodes_.get(index); + } else { + return datanodesBuilder_.getMessage(index); + } + } + public Builder setDatanodes( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto value) { + if (datanodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatanodesIsMutable(); + datanodes_.set(index, value); + onChanged(); + } else { + datanodesBuilder_.setMessage(index, value); + } + return this; + } + public Builder setDatanodes( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder builderForValue) { + if (datanodesBuilder_ == null) { + ensureDatanodesIsMutable(); + datanodes_.set(index, builderForValue.build()); + onChanged(); + } else { + datanodesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addDatanodes(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto value) { + if (datanodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatanodesIsMutable(); + datanodes_.add(value); + onChanged(); + } else { + datanodesBuilder_.addMessage(value); + } + return this; + } + public Builder addDatanodes( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto value) { + if (datanodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatanodesIsMutable(); + datanodes_.add(index, value); + onChanged(); + } else { + datanodesBuilder_.addMessage(index, value); + } + return this; + } + public Builder addDatanodes( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder builderForValue) { + if (datanodesBuilder_ == null) { + ensureDatanodesIsMutable(); + datanodes_.add(builderForValue.build()); + onChanged(); + } else { + datanodesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addDatanodes( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder builderForValue) { + if (datanodesBuilder_ == null) { + ensureDatanodesIsMutable(); + datanodes_.add(index, builderForValue.build()); + onChanged(); + } else { + datanodesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllDatanodes( + java.lang.Iterable values) { + if (datanodesBuilder_ == null) { + ensureDatanodesIsMutable(); + super.addAll(values, datanodes_); + onChanged(); + } else { + datanodesBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearDatanodes() { + if (datanodesBuilder_ == null) { + datanodes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + datanodesBuilder_.clear(); + } + return this; + } + public Builder removeDatanodes(int index) { + if (datanodesBuilder_ == null) { + ensureDatanodesIsMutable(); + datanodes_.remove(index); + onChanged(); + } else { + datanodesBuilder_.remove(index); + } + return this; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder getDatanodesBuilder( + int index) { + return getDatanodesFieldBuilder().getBuilder(index); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProtoOrBuilder getDatanodesOrBuilder( + int index) { + if (datanodesBuilder_ == null) { + return datanodes_.get(index); } else { + return datanodesBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getDatanodesOrBuilderList() { + if (datanodesBuilder_ != null) { + return datanodesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(datanodes_); + } + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder addDatanodesBuilder() { + return getDatanodesFieldBuilder().addBuilder( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.getDefaultInstance()); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder addDatanodesBuilder( + int index) { + return getDatanodesFieldBuilder().addBuilder( + index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.getDefaultInstance()); + } + public java.util.List + getDatanodesBuilderList() { + return getDatanodesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProtoOrBuilder> + getDatanodesFieldBuilder() { + if (datanodesBuilder_ == null) { + datanodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProtoOrBuilder>( + datanodes_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + datanodes_ = null; + } + return datanodesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:DatanodeIDsProto) + } + + static { + defaultInstance = new DatanodeIDsProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:DatanodeIDsProto) + } + public interface DatanodeInfoProtoOrBuilder extends com.google.protobuf.MessageOrBuilder { @@ -10268,6 +10922,9214 @@ public final class HdfsProtos { // @@protoc_insertion_point(class_scope:UpgradeStatusReportProto) } + public interface StorageInfoProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required uint32 layoutVersion = 1; + boolean hasLayoutVersion(); + int getLayoutVersion(); + + // required uint32 namespceID = 2; + boolean hasNamespceID(); + int getNamespceID(); + + // required string clusterID = 3; + boolean hasClusterID(); + String getClusterID(); + + // required uint64 cTime = 4; + boolean hasCTime(); + long getCTime(); + } + public static final class StorageInfoProto extends + com.google.protobuf.GeneratedMessage + implements StorageInfoProtoOrBuilder { + // Use StorageInfoProto.newBuilder() to construct. + private StorageInfoProto(Builder builder) { + super(builder); + } + private StorageInfoProto(boolean noInit) {} + + private static final StorageInfoProto defaultInstance; + public static StorageInfoProto getDefaultInstance() { + return defaultInstance; + } + + public StorageInfoProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_StorageInfoProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_StorageInfoProto_fieldAccessorTable; + } + + private int bitField0_; + // required uint32 layoutVersion = 1; + public static final int LAYOUTVERSION_FIELD_NUMBER = 1; + private int layoutVersion_; + public boolean hasLayoutVersion() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getLayoutVersion() { + return layoutVersion_; + } + + // required uint32 namespceID = 2; + public static final int NAMESPCEID_FIELD_NUMBER = 2; + private int namespceID_; + public boolean hasNamespceID() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getNamespceID() { + return namespceID_; + } + + // required string clusterID = 3; + public static final int CLUSTERID_FIELD_NUMBER = 3; + private java.lang.Object clusterID_; + public boolean hasClusterID() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getClusterID() { + java.lang.Object ref = clusterID_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + clusterID_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getClusterIDBytes() { + java.lang.Object ref = clusterID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + clusterID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required uint64 cTime = 4; + public static final int CTIME_FIELD_NUMBER = 4; + private long cTime_; + public boolean hasCTime() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public long getCTime() { + return cTime_; + } + + private void initFields() { + layoutVersion_ = 0; + namespceID_ = 0; + clusterID_ = ""; + cTime_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasLayoutVersion()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasNamespceID()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasClusterID()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasCTime()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt32(1, layoutVersion_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(2, namespceID_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getClusterIDBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeUInt64(4, cTime_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, layoutVersion_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, namespceID_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getClusterIDBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, cTime_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto other = (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto) obj; + + boolean result = true; + result = result && (hasLayoutVersion() == other.hasLayoutVersion()); + if (hasLayoutVersion()) { + result = result && (getLayoutVersion() + == other.getLayoutVersion()); + } + result = result && (hasNamespceID() == other.hasNamespceID()); + if (hasNamespceID()) { + result = result && (getNamespceID() + == other.getNamespceID()); + } + result = result && (hasClusterID() == other.hasClusterID()); + if (hasClusterID()) { + result = result && getClusterID() + .equals(other.getClusterID()); + } + result = result && (hasCTime() == other.hasCTime()); + if (hasCTime()) { + result = result && (getCTime() + == other.getCTime()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasLayoutVersion()) { + hash = (37 * hash) + LAYOUTVERSION_FIELD_NUMBER; + hash = (53 * hash) + getLayoutVersion(); + } + if (hasNamespceID()) { + hash = (37 * hash) + NAMESPCEID_FIELD_NUMBER; + hash = (53 * hash) + getNamespceID(); + } + if (hasClusterID()) { + hash = (37 * hash) + CLUSTERID_FIELD_NUMBER; + hash = (53 * hash) + getClusterID().hashCode(); + } + if (hasCTime()) { + hash = (37 * hash) + CTIME_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getCTime()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_StorageInfoProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_StorageInfoProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + layoutVersion_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + namespceID_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + clusterID_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + cTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto build() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto result = new org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.layoutVersion_ = layoutVersion_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.namespceID_ = namespceID_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.clusterID_ = clusterID_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.cTime_ = cTime_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDefaultInstance()) return this; + if (other.hasLayoutVersion()) { + setLayoutVersion(other.getLayoutVersion()); + } + if (other.hasNamespceID()) { + setNamespceID(other.getNamespceID()); + } + if (other.hasClusterID()) { + setClusterID(other.getClusterID()); + } + if (other.hasCTime()) { + setCTime(other.getCTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasLayoutVersion()) { + + return false; + } + if (!hasNamespceID()) { + + return false; + } + if (!hasClusterID()) { + + return false; + } + if (!hasCTime()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + layoutVersion_ = input.readUInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + namespceID_ = input.readUInt32(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + clusterID_ = input.readBytes(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + cTime_ = input.readUInt64(); + break; + } + } + } + } + + private int bitField0_; + + // required uint32 layoutVersion = 1; + private int layoutVersion_ ; + public boolean hasLayoutVersion() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getLayoutVersion() { + return layoutVersion_; + } + public Builder setLayoutVersion(int value) { + bitField0_ |= 0x00000001; + layoutVersion_ = value; + onChanged(); + return this; + } + public Builder clearLayoutVersion() { + bitField0_ = (bitField0_ & ~0x00000001); + layoutVersion_ = 0; + onChanged(); + return this; + } + + // required uint32 namespceID = 2; + private int namespceID_ ; + public boolean hasNamespceID() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getNamespceID() { + return namespceID_; + } + public Builder setNamespceID(int value) { + bitField0_ |= 0x00000002; + namespceID_ = value; + onChanged(); + return this; + } + public Builder clearNamespceID() { + bitField0_ = (bitField0_ & ~0x00000002); + namespceID_ = 0; + onChanged(); + return this; + } + + // required string clusterID = 3; + private java.lang.Object clusterID_ = ""; + public boolean hasClusterID() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getClusterID() { + java.lang.Object ref = clusterID_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + clusterID_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setClusterID(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + clusterID_ = value; + onChanged(); + return this; + } + public Builder clearClusterID() { + bitField0_ = (bitField0_ & ~0x00000004); + clusterID_ = getDefaultInstance().getClusterID(); + onChanged(); + return this; + } + void setClusterID(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000004; + clusterID_ = value; + onChanged(); + } + + // required uint64 cTime = 4; + private long cTime_ ; + public boolean hasCTime() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public long getCTime() { + return cTime_; + } + public Builder setCTime(long value) { + bitField0_ |= 0x00000008; + cTime_ = value; + onChanged(); + return this; + } + public Builder clearCTime() { + bitField0_ = (bitField0_ & ~0x00000008); + cTime_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:StorageInfoProto) + } + + static { + defaultInstance = new StorageInfoProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:StorageInfoProto) + } + + public interface NamenodeRegistrationProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string rpcAddress = 1; + boolean hasRpcAddress(); + String getRpcAddress(); + + // required string httpAddress = 2; + boolean hasHttpAddress(); + String getHttpAddress(); + + // required .StorageInfoProto storageInfo = 3; + boolean hasStorageInfo(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto getStorageInfo(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder getStorageInfoOrBuilder(); + + // optional .NamenodeRegistrationProto.NamenodeRoleProto role = 4; + boolean hasRole(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.NamenodeRoleProto getRole(); + } + public static final class NamenodeRegistrationProto extends + com.google.protobuf.GeneratedMessage + implements NamenodeRegistrationProtoOrBuilder { + // Use NamenodeRegistrationProto.newBuilder() to construct. + private NamenodeRegistrationProto(Builder builder) { + super(builder); + } + private NamenodeRegistrationProto(boolean noInit) {} + + private static final NamenodeRegistrationProto defaultInstance; + public static NamenodeRegistrationProto getDefaultInstance() { + return defaultInstance; + } + + public NamenodeRegistrationProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_NamenodeRegistrationProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_NamenodeRegistrationProto_fieldAccessorTable; + } + + public enum NamenodeRoleProto + implements com.google.protobuf.ProtocolMessageEnum { + NAMENODE(0, 1), + BACKUP(1, 2), + CHECKPOINT(2, 3), + ; + + public static final int NAMENODE_VALUE = 1; + public static final int BACKUP_VALUE = 2; + public static final int CHECKPOINT_VALUE = 3; + + + public final int getNumber() { return value; } + + public static NamenodeRoleProto valueOf(int value) { + switch (value) { + case 1: return NAMENODE; + case 2: return BACKUP; + case 3: return CHECKPOINT; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NamenodeRoleProto findValueByNumber(int number) { + return NamenodeRoleProto.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.getDescriptor().getEnumTypes().get(0); + } + + private static final NamenodeRoleProto[] VALUES = { + NAMENODE, BACKUP, CHECKPOINT, + }; + + public static NamenodeRoleProto valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private NamenodeRoleProto(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:NamenodeRegistrationProto.NamenodeRoleProto) + } + + private int bitField0_; + // required string rpcAddress = 1; + public static final int RPCADDRESS_FIELD_NUMBER = 1; + private java.lang.Object rpcAddress_; + public boolean hasRpcAddress() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getRpcAddress() { + java.lang.Object ref = rpcAddress_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + rpcAddress_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getRpcAddressBytes() { + java.lang.Object ref = rpcAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + rpcAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string httpAddress = 2; + public static final int HTTPADDRESS_FIELD_NUMBER = 2; + private java.lang.Object httpAddress_; + public boolean hasHttpAddress() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getHttpAddress() { + java.lang.Object ref = httpAddress_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + httpAddress_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getHttpAddressBytes() { + java.lang.Object ref = httpAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + httpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required .StorageInfoProto storageInfo = 3; + public static final int STORAGEINFO_FIELD_NUMBER = 3; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto storageInfo_; + public boolean hasStorageInfo() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto getStorageInfo() { + return storageInfo_; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder getStorageInfoOrBuilder() { + return storageInfo_; + } + + // optional .NamenodeRegistrationProto.NamenodeRoleProto role = 4; + public static final int ROLE_FIELD_NUMBER = 4; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.NamenodeRoleProto role_; + public boolean hasRole() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.NamenodeRoleProto getRole() { + return role_; + } + + private void initFields() { + rpcAddress_ = ""; + httpAddress_ = ""; + storageInfo_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDefaultInstance(); + role_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.NamenodeRoleProto.NAMENODE; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasRpcAddress()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasHttpAddress()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasStorageInfo()) { + memoizedIsInitialized = 0; + return false; + } + if (!getStorageInfo().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getRpcAddressBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getHttpAddressBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, storageInfo_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeEnum(4, role_.getNumber()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getRpcAddressBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getHttpAddressBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, storageInfo_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, role_.getNumber()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto other = (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto) obj; + + boolean result = true; + result = result && (hasRpcAddress() == other.hasRpcAddress()); + if (hasRpcAddress()) { + result = result && getRpcAddress() + .equals(other.getRpcAddress()); + } + result = result && (hasHttpAddress() == other.hasHttpAddress()); + if (hasHttpAddress()) { + result = result && getHttpAddress() + .equals(other.getHttpAddress()); + } + result = result && (hasStorageInfo() == other.hasStorageInfo()); + if (hasStorageInfo()) { + result = result && getStorageInfo() + .equals(other.getStorageInfo()); + } + result = result && (hasRole() == other.hasRole()); + if (hasRole()) { + result = result && + (getRole() == other.getRole()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasRpcAddress()) { + hash = (37 * hash) + RPCADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getRpcAddress().hashCode(); + } + if (hasHttpAddress()) { + hash = (37 * hash) + HTTPADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getHttpAddress().hashCode(); + } + if (hasStorageInfo()) { + hash = (37 * hash) + STORAGEINFO_FIELD_NUMBER; + hash = (53 * hash) + getStorageInfo().hashCode(); + } + if (hasRole()) { + hash = (37 * hash) + ROLE_FIELD_NUMBER; + hash = (53 * hash) + hashEnum(getRole()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_NamenodeRegistrationProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_NamenodeRegistrationProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getStorageInfoFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + rpcAddress_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + httpAddress_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + if (storageInfoBuilder_ == null) { + storageInfo_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDefaultInstance(); + } else { + storageInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + role_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.NamenodeRoleProto.NAMENODE; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto build() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto result = new org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.rpcAddress_ = rpcAddress_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.httpAddress_ = httpAddress_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (storageInfoBuilder_ == null) { + result.storageInfo_ = storageInfo_; + } else { + result.storageInfo_ = storageInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.role_ = role_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.getDefaultInstance()) return this; + if (other.hasRpcAddress()) { + setRpcAddress(other.getRpcAddress()); + } + if (other.hasHttpAddress()) { + setHttpAddress(other.getHttpAddress()); + } + if (other.hasStorageInfo()) { + mergeStorageInfo(other.getStorageInfo()); + } + if (other.hasRole()) { + setRole(other.getRole()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasRpcAddress()) { + + return false; + } + if (!hasHttpAddress()) { + + return false; + } + if (!hasStorageInfo()) { + + return false; + } + if (!getStorageInfo().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + rpcAddress_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + httpAddress_ = input.readBytes(); + break; + } + case 26: { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder subBuilder = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.newBuilder(); + if (hasStorageInfo()) { + subBuilder.mergeFrom(getStorageInfo()); + } + input.readMessage(subBuilder, extensionRegistry); + setStorageInfo(subBuilder.buildPartial()); + break; + } + case 32: { + int rawValue = input.readEnum(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.NamenodeRoleProto value = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.NamenodeRoleProto.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(4, rawValue); + } else { + bitField0_ |= 0x00000008; + role_ = value; + } + break; + } + } + } + } + + private int bitField0_; + + // required string rpcAddress = 1; + private java.lang.Object rpcAddress_ = ""; + public boolean hasRpcAddress() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getRpcAddress() { + java.lang.Object ref = rpcAddress_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + rpcAddress_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setRpcAddress(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + rpcAddress_ = value; + onChanged(); + return this; + } + public Builder clearRpcAddress() { + bitField0_ = (bitField0_ & ~0x00000001); + rpcAddress_ = getDefaultInstance().getRpcAddress(); + onChanged(); + return this; + } + void setRpcAddress(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + rpcAddress_ = value; + onChanged(); + } + + // required string httpAddress = 2; + private java.lang.Object httpAddress_ = ""; + public boolean hasHttpAddress() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getHttpAddress() { + java.lang.Object ref = httpAddress_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + httpAddress_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setHttpAddress(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + httpAddress_ = value; + onChanged(); + return this; + } + public Builder clearHttpAddress() { + bitField0_ = (bitField0_ & ~0x00000002); + httpAddress_ = getDefaultInstance().getHttpAddress(); + onChanged(); + return this; + } + void setHttpAddress(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + httpAddress_ = value; + onChanged(); + } + + // required .StorageInfoProto storageInfo = 3; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto storageInfo_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder> storageInfoBuilder_; + public boolean hasStorageInfo() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto getStorageInfo() { + if (storageInfoBuilder_ == null) { + return storageInfo_; + } else { + return storageInfoBuilder_.getMessage(); + } + } + public Builder setStorageInfo(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto value) { + if (storageInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + storageInfo_ = value; + onChanged(); + } else { + storageInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setStorageInfo( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder builderForValue) { + if (storageInfoBuilder_ == null) { + storageInfo_ = builderForValue.build(); + onChanged(); + } else { + storageInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeStorageInfo(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto value) { + if (storageInfoBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + storageInfo_ != org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDefaultInstance()) { + storageInfo_ = + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.newBuilder(storageInfo_).mergeFrom(value).buildPartial(); + } else { + storageInfo_ = value; + } + onChanged(); + } else { + storageInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearStorageInfo() { + if (storageInfoBuilder_ == null) { + storageInfo_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDefaultInstance(); + onChanged(); + } else { + storageInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder getStorageInfoBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getStorageInfoFieldBuilder().getBuilder(); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder getStorageInfoOrBuilder() { + if (storageInfoBuilder_ != null) { + return storageInfoBuilder_.getMessageOrBuilder(); + } else { + return storageInfo_; + } + } + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder> + getStorageInfoFieldBuilder() { + if (storageInfoBuilder_ == null) { + storageInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder>( + storageInfo_, + getParentForChildren(), + isClean()); + storageInfo_ = null; + } + return storageInfoBuilder_; + } + + // optional .NamenodeRegistrationProto.NamenodeRoleProto role = 4; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.NamenodeRoleProto role_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.NamenodeRoleProto.NAMENODE; + public boolean hasRole() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.NamenodeRoleProto getRole() { + return role_; + } + public Builder setRole(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.NamenodeRoleProto value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + role_ = value; + onChanged(); + return this; + } + public Builder clearRole() { + bitField0_ = (bitField0_ & ~0x00000008); + role_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.NamenodeRoleProto.NAMENODE; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:NamenodeRegistrationProto) + } + + static { + defaultInstance = new NamenodeRegistrationProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:NamenodeRegistrationProto) + } + + public interface CheckpointSignatureProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string blockPoolId = 1; + boolean hasBlockPoolId(); + String getBlockPoolId(); + + // required uint64 mostRecentCheckpointTxId = 2; + boolean hasMostRecentCheckpointTxId(); + long getMostRecentCheckpointTxId(); + + // required uint64 curSegmentTxId = 3; + boolean hasCurSegmentTxId(); + long getCurSegmentTxId(); + + // required .StorageInfoProto storageInfo = 4; + boolean hasStorageInfo(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto getStorageInfo(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder getStorageInfoOrBuilder(); + } + public static final class CheckpointSignatureProto extends + com.google.protobuf.GeneratedMessage + implements CheckpointSignatureProtoOrBuilder { + // Use CheckpointSignatureProto.newBuilder() to construct. + private CheckpointSignatureProto(Builder builder) { + super(builder); + } + private CheckpointSignatureProto(boolean noInit) {} + + private static final CheckpointSignatureProto defaultInstance; + public static CheckpointSignatureProto getDefaultInstance() { + return defaultInstance; + } + + public CheckpointSignatureProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_CheckpointSignatureProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_CheckpointSignatureProto_fieldAccessorTable; + } + + private int bitField0_; + // required string blockPoolId = 1; + public static final int BLOCKPOOLID_FIELD_NUMBER = 1; + private java.lang.Object blockPoolId_; + public boolean hasBlockPoolId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getBlockPoolId() { + java.lang.Object ref = blockPoolId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + blockPoolId_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getBlockPoolIdBytes() { + java.lang.Object ref = blockPoolId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + blockPoolId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required uint64 mostRecentCheckpointTxId = 2; + public static final int MOSTRECENTCHECKPOINTTXID_FIELD_NUMBER = 2; + private long mostRecentCheckpointTxId_; + public boolean hasMostRecentCheckpointTxId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getMostRecentCheckpointTxId() { + return mostRecentCheckpointTxId_; + } + + // required uint64 curSegmentTxId = 3; + public static final int CURSEGMENTTXID_FIELD_NUMBER = 3; + private long curSegmentTxId_; + public boolean hasCurSegmentTxId() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getCurSegmentTxId() { + return curSegmentTxId_; + } + + // required .StorageInfoProto storageInfo = 4; + public static final int STORAGEINFO_FIELD_NUMBER = 4; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto storageInfo_; + public boolean hasStorageInfo() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto getStorageInfo() { + return storageInfo_; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder getStorageInfoOrBuilder() { + return storageInfo_; + } + + private void initFields() { + blockPoolId_ = ""; + mostRecentCheckpointTxId_ = 0L; + curSegmentTxId_ = 0L; + storageInfo_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasBlockPoolId()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasMostRecentCheckpointTxId()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasCurSegmentTxId()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasStorageInfo()) { + memoizedIsInitialized = 0; + return false; + } + if (!getStorageInfo().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getBlockPoolIdBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt64(2, mostRecentCheckpointTxId_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeUInt64(3, curSegmentTxId_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, storageInfo_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getBlockPoolIdBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, mostRecentCheckpointTxId_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, curSegmentTxId_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, storageInfo_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto other = (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto) obj; + + boolean result = true; + result = result && (hasBlockPoolId() == other.hasBlockPoolId()); + if (hasBlockPoolId()) { + result = result && getBlockPoolId() + .equals(other.getBlockPoolId()); + } + result = result && (hasMostRecentCheckpointTxId() == other.hasMostRecentCheckpointTxId()); + if (hasMostRecentCheckpointTxId()) { + result = result && (getMostRecentCheckpointTxId() + == other.getMostRecentCheckpointTxId()); + } + result = result && (hasCurSegmentTxId() == other.hasCurSegmentTxId()); + if (hasCurSegmentTxId()) { + result = result && (getCurSegmentTxId() + == other.getCurSegmentTxId()); + } + result = result && (hasStorageInfo() == other.hasStorageInfo()); + if (hasStorageInfo()) { + result = result && getStorageInfo() + .equals(other.getStorageInfo()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasBlockPoolId()) { + hash = (37 * hash) + BLOCKPOOLID_FIELD_NUMBER; + hash = (53 * hash) + getBlockPoolId().hashCode(); + } + if (hasMostRecentCheckpointTxId()) { + hash = (37 * hash) + MOSTRECENTCHECKPOINTTXID_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getMostRecentCheckpointTxId()); + } + if (hasCurSegmentTxId()) { + hash = (37 * hash) + CURSEGMENTTXID_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getCurSegmentTxId()); + } + if (hasStorageInfo()) { + hash = (37 * hash) + STORAGEINFO_FIELD_NUMBER; + hash = (53 * hash) + getStorageInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_CheckpointSignatureProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_CheckpointSignatureProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getStorageInfoFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + blockPoolId_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + mostRecentCheckpointTxId_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + curSegmentTxId_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); + if (storageInfoBuilder_ == null) { + storageInfo_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDefaultInstance(); + } else { + storageInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto build() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto result = new org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.blockPoolId_ = blockPoolId_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.mostRecentCheckpointTxId_ = mostRecentCheckpointTxId_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.curSegmentTxId_ = curSegmentTxId_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (storageInfoBuilder_ == null) { + result.storageInfo_ = storageInfo_; + } else { + result.storageInfo_ = storageInfoBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.getDefaultInstance()) return this; + if (other.hasBlockPoolId()) { + setBlockPoolId(other.getBlockPoolId()); + } + if (other.hasMostRecentCheckpointTxId()) { + setMostRecentCheckpointTxId(other.getMostRecentCheckpointTxId()); + } + if (other.hasCurSegmentTxId()) { + setCurSegmentTxId(other.getCurSegmentTxId()); + } + if (other.hasStorageInfo()) { + mergeStorageInfo(other.getStorageInfo()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasBlockPoolId()) { + + return false; + } + if (!hasMostRecentCheckpointTxId()) { + + return false; + } + if (!hasCurSegmentTxId()) { + + return false; + } + if (!hasStorageInfo()) { + + return false; + } + if (!getStorageInfo().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + blockPoolId_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + mostRecentCheckpointTxId_ = input.readUInt64(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + curSegmentTxId_ = input.readUInt64(); + break; + } + case 34: { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder subBuilder = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.newBuilder(); + if (hasStorageInfo()) { + subBuilder.mergeFrom(getStorageInfo()); + } + input.readMessage(subBuilder, extensionRegistry); + setStorageInfo(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // required string blockPoolId = 1; + private java.lang.Object blockPoolId_ = ""; + public boolean hasBlockPoolId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getBlockPoolId() { + java.lang.Object ref = blockPoolId_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + blockPoolId_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setBlockPoolId(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + blockPoolId_ = value; + onChanged(); + return this; + } + public Builder clearBlockPoolId() { + bitField0_ = (bitField0_ & ~0x00000001); + blockPoolId_ = getDefaultInstance().getBlockPoolId(); + onChanged(); + return this; + } + void setBlockPoolId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + blockPoolId_ = value; + onChanged(); + } + + // required uint64 mostRecentCheckpointTxId = 2; + private long mostRecentCheckpointTxId_ ; + public boolean hasMostRecentCheckpointTxId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getMostRecentCheckpointTxId() { + return mostRecentCheckpointTxId_; + } + public Builder setMostRecentCheckpointTxId(long value) { + bitField0_ |= 0x00000002; + mostRecentCheckpointTxId_ = value; + onChanged(); + return this; + } + public Builder clearMostRecentCheckpointTxId() { + bitField0_ = (bitField0_ & ~0x00000002); + mostRecentCheckpointTxId_ = 0L; + onChanged(); + return this; + } + + // required uint64 curSegmentTxId = 3; + private long curSegmentTxId_ ; + public boolean hasCurSegmentTxId() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getCurSegmentTxId() { + return curSegmentTxId_; + } + public Builder setCurSegmentTxId(long value) { + bitField0_ |= 0x00000004; + curSegmentTxId_ = value; + onChanged(); + return this; + } + public Builder clearCurSegmentTxId() { + bitField0_ = (bitField0_ & ~0x00000004); + curSegmentTxId_ = 0L; + onChanged(); + return this; + } + + // required .StorageInfoProto storageInfo = 4; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto storageInfo_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder> storageInfoBuilder_; + public boolean hasStorageInfo() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto getStorageInfo() { + if (storageInfoBuilder_ == null) { + return storageInfo_; + } else { + return storageInfoBuilder_.getMessage(); + } + } + public Builder setStorageInfo(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto value) { + if (storageInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + storageInfo_ = value; + onChanged(); + } else { + storageInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setStorageInfo( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder builderForValue) { + if (storageInfoBuilder_ == null) { + storageInfo_ = builderForValue.build(); + onChanged(); + } else { + storageInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeStorageInfo(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto value) { + if (storageInfoBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + storageInfo_ != org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDefaultInstance()) { + storageInfo_ = + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.newBuilder(storageInfo_).mergeFrom(value).buildPartial(); + } else { + storageInfo_ = value; + } + onChanged(); + } else { + storageInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearStorageInfo() { + if (storageInfoBuilder_ == null) { + storageInfo_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDefaultInstance(); + onChanged(); + } else { + storageInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder getStorageInfoBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getStorageInfoFieldBuilder().getBuilder(); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder getStorageInfoOrBuilder() { + if (storageInfoBuilder_ != null) { + return storageInfoBuilder_.getMessageOrBuilder(); + } else { + return storageInfo_; + } + } + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder> + getStorageInfoFieldBuilder() { + if (storageInfoBuilder_ == null) { + storageInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder>( + storageInfo_, + getParentForChildren(), + isClean()); + storageInfo_ = null; + } + return storageInfoBuilder_; + } + + // @@protoc_insertion_point(builder_scope:CheckpointSignatureProto) + } + + static { + defaultInstance = new CheckpointSignatureProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:CheckpointSignatureProto) + } + + public interface NamenodeCommandProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required uint32 action = 1; + boolean hasAction(); + int getAction(); + + // required .NamenodeCommandProto.Type type = 2; + boolean hasType(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.Type getType(); + + // optional .CheckpointCommandProto checkpointCmd = 3; + boolean hasCheckpointCmd(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto getCheckpointCmd(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProtoOrBuilder getCheckpointCmdOrBuilder(); + } + public static final class NamenodeCommandProto extends + com.google.protobuf.GeneratedMessage + implements NamenodeCommandProtoOrBuilder { + // Use NamenodeCommandProto.newBuilder() to construct. + private NamenodeCommandProto(Builder builder) { + super(builder); + } + private NamenodeCommandProto(boolean noInit) {} + + private static final NamenodeCommandProto defaultInstance; + public static NamenodeCommandProto getDefaultInstance() { + return defaultInstance; + } + + public NamenodeCommandProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_NamenodeCommandProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_NamenodeCommandProto_fieldAccessorTable; + } + + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + NamenodeCommand(0, 0), + CheckPointCommand(1, 1), + ; + + public static final int NamenodeCommand_VALUE = 0; + public static final int CheckPointCommand_VALUE = 1; + + + public final int getNumber() { return value; } + + public static Type valueOf(int value) { + switch (value) { + case 0: return NamenodeCommand; + case 1: return CheckPointCommand; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = { + NamenodeCommand, CheckPointCommand, + }; + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private Type(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:NamenodeCommandProto.Type) + } + + private int bitField0_; + // required uint32 action = 1; + public static final int ACTION_FIELD_NUMBER = 1; + private int action_; + public boolean hasAction() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getAction() { + return action_; + } + + // required .NamenodeCommandProto.Type type = 2; + public static final int TYPE_FIELD_NUMBER = 2; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.Type type_; + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.Type getType() { + return type_; + } + + // optional .CheckpointCommandProto checkpointCmd = 3; + public static final int CHECKPOINTCMD_FIELD_NUMBER = 3; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto checkpointCmd_; + public boolean hasCheckpointCmd() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto getCheckpointCmd() { + return checkpointCmd_; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProtoOrBuilder getCheckpointCmdOrBuilder() { + return checkpointCmd_; + } + + private void initFields() { + action_ = 0; + type_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.Type.NamenodeCommand; + checkpointCmd_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasAction()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasType()) { + memoizedIsInitialized = 0; + return false; + } + if (hasCheckpointCmd()) { + if (!getCheckpointCmd().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt32(1, action_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, type_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, checkpointCmd_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, action_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, type_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, checkpointCmd_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto other = (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto) obj; + + boolean result = true; + result = result && (hasAction() == other.hasAction()); + if (hasAction()) { + result = result && (getAction() + == other.getAction()); + } + result = result && (hasType() == other.hasType()); + if (hasType()) { + result = result && + (getType() == other.getType()); + } + result = result && (hasCheckpointCmd() == other.hasCheckpointCmd()); + if (hasCheckpointCmd()) { + result = result && getCheckpointCmd() + .equals(other.getCheckpointCmd()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasAction()) { + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction(); + } + if (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + hashEnum(getType()); + } + if (hasCheckpointCmd()) { + hash = (37 * hash) + CHECKPOINTCMD_FIELD_NUMBER; + hash = (53 * hash) + getCheckpointCmd().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_NamenodeCommandProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_NamenodeCommandProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getCheckpointCmdFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + action_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + type_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.Type.NamenodeCommand; + bitField0_ = (bitField0_ & ~0x00000002); + if (checkpointCmdBuilder_ == null) { + checkpointCmd_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.getDefaultInstance(); + } else { + checkpointCmdBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto build() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto result = new org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.action_ = action_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (checkpointCmdBuilder_ == null) { + result.checkpointCmd_ = checkpointCmd_; + } else { + result.checkpointCmd_ = checkpointCmdBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.getDefaultInstance()) return this; + if (other.hasAction()) { + setAction(other.getAction()); + } + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasCheckpointCmd()) { + mergeCheckpointCmd(other.getCheckpointCmd()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasAction()) { + + return false; + } + if (!hasType()) { + + return false; + } + if (hasCheckpointCmd()) { + if (!getCheckpointCmd().isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + action_ = input.readUInt32(); + break; + } + case 16: { + int rawValue = input.readEnum(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.Type value = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + type_ = value; + } + break; + } + case 26: { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.Builder subBuilder = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.newBuilder(); + if (hasCheckpointCmd()) { + subBuilder.mergeFrom(getCheckpointCmd()); + } + input.readMessage(subBuilder, extensionRegistry); + setCheckpointCmd(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // required uint32 action = 1; + private int action_ ; + public boolean hasAction() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getAction() { + return action_; + } + public Builder setAction(int value) { + bitField0_ |= 0x00000001; + action_ = value; + onChanged(); + return this; + } + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000001); + action_ = 0; + onChanged(); + return this; + } + + // required .NamenodeCommandProto.Type type = 2; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.Type type_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.Type.NamenodeCommand; + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.Type getType() { + return type_; + } + public Builder setType(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + type_ = value; + onChanged(); + return this; + } + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.Type.NamenodeCommand; + onChanged(); + return this; + } + + // optional .CheckpointCommandProto checkpointCmd = 3; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto checkpointCmd_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProtoOrBuilder> checkpointCmdBuilder_; + public boolean hasCheckpointCmd() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto getCheckpointCmd() { + if (checkpointCmdBuilder_ == null) { + return checkpointCmd_; + } else { + return checkpointCmdBuilder_.getMessage(); + } + } + public Builder setCheckpointCmd(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto value) { + if (checkpointCmdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + checkpointCmd_ = value; + onChanged(); + } else { + checkpointCmdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setCheckpointCmd( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.Builder builderForValue) { + if (checkpointCmdBuilder_ == null) { + checkpointCmd_ = builderForValue.build(); + onChanged(); + } else { + checkpointCmdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeCheckpointCmd(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto value) { + if (checkpointCmdBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + checkpointCmd_ != org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.getDefaultInstance()) { + checkpointCmd_ = + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.newBuilder(checkpointCmd_).mergeFrom(value).buildPartial(); + } else { + checkpointCmd_ = value; + } + onChanged(); + } else { + checkpointCmdBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearCheckpointCmd() { + if (checkpointCmdBuilder_ == null) { + checkpointCmd_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.getDefaultInstance(); + onChanged(); + } else { + checkpointCmdBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.Builder getCheckpointCmdBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCheckpointCmdFieldBuilder().getBuilder(); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProtoOrBuilder getCheckpointCmdOrBuilder() { + if (checkpointCmdBuilder_ != null) { + return checkpointCmdBuilder_.getMessageOrBuilder(); + } else { + return checkpointCmd_; + } + } + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProtoOrBuilder> + getCheckpointCmdFieldBuilder() { + if (checkpointCmdBuilder_ == null) { + checkpointCmdBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProtoOrBuilder>( + checkpointCmd_, + getParentForChildren(), + isClean()); + checkpointCmd_ = null; + } + return checkpointCmdBuilder_; + } + + // @@protoc_insertion_point(builder_scope:NamenodeCommandProto) + } + + static { + defaultInstance = new NamenodeCommandProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:NamenodeCommandProto) + } + + public interface CheckpointCommandProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .CheckpointSignatureProto signature = 1; + boolean hasSignature(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto getSignature(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProtoOrBuilder getSignatureOrBuilder(); + + // required bool needToReturnImage = 2; + boolean hasNeedToReturnImage(); + boolean getNeedToReturnImage(); + } + public static final class CheckpointCommandProto extends + com.google.protobuf.GeneratedMessage + implements CheckpointCommandProtoOrBuilder { + // Use CheckpointCommandProto.newBuilder() to construct. + private CheckpointCommandProto(Builder builder) { + super(builder); + } + private CheckpointCommandProto(boolean noInit) {} + + private static final CheckpointCommandProto defaultInstance; + public static CheckpointCommandProto getDefaultInstance() { + return defaultInstance; + } + + public CheckpointCommandProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_CheckpointCommandProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_CheckpointCommandProto_fieldAccessorTable; + } + + private int bitField0_; + // required .CheckpointSignatureProto signature = 1; + public static final int SIGNATURE_FIELD_NUMBER = 1; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto signature_; + public boolean hasSignature() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto getSignature() { + return signature_; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProtoOrBuilder getSignatureOrBuilder() { + return signature_; + } + + // required bool needToReturnImage = 2; + public static final int NEEDTORETURNIMAGE_FIELD_NUMBER = 2; + private boolean needToReturnImage_; + public boolean hasNeedToReturnImage() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public boolean getNeedToReturnImage() { + return needToReturnImage_; + } + + private void initFields() { + signature_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.getDefaultInstance(); + needToReturnImage_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasSignature()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasNeedToReturnImage()) { + memoizedIsInitialized = 0; + return false; + } + if (!getSignature().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, signature_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(2, needToReturnImage_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, signature_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, needToReturnImage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto other = (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto) obj; + + boolean result = true; + result = result && (hasSignature() == other.hasSignature()); + if (hasSignature()) { + result = result && getSignature() + .equals(other.getSignature()); + } + result = result && (hasNeedToReturnImage() == other.hasNeedToReturnImage()); + if (hasNeedToReturnImage()) { + result = result && (getNeedToReturnImage() + == other.getNeedToReturnImage()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasSignature()) { + hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getSignature().hashCode(); + } + if (hasNeedToReturnImage()) { + hash = (37 * hash) + NEEDTORETURNIMAGE_FIELD_NUMBER; + hash = (53 * hash) + hashBoolean(getNeedToReturnImage()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_CheckpointCommandProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_CheckpointCommandProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSignatureFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (signatureBuilder_ == null) { + signature_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.getDefaultInstance(); + } else { + signatureBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + needToReturnImage_ = false; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto build() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto result = new org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (signatureBuilder_ == null) { + result.signature_ = signature_; + } else { + result.signature_ = signatureBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.needToReturnImage_ = needToReturnImage_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.getDefaultInstance()) return this; + if (other.hasSignature()) { + mergeSignature(other.getSignature()); + } + if (other.hasNeedToReturnImage()) { + setNeedToReturnImage(other.getNeedToReturnImage()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasSignature()) { + + return false; + } + if (!hasNeedToReturnImage()) { + + return false; + } + if (!getSignature().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.Builder subBuilder = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.newBuilder(); + if (hasSignature()) { + subBuilder.mergeFrom(getSignature()); + } + input.readMessage(subBuilder, extensionRegistry); + setSignature(subBuilder.buildPartial()); + break; + } + case 16: { + bitField0_ |= 0x00000002; + needToReturnImage_ = input.readBool(); + break; + } + } + } + } + + private int bitField0_; + + // required .CheckpointSignatureProto signature = 1; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto signature_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProtoOrBuilder> signatureBuilder_; + public boolean hasSignature() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto getSignature() { + if (signatureBuilder_ == null) { + return signature_; + } else { + return signatureBuilder_.getMessage(); + } + } + public Builder setSignature(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto value) { + if (signatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + signature_ = value; + onChanged(); + } else { + signatureBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setSignature( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.Builder builderForValue) { + if (signatureBuilder_ == null) { + signature_ = builderForValue.build(); + onChanged(); + } else { + signatureBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeSignature(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto value) { + if (signatureBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + signature_ != org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.getDefaultInstance()) { + signature_ = + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.newBuilder(signature_).mergeFrom(value).buildPartial(); + } else { + signature_ = value; + } + onChanged(); + } else { + signatureBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearSignature() { + if (signatureBuilder_ == null) { + signature_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.getDefaultInstance(); + onChanged(); + } else { + signatureBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.Builder getSignatureBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSignatureFieldBuilder().getBuilder(); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProtoOrBuilder getSignatureOrBuilder() { + if (signatureBuilder_ != null) { + return signatureBuilder_.getMessageOrBuilder(); + } else { + return signature_; + } + } + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProtoOrBuilder> + getSignatureFieldBuilder() { + if (signatureBuilder_ == null) { + signatureBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProtoOrBuilder>( + signature_, + getParentForChildren(), + isClean()); + signature_ = null; + } + return signatureBuilder_; + } + + // required bool needToReturnImage = 2; + private boolean needToReturnImage_ ; + public boolean hasNeedToReturnImage() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public boolean getNeedToReturnImage() { + return needToReturnImage_; + } + public Builder setNeedToReturnImage(boolean value) { + bitField0_ |= 0x00000002; + needToReturnImage_ = value; + onChanged(); + return this; + } + public Builder clearNeedToReturnImage() { + bitField0_ = (bitField0_ & ~0x00000002); + needToReturnImage_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:CheckpointCommandProto) + } + + static { + defaultInstance = new CheckpointCommandProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:CheckpointCommandProto) + } + + public interface BlockProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required uint64 blockId = 1; + boolean hasBlockId(); + long getBlockId(); + + // required uint64 genStamp = 2; + boolean hasGenStamp(); + long getGenStamp(); + + // optional uint64 numBytes = 3; + boolean hasNumBytes(); + long getNumBytes(); + } + public static final class BlockProto extends + com.google.protobuf.GeneratedMessage + implements BlockProtoOrBuilder { + // Use BlockProto.newBuilder() to construct. + private BlockProto(Builder builder) { + super(builder); + } + private BlockProto(boolean noInit) {} + + private static final BlockProto defaultInstance; + public static BlockProto getDefaultInstance() { + return defaultInstance; + } + + public BlockProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_BlockProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_BlockProto_fieldAccessorTable; + } + + private int bitField0_; + // required uint64 blockId = 1; + public static final int BLOCKID_FIELD_NUMBER = 1; + private long blockId_; + public boolean hasBlockId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getBlockId() { + return blockId_; + } + + // required uint64 genStamp = 2; + public static final int GENSTAMP_FIELD_NUMBER = 2; + private long genStamp_; + public boolean hasGenStamp() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getGenStamp() { + return genStamp_; + } + + // optional uint64 numBytes = 3; + public static final int NUMBYTES_FIELD_NUMBER = 3; + private long numBytes_; + public boolean hasNumBytes() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getNumBytes() { + return numBytes_; + } + + private void initFields() { + blockId_ = 0L; + genStamp_ = 0L; + numBytes_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasBlockId()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasGenStamp()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt64(1, blockId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt64(2, genStamp_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeUInt64(3, numBytes_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, blockId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, genStamp_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, numBytes_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto other = (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto) obj; + + boolean result = true; + result = result && (hasBlockId() == other.hasBlockId()); + if (hasBlockId()) { + result = result && (getBlockId() + == other.getBlockId()); + } + result = result && (hasGenStamp() == other.hasGenStamp()); + if (hasGenStamp()) { + result = result && (getGenStamp() + == other.getGenStamp()); + } + result = result && (hasNumBytes() == other.hasNumBytes()); + if (hasNumBytes()) { + result = result && (getNumBytes() + == other.getNumBytes()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasBlockId()) { + hash = (37 * hash) + BLOCKID_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getBlockId()); + } + if (hasGenStamp()) { + hash = (37 * hash) + GENSTAMP_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getGenStamp()); + } + if (hasNumBytes()) { + hash = (37 * hash) + NUMBYTES_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getNumBytes()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_BlockProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_BlockProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + blockId_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + genStamp_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + numBytes_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto build() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto result = new org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.blockId_ = blockId_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.genStamp_ = genStamp_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.numBytes_ = numBytes_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.getDefaultInstance()) return this; + if (other.hasBlockId()) { + setBlockId(other.getBlockId()); + } + if (other.hasGenStamp()) { + setGenStamp(other.getGenStamp()); + } + if (other.hasNumBytes()) { + setNumBytes(other.getNumBytes()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasBlockId()) { + + return false; + } + if (!hasGenStamp()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + blockId_ = input.readUInt64(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + genStamp_ = input.readUInt64(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + numBytes_ = input.readUInt64(); + break; + } + } + } + } + + private int bitField0_; + + // required uint64 blockId = 1; + private long blockId_ ; + public boolean hasBlockId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getBlockId() { + return blockId_; + } + public Builder setBlockId(long value) { + bitField0_ |= 0x00000001; + blockId_ = value; + onChanged(); + return this; + } + public Builder clearBlockId() { + bitField0_ = (bitField0_ & ~0x00000001); + blockId_ = 0L; + onChanged(); + return this; + } + + // required uint64 genStamp = 2; + private long genStamp_ ; + public boolean hasGenStamp() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getGenStamp() { + return genStamp_; + } + public Builder setGenStamp(long value) { + bitField0_ |= 0x00000002; + genStamp_ = value; + onChanged(); + return this; + } + public Builder clearGenStamp() { + bitField0_ = (bitField0_ & ~0x00000002); + genStamp_ = 0L; + onChanged(); + return this; + } + + // optional uint64 numBytes = 3; + private long numBytes_ ; + public boolean hasNumBytes() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getNumBytes() { + return numBytes_; + } + public Builder setNumBytes(long value) { + bitField0_ |= 0x00000004; + numBytes_ = value; + onChanged(); + return this; + } + public Builder clearNumBytes() { + bitField0_ = (bitField0_ & ~0x00000004); + numBytes_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:BlockProto) + } + + static { + defaultInstance = new BlockProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:BlockProto) + } + + public interface BlockWithLocationsProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .BlockProto block = 1; + boolean hasBlock(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto getBlock(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProtoOrBuilder getBlockOrBuilder(); + + // repeated .DatanodeIDProto datanodeIDs = 2; + java.util.List + getDatanodeIDsList(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto getDatanodeIDs(int index); + int getDatanodeIDsCount(); + java.util.List + getDatanodeIDsOrBuilderList(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProtoOrBuilder getDatanodeIDsOrBuilder( + int index); + } + public static final class BlockWithLocationsProto extends + com.google.protobuf.GeneratedMessage + implements BlockWithLocationsProtoOrBuilder { + // Use BlockWithLocationsProto.newBuilder() to construct. + private BlockWithLocationsProto(Builder builder) { + super(builder); + } + private BlockWithLocationsProto(boolean noInit) {} + + private static final BlockWithLocationsProto defaultInstance; + public static BlockWithLocationsProto getDefaultInstance() { + return defaultInstance; + } + + public BlockWithLocationsProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_BlockWithLocationsProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_BlockWithLocationsProto_fieldAccessorTable; + } + + private int bitField0_; + // required .BlockProto block = 1; + public static final int BLOCK_FIELD_NUMBER = 1; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto block_; + public boolean hasBlock() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto getBlock() { + return block_; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProtoOrBuilder getBlockOrBuilder() { + return block_; + } + + // repeated .DatanodeIDProto datanodeIDs = 2; + public static final int DATANODEIDS_FIELD_NUMBER = 2; + private java.util.List datanodeIDs_; + public java.util.List getDatanodeIDsList() { + return datanodeIDs_; + } + public java.util.List + getDatanodeIDsOrBuilderList() { + return datanodeIDs_; + } + public int getDatanodeIDsCount() { + return datanodeIDs_.size(); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto getDatanodeIDs(int index) { + return datanodeIDs_.get(index); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProtoOrBuilder getDatanodeIDsOrBuilder( + int index) { + return datanodeIDs_.get(index); + } + + private void initFields() { + block_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.getDefaultInstance(); + datanodeIDs_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasBlock()) { + memoizedIsInitialized = 0; + return false; + } + if (!getBlock().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getDatanodeIDsCount(); i++) { + if (!getDatanodeIDs(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, block_); + } + for (int i = 0; i < datanodeIDs_.size(); i++) { + output.writeMessage(2, datanodeIDs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, block_); + } + for (int i = 0; i < datanodeIDs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, datanodeIDs_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto other = (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto) obj; + + boolean result = true; + result = result && (hasBlock() == other.hasBlock()); + if (hasBlock()) { + result = result && getBlock() + .equals(other.getBlock()); + } + result = result && getDatanodeIDsList() + .equals(other.getDatanodeIDsList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasBlock()) { + hash = (37 * hash) + BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getBlock().hashCode(); + } + if (getDatanodeIDsCount() > 0) { + hash = (37 * hash) + DATANODEIDS_FIELD_NUMBER; + hash = (53 * hash) + getDatanodeIDsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_BlockWithLocationsProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_BlockWithLocationsProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getBlockFieldBuilder(); + getDatanodeIDsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (blockBuilder_ == null) { + block_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.getDefaultInstance(); + } else { + blockBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (datanodeIDsBuilder_ == null) { + datanodeIDs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + datanodeIDsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto build() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto result = new org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (blockBuilder_ == null) { + result.block_ = block_; + } else { + result.block_ = blockBuilder_.build(); + } + if (datanodeIDsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + datanodeIDs_ = java.util.Collections.unmodifiableList(datanodeIDs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.datanodeIDs_ = datanodeIDs_; + } else { + result.datanodeIDs_ = datanodeIDsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.getDefaultInstance()) return this; + if (other.hasBlock()) { + mergeBlock(other.getBlock()); + } + if (datanodeIDsBuilder_ == null) { + if (!other.datanodeIDs_.isEmpty()) { + if (datanodeIDs_.isEmpty()) { + datanodeIDs_ = other.datanodeIDs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDatanodeIDsIsMutable(); + datanodeIDs_.addAll(other.datanodeIDs_); + } + onChanged(); + } + } else { + if (!other.datanodeIDs_.isEmpty()) { + if (datanodeIDsBuilder_.isEmpty()) { + datanodeIDsBuilder_.dispose(); + datanodeIDsBuilder_ = null; + datanodeIDs_ = other.datanodeIDs_; + bitField0_ = (bitField0_ & ~0x00000002); + datanodeIDsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getDatanodeIDsFieldBuilder() : null; + } else { + datanodeIDsBuilder_.addAllMessages(other.datanodeIDs_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasBlock()) { + + return false; + } + if (!getBlock().isInitialized()) { + + return false; + } + for (int i = 0; i < getDatanodeIDsCount(); i++) { + if (!getDatanodeIDs(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.Builder subBuilder = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.newBuilder(); + if (hasBlock()) { + subBuilder.mergeFrom(getBlock()); + } + input.readMessage(subBuilder, extensionRegistry); + setBlock(subBuilder.buildPartial()); + break; + } + case 18: { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder subBuilder = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addDatanodeIDs(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // required .BlockProto block = 1; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto block_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProtoOrBuilder> blockBuilder_; + public boolean hasBlock() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto getBlock() { + if (blockBuilder_ == null) { + return block_; + } else { + return blockBuilder_.getMessage(); + } + } + public Builder setBlock(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto value) { + if (blockBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + block_ = value; + onChanged(); + } else { + blockBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setBlock( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.Builder builderForValue) { + if (blockBuilder_ == null) { + block_ = builderForValue.build(); + onChanged(); + } else { + blockBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeBlock(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto value) { + if (blockBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + block_ != org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.getDefaultInstance()) { + block_ = + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.newBuilder(block_).mergeFrom(value).buildPartial(); + } else { + block_ = value; + } + onChanged(); + } else { + blockBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearBlock() { + if (blockBuilder_ == null) { + block_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.getDefaultInstance(); + onChanged(); + } else { + blockBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.Builder getBlockBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getBlockFieldBuilder().getBuilder(); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProtoOrBuilder getBlockOrBuilder() { + if (blockBuilder_ != null) { + return blockBuilder_.getMessageOrBuilder(); + } else { + return block_; + } + } + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProtoOrBuilder> + getBlockFieldBuilder() { + if (blockBuilder_ == null) { + blockBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProtoOrBuilder>( + block_, + getParentForChildren(), + isClean()); + block_ = null; + } + return blockBuilder_; + } + + // repeated .DatanodeIDProto datanodeIDs = 2; + private java.util.List datanodeIDs_ = + java.util.Collections.emptyList(); + private void ensureDatanodeIDsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + datanodeIDs_ = new java.util.ArrayList(datanodeIDs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProtoOrBuilder> datanodeIDsBuilder_; + + public java.util.List getDatanodeIDsList() { + if (datanodeIDsBuilder_ == null) { + return java.util.Collections.unmodifiableList(datanodeIDs_); + } else { + return datanodeIDsBuilder_.getMessageList(); + } + } + public int getDatanodeIDsCount() { + if (datanodeIDsBuilder_ == null) { + return datanodeIDs_.size(); + } else { + return datanodeIDsBuilder_.getCount(); + } + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto getDatanodeIDs(int index) { + if (datanodeIDsBuilder_ == null) { + return datanodeIDs_.get(index); + } else { + return datanodeIDsBuilder_.getMessage(index); + } + } + public Builder setDatanodeIDs( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto value) { + if (datanodeIDsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatanodeIDsIsMutable(); + datanodeIDs_.set(index, value); + onChanged(); + } else { + datanodeIDsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setDatanodeIDs( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder builderForValue) { + if (datanodeIDsBuilder_ == null) { + ensureDatanodeIDsIsMutable(); + datanodeIDs_.set(index, builderForValue.build()); + onChanged(); + } else { + datanodeIDsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addDatanodeIDs(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto value) { + if (datanodeIDsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatanodeIDsIsMutable(); + datanodeIDs_.add(value); + onChanged(); + } else { + datanodeIDsBuilder_.addMessage(value); + } + return this; + } + public Builder addDatanodeIDs( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto value) { + if (datanodeIDsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatanodeIDsIsMutable(); + datanodeIDs_.add(index, value); + onChanged(); + } else { + datanodeIDsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addDatanodeIDs( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder builderForValue) { + if (datanodeIDsBuilder_ == null) { + ensureDatanodeIDsIsMutable(); + datanodeIDs_.add(builderForValue.build()); + onChanged(); + } else { + datanodeIDsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addDatanodeIDs( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder builderForValue) { + if (datanodeIDsBuilder_ == null) { + ensureDatanodeIDsIsMutable(); + datanodeIDs_.add(index, builderForValue.build()); + onChanged(); + } else { + datanodeIDsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllDatanodeIDs( + java.lang.Iterable values) { + if (datanodeIDsBuilder_ == null) { + ensureDatanodeIDsIsMutable(); + super.addAll(values, datanodeIDs_); + onChanged(); + } else { + datanodeIDsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearDatanodeIDs() { + if (datanodeIDsBuilder_ == null) { + datanodeIDs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + datanodeIDsBuilder_.clear(); + } + return this; + } + public Builder removeDatanodeIDs(int index) { + if (datanodeIDsBuilder_ == null) { + ensureDatanodeIDsIsMutable(); + datanodeIDs_.remove(index); + onChanged(); + } else { + datanodeIDsBuilder_.remove(index); + } + return this; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder getDatanodeIDsBuilder( + int index) { + return getDatanodeIDsFieldBuilder().getBuilder(index); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProtoOrBuilder getDatanodeIDsOrBuilder( + int index) { + if (datanodeIDsBuilder_ == null) { + return datanodeIDs_.get(index); } else { + return datanodeIDsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getDatanodeIDsOrBuilderList() { + if (datanodeIDsBuilder_ != null) { + return datanodeIDsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(datanodeIDs_); + } + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder addDatanodeIDsBuilder() { + return getDatanodeIDsFieldBuilder().addBuilder( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.getDefaultInstance()); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder addDatanodeIDsBuilder( + int index) { + return getDatanodeIDsFieldBuilder().addBuilder( + index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.getDefaultInstance()); + } + public java.util.List + getDatanodeIDsBuilderList() { + return getDatanodeIDsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProtoOrBuilder> + getDatanodeIDsFieldBuilder() { + if (datanodeIDsBuilder_ == null) { + datanodeIDsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProtoOrBuilder>( + datanodeIDs_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + datanodeIDs_ = null; + } + return datanodeIDsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:BlockWithLocationsProto) + } + + static { + defaultInstance = new BlockWithLocationsProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:BlockWithLocationsProto) + } + + public interface BlocksWithLocationsProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .BlockWithLocationsProto blocks = 1; + java.util.List + getBlocksList(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto getBlocks(int index); + int getBlocksCount(); + java.util.List + getBlocksOrBuilderList(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProtoOrBuilder getBlocksOrBuilder( + int index); + } + public static final class BlocksWithLocationsProto extends + com.google.protobuf.GeneratedMessage + implements BlocksWithLocationsProtoOrBuilder { + // Use BlocksWithLocationsProto.newBuilder() to construct. + private BlocksWithLocationsProto(Builder builder) { + super(builder); + } + private BlocksWithLocationsProto(boolean noInit) {} + + private static final BlocksWithLocationsProto defaultInstance; + public static BlocksWithLocationsProto getDefaultInstance() { + return defaultInstance; + } + + public BlocksWithLocationsProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_BlocksWithLocationsProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_BlocksWithLocationsProto_fieldAccessorTable; + } + + // repeated .BlockWithLocationsProto blocks = 1; + public static final int BLOCKS_FIELD_NUMBER = 1; + private java.util.List blocks_; + public java.util.List getBlocksList() { + return blocks_; + } + public java.util.List + getBlocksOrBuilderList() { + return blocks_; + } + public int getBlocksCount() { + return blocks_.size(); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto getBlocks(int index) { + return blocks_.get(index); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProtoOrBuilder getBlocksOrBuilder( + int index) { + return blocks_.get(index); + } + + private void initFields() { + blocks_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getBlocksCount(); i++) { + if (!getBlocks(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < blocks_.size(); i++) { + output.writeMessage(1, blocks_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < blocks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, blocks_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto other = (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto) obj; + + boolean result = true; + result = result && getBlocksList() + .equals(other.getBlocksList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (getBlocksCount() > 0) { + hash = (37 * hash) + BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getBlocksList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_BlocksWithLocationsProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_BlocksWithLocationsProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getBlocksFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + blocksBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto build() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto result = new org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto(this); + int from_bitField0_ = bitField0_; + if (blocksBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.blocks_ = blocks_; + } else { + result.blocks_ = blocksBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto.getDefaultInstance()) return this; + if (blocksBuilder_ == null) { + if (!other.blocks_.isEmpty()) { + if (blocks_.isEmpty()) { + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBlocksIsMutable(); + blocks_.addAll(other.blocks_); + } + onChanged(); + } + } else { + if (!other.blocks_.isEmpty()) { + if (blocksBuilder_.isEmpty()) { + blocksBuilder_.dispose(); + blocksBuilder_ = null; + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + blocksBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getBlocksFieldBuilder() : null; + } else { + blocksBuilder_.addAllMessages(other.blocks_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getBlocksCount(); i++) { + if (!getBlocks(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.Builder subBuilder = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addBlocks(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .BlockWithLocationsProto blocks = 1; + private java.util.List blocks_ = + java.util.Collections.emptyList(); + private void ensureBlocksIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + blocks_ = new java.util.ArrayList(blocks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProtoOrBuilder> blocksBuilder_; + + public java.util.List getBlocksList() { + if (blocksBuilder_ == null) { + return java.util.Collections.unmodifiableList(blocks_); + } else { + return blocksBuilder_.getMessageList(); + } + } + public int getBlocksCount() { + if (blocksBuilder_ == null) { + return blocks_.size(); + } else { + return blocksBuilder_.getCount(); + } + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto getBlocks(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessage(index); + } + } + public Builder setBlocks( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.set(index, value); + onChanged(); + } else { + blocksBuilder_.setMessage(index, value); + } + return this; + } + public Builder setBlocks( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.set(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addBlocks(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(value); + onChanged(); + } else { + blocksBuilder_.addMessage(value); + } + return this; + } + public Builder addBlocks( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(index, value); + onChanged(); + } else { + blocksBuilder_.addMessage(index, value); + } + return this; + } + public Builder addBlocks( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addBlocks( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllBlocks( + java.lang.Iterable values) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + super.addAll(values, blocks_); + onChanged(); + } else { + blocksBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearBlocks() { + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + blocksBuilder_.clear(); + } + return this; + } + public Builder removeBlocks(int index) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.remove(index); + onChanged(); + } else { + blocksBuilder_.remove(index); + } + return this; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.Builder getBlocksBuilder( + int index) { + return getBlocksFieldBuilder().getBuilder(index); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProtoOrBuilder getBlocksOrBuilder( + int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); } else { + return blocksBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getBlocksOrBuilderList() { + if (blocksBuilder_ != null) { + return blocksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blocks_); + } + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.Builder addBlocksBuilder() { + return getBlocksFieldBuilder().addBuilder( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.getDefaultInstance()); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.Builder addBlocksBuilder( + int index) { + return getBlocksFieldBuilder().addBuilder( + index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.getDefaultInstance()); + } + public java.util.List + getBlocksBuilderList() { + return getBlocksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProtoOrBuilder> + getBlocksFieldBuilder() { + if (blocksBuilder_ == null) { + blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProtoOrBuilder>( + blocks_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + blocks_ = null; + } + return blocksBuilder_; + } + + // @@protoc_insertion_point(builder_scope:BlocksWithLocationsProto) + } + + static { + defaultInstance = new BlocksWithLocationsProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:BlocksWithLocationsProto) + } + + public interface RemoteEditLogProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required uint64 startTxId = 1; + boolean hasStartTxId(); + long getStartTxId(); + + // required uint64 endTxId = 2; + boolean hasEndTxId(); + long getEndTxId(); + } + public static final class RemoteEditLogProto extends + com.google.protobuf.GeneratedMessage + implements RemoteEditLogProtoOrBuilder { + // Use RemoteEditLogProto.newBuilder() to construct. + private RemoteEditLogProto(Builder builder) { + super(builder); + } + private RemoteEditLogProto(boolean noInit) {} + + private static final RemoteEditLogProto defaultInstance; + public static RemoteEditLogProto getDefaultInstance() { + return defaultInstance; + } + + public RemoteEditLogProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_RemoteEditLogProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_RemoteEditLogProto_fieldAccessorTable; + } + + private int bitField0_; + // required uint64 startTxId = 1; + public static final int STARTTXID_FIELD_NUMBER = 1; + private long startTxId_; + public boolean hasStartTxId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getStartTxId() { + return startTxId_; + } + + // required uint64 endTxId = 2; + public static final int ENDTXID_FIELD_NUMBER = 2; + private long endTxId_; + public boolean hasEndTxId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getEndTxId() { + return endTxId_; + } + + private void initFields() { + startTxId_ = 0L; + endTxId_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasStartTxId()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasEndTxId()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt64(1, startTxId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt64(2, endTxId_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, startTxId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, endTxId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto other = (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto) obj; + + boolean result = true; + result = result && (hasStartTxId() == other.hasStartTxId()); + if (hasStartTxId()) { + result = result && (getStartTxId() + == other.getStartTxId()); + } + result = result && (hasEndTxId() == other.hasEndTxId()); + if (hasEndTxId()) { + result = result && (getEndTxId() + == other.getEndTxId()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasStartTxId()) { + hash = (37 * hash) + STARTTXID_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getStartTxId()); + } + if (hasEndTxId()) { + hash = (37 * hash) + ENDTXID_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getEndTxId()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_RemoteEditLogProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_RemoteEditLogProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + startTxId_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + endTxId_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto build() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto result = new org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.startTxId_ = startTxId_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.endTxId_ = endTxId_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.getDefaultInstance()) return this; + if (other.hasStartTxId()) { + setStartTxId(other.getStartTxId()); + } + if (other.hasEndTxId()) { + setEndTxId(other.getEndTxId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasStartTxId()) { + + return false; + } + if (!hasEndTxId()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + startTxId_ = input.readUInt64(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + endTxId_ = input.readUInt64(); + break; + } + } + } + } + + private int bitField0_; + + // required uint64 startTxId = 1; + private long startTxId_ ; + public boolean hasStartTxId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getStartTxId() { + return startTxId_; + } + public Builder setStartTxId(long value) { + bitField0_ |= 0x00000001; + startTxId_ = value; + onChanged(); + return this; + } + public Builder clearStartTxId() { + bitField0_ = (bitField0_ & ~0x00000001); + startTxId_ = 0L; + onChanged(); + return this; + } + + // required uint64 endTxId = 2; + private long endTxId_ ; + public boolean hasEndTxId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getEndTxId() { + return endTxId_; + } + public Builder setEndTxId(long value) { + bitField0_ |= 0x00000002; + endTxId_ = value; + onChanged(); + return this; + } + public Builder clearEndTxId() { + bitField0_ = (bitField0_ & ~0x00000002); + endTxId_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:RemoteEditLogProto) + } + + static { + defaultInstance = new RemoteEditLogProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:RemoteEditLogProto) + } + + public interface RemoteEditLogManifestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .RemoteEditLogProto logs = 1; + java.util.List + getLogsList(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto getLogs(int index); + int getLogsCount(); + java.util.List + getLogsOrBuilderList(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProtoOrBuilder getLogsOrBuilder( + int index); + } + public static final class RemoteEditLogManifestProto extends + com.google.protobuf.GeneratedMessage + implements RemoteEditLogManifestProtoOrBuilder { + // Use RemoteEditLogManifestProto.newBuilder() to construct. + private RemoteEditLogManifestProto(Builder builder) { + super(builder); + } + private RemoteEditLogManifestProto(boolean noInit) {} + + private static final RemoteEditLogManifestProto defaultInstance; + public static RemoteEditLogManifestProto getDefaultInstance() { + return defaultInstance; + } + + public RemoteEditLogManifestProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_RemoteEditLogManifestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_RemoteEditLogManifestProto_fieldAccessorTable; + } + + // repeated .RemoteEditLogProto logs = 1; + public static final int LOGS_FIELD_NUMBER = 1; + private java.util.List logs_; + public java.util.List getLogsList() { + return logs_; + } + public java.util.List + getLogsOrBuilderList() { + return logs_; + } + public int getLogsCount() { + return logs_.size(); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto getLogs(int index) { + return logs_.get(index); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProtoOrBuilder getLogsOrBuilder( + int index) { + return logs_.get(index); + } + + private void initFields() { + logs_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getLogsCount(); i++) { + if (!getLogs(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < logs_.size(); i++) { + output.writeMessage(1, logs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < logs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, logs_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto other = (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto) obj; + + boolean result = true; + result = result && getLogsList() + .equals(other.getLogsList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (getLogsCount() > 0) { + hash = (37 * hash) + LOGS_FIELD_NUMBER; + hash = (53 * hash) + getLogsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_RemoteEditLogManifestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_RemoteEditLogManifestProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getLogsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (logsBuilder_ == null) { + logs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + logsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto build() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto result = new org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto(this); + int from_bitField0_ = bitField0_; + if (logsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + logs_ = java.util.Collections.unmodifiableList(logs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.logs_ = logs_; + } else { + result.logs_ = logsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto.getDefaultInstance()) return this; + if (logsBuilder_ == null) { + if (!other.logs_.isEmpty()) { + if (logs_.isEmpty()) { + logs_ = other.logs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLogsIsMutable(); + logs_.addAll(other.logs_); + } + onChanged(); + } + } else { + if (!other.logs_.isEmpty()) { + if (logsBuilder_.isEmpty()) { + logsBuilder_.dispose(); + logsBuilder_ = null; + logs_ = other.logs_; + bitField0_ = (bitField0_ & ~0x00000001); + logsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLogsFieldBuilder() : null; + } else { + logsBuilder_.addAllMessages(other.logs_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getLogsCount(); i++) { + if (!getLogs(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.Builder subBuilder = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addLogs(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .RemoteEditLogProto logs = 1; + private java.util.List logs_ = + java.util.Collections.emptyList(); + private void ensureLogsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + logs_ = new java.util.ArrayList(logs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProtoOrBuilder> logsBuilder_; + + public java.util.List getLogsList() { + if (logsBuilder_ == null) { + return java.util.Collections.unmodifiableList(logs_); + } else { + return logsBuilder_.getMessageList(); + } + } + public int getLogsCount() { + if (logsBuilder_ == null) { + return logs_.size(); + } else { + return logsBuilder_.getCount(); + } + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto getLogs(int index) { + if (logsBuilder_ == null) { + return logs_.get(index); + } else { + return logsBuilder_.getMessage(index); + } + } + public Builder setLogs( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto value) { + if (logsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogsIsMutable(); + logs_.set(index, value); + onChanged(); + } else { + logsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setLogs( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.Builder builderForValue) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + logs_.set(index, builderForValue.build()); + onChanged(); + } else { + logsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addLogs(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto value) { + if (logsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogsIsMutable(); + logs_.add(value); + onChanged(); + } else { + logsBuilder_.addMessage(value); + } + return this; + } + public Builder addLogs( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto value) { + if (logsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogsIsMutable(); + logs_.add(index, value); + onChanged(); + } else { + logsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addLogs( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.Builder builderForValue) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + logs_.add(builderForValue.build()); + onChanged(); + } else { + logsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addLogs( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.Builder builderForValue) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + logs_.add(index, builderForValue.build()); + onChanged(); + } else { + logsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllLogs( + java.lang.Iterable values) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + super.addAll(values, logs_); + onChanged(); + } else { + logsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearLogs() { + if (logsBuilder_ == null) { + logs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + logsBuilder_.clear(); + } + return this; + } + public Builder removeLogs(int index) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + logs_.remove(index); + onChanged(); + } else { + logsBuilder_.remove(index); + } + return this; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.Builder getLogsBuilder( + int index) { + return getLogsFieldBuilder().getBuilder(index); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProtoOrBuilder getLogsOrBuilder( + int index) { + if (logsBuilder_ == null) { + return logs_.get(index); } else { + return logsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getLogsOrBuilderList() { + if (logsBuilder_ != null) { + return logsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logs_); + } + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.Builder addLogsBuilder() { + return getLogsFieldBuilder().addBuilder( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.getDefaultInstance()); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.Builder addLogsBuilder( + int index) { + return getLogsFieldBuilder().addBuilder( + index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.getDefaultInstance()); + } + public java.util.List + getLogsBuilderList() { + return getLogsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProtoOrBuilder> + getLogsFieldBuilder() { + if (logsBuilder_ == null) { + logsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProtoOrBuilder>( + logs_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + logs_ = null; + } + return logsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:RemoteEditLogManifestProto) + } + + static { + defaultInstance = new RemoteEditLogManifestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:RemoteEditLogManifestProto) + } + + public interface NamespaceInfoProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string buildVersion = 1; + boolean hasBuildVersion(); + String getBuildVersion(); + + // required uint32 distUpgradeVersion = 2; + boolean hasDistUpgradeVersion(); + int getDistUpgradeVersion(); + + // required string blockPoolID = 3; + boolean hasBlockPoolID(); + String getBlockPoolID(); + + // required .StorageInfoProto storageInfo = 4; + boolean hasStorageInfo(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto getStorageInfo(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder getStorageInfoOrBuilder(); + } + public static final class NamespaceInfoProto extends + com.google.protobuf.GeneratedMessage + implements NamespaceInfoProtoOrBuilder { + // Use NamespaceInfoProto.newBuilder() to construct. + private NamespaceInfoProto(Builder builder) { + super(builder); + } + private NamespaceInfoProto(boolean noInit) {} + + private static final NamespaceInfoProto defaultInstance; + public static NamespaceInfoProto getDefaultInstance() { + return defaultInstance; + } + + public NamespaceInfoProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_NamespaceInfoProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_NamespaceInfoProto_fieldAccessorTable; + } + + private int bitField0_; + // required string buildVersion = 1; + public static final int BUILDVERSION_FIELD_NUMBER = 1; + private java.lang.Object buildVersion_; + public boolean hasBuildVersion() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getBuildVersion() { + java.lang.Object ref = buildVersion_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + buildVersion_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getBuildVersionBytes() { + java.lang.Object ref = buildVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + buildVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required uint32 distUpgradeVersion = 2; + public static final int DISTUPGRADEVERSION_FIELD_NUMBER = 2; + private int distUpgradeVersion_; + public boolean hasDistUpgradeVersion() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getDistUpgradeVersion() { + return distUpgradeVersion_; + } + + // required string blockPoolID = 3; + public static final int BLOCKPOOLID_FIELD_NUMBER = 3; + private java.lang.Object blockPoolID_; + public boolean hasBlockPoolID() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getBlockPoolID() { + java.lang.Object ref = blockPoolID_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + blockPoolID_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getBlockPoolIDBytes() { + java.lang.Object ref = blockPoolID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + blockPoolID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required .StorageInfoProto storageInfo = 4; + public static final int STORAGEINFO_FIELD_NUMBER = 4; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto storageInfo_; + public boolean hasStorageInfo() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto getStorageInfo() { + return storageInfo_; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder getStorageInfoOrBuilder() { + return storageInfo_; + } + + private void initFields() { + buildVersion_ = ""; + distUpgradeVersion_ = 0; + blockPoolID_ = ""; + storageInfo_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasBuildVersion()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasDistUpgradeVersion()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasBlockPoolID()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasStorageInfo()) { + memoizedIsInitialized = 0; + return false; + } + if (!getStorageInfo().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getBuildVersionBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt32(2, distUpgradeVersion_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getBlockPoolIDBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, storageInfo_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getBuildVersionBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, distUpgradeVersion_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getBlockPoolIDBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, storageInfo_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto other = (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto) obj; + + boolean result = true; + result = result && (hasBuildVersion() == other.hasBuildVersion()); + if (hasBuildVersion()) { + result = result && getBuildVersion() + .equals(other.getBuildVersion()); + } + result = result && (hasDistUpgradeVersion() == other.hasDistUpgradeVersion()); + if (hasDistUpgradeVersion()) { + result = result && (getDistUpgradeVersion() + == other.getDistUpgradeVersion()); + } + result = result && (hasBlockPoolID() == other.hasBlockPoolID()); + if (hasBlockPoolID()) { + result = result && getBlockPoolID() + .equals(other.getBlockPoolID()); + } + result = result && (hasStorageInfo() == other.hasStorageInfo()); + if (hasStorageInfo()) { + result = result && getStorageInfo() + .equals(other.getStorageInfo()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasBuildVersion()) { + hash = (37 * hash) + BUILDVERSION_FIELD_NUMBER; + hash = (53 * hash) + getBuildVersion().hashCode(); + } + if (hasDistUpgradeVersion()) { + hash = (37 * hash) + DISTUPGRADEVERSION_FIELD_NUMBER; + hash = (53 * hash) + getDistUpgradeVersion(); + } + if (hasBlockPoolID()) { + hash = (37 * hash) + BLOCKPOOLID_FIELD_NUMBER; + hash = (53 * hash) + getBlockPoolID().hashCode(); + } + if (hasStorageInfo()) { + hash = (37 * hash) + STORAGEINFO_FIELD_NUMBER; + hash = (53 * hash) + getStorageInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_NamespaceInfoProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_NamespaceInfoProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getStorageInfoFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + buildVersion_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + distUpgradeVersion_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + blockPoolID_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + if (storageInfoBuilder_ == null) { + storageInfo_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDefaultInstance(); + } else { + storageInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto build() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto result = new org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.buildVersion_ = buildVersion_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.distUpgradeVersion_ = distUpgradeVersion_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.blockPoolID_ = blockPoolID_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (storageInfoBuilder_ == null) { + result.storageInfo_ = storageInfo_; + } else { + result.storageInfo_ = storageInfoBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto.getDefaultInstance()) return this; + if (other.hasBuildVersion()) { + setBuildVersion(other.getBuildVersion()); + } + if (other.hasDistUpgradeVersion()) { + setDistUpgradeVersion(other.getDistUpgradeVersion()); + } + if (other.hasBlockPoolID()) { + setBlockPoolID(other.getBlockPoolID()); + } + if (other.hasStorageInfo()) { + mergeStorageInfo(other.getStorageInfo()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasBuildVersion()) { + + return false; + } + if (!hasDistUpgradeVersion()) { + + return false; + } + if (!hasBlockPoolID()) { + + return false; + } + if (!hasStorageInfo()) { + + return false; + } + if (!getStorageInfo().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + buildVersion_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + distUpgradeVersion_ = input.readUInt32(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + blockPoolID_ = input.readBytes(); + break; + } + case 34: { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder subBuilder = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.newBuilder(); + if (hasStorageInfo()) { + subBuilder.mergeFrom(getStorageInfo()); + } + input.readMessage(subBuilder, extensionRegistry); + setStorageInfo(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // required string buildVersion = 1; + private java.lang.Object buildVersion_ = ""; + public boolean hasBuildVersion() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getBuildVersion() { + java.lang.Object ref = buildVersion_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + buildVersion_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setBuildVersion(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + buildVersion_ = value; + onChanged(); + return this; + } + public Builder clearBuildVersion() { + bitField0_ = (bitField0_ & ~0x00000001); + buildVersion_ = getDefaultInstance().getBuildVersion(); + onChanged(); + return this; + } + void setBuildVersion(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + buildVersion_ = value; + onChanged(); + } + + // required uint32 distUpgradeVersion = 2; + private int distUpgradeVersion_ ; + public boolean hasDistUpgradeVersion() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getDistUpgradeVersion() { + return distUpgradeVersion_; + } + public Builder setDistUpgradeVersion(int value) { + bitField0_ |= 0x00000002; + distUpgradeVersion_ = value; + onChanged(); + return this; + } + public Builder clearDistUpgradeVersion() { + bitField0_ = (bitField0_ & ~0x00000002); + distUpgradeVersion_ = 0; + onChanged(); + return this; + } + + // required string blockPoolID = 3; + private java.lang.Object blockPoolID_ = ""; + public boolean hasBlockPoolID() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getBlockPoolID() { + java.lang.Object ref = blockPoolID_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + blockPoolID_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setBlockPoolID(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + blockPoolID_ = value; + onChanged(); + return this; + } + public Builder clearBlockPoolID() { + bitField0_ = (bitField0_ & ~0x00000004); + blockPoolID_ = getDefaultInstance().getBlockPoolID(); + onChanged(); + return this; + } + void setBlockPoolID(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000004; + blockPoolID_ = value; + onChanged(); + } + + // required .StorageInfoProto storageInfo = 4; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto storageInfo_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder> storageInfoBuilder_; + public boolean hasStorageInfo() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto getStorageInfo() { + if (storageInfoBuilder_ == null) { + return storageInfo_; + } else { + return storageInfoBuilder_.getMessage(); + } + } + public Builder setStorageInfo(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto value) { + if (storageInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + storageInfo_ = value; + onChanged(); + } else { + storageInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setStorageInfo( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder builderForValue) { + if (storageInfoBuilder_ == null) { + storageInfo_ = builderForValue.build(); + onChanged(); + } else { + storageInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeStorageInfo(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto value) { + if (storageInfoBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + storageInfo_ != org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDefaultInstance()) { + storageInfo_ = + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.newBuilder(storageInfo_).mergeFrom(value).buildPartial(); + } else { + storageInfo_ = value; + } + onChanged(); + } else { + storageInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearStorageInfo() { + if (storageInfoBuilder_ == null) { + storageInfo_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.getDefaultInstance(); + onChanged(); + } else { + storageInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder getStorageInfoBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getStorageInfoFieldBuilder().getBuilder(); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder getStorageInfoOrBuilder() { + if (storageInfoBuilder_ != null) { + return storageInfoBuilder_.getMessageOrBuilder(); + } else { + return storageInfo_; + } + } + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder> + getStorageInfoFieldBuilder() { + if (storageInfoBuilder_ == null) { + storageInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProtoOrBuilder>( + storageInfo_, + getParentForChildren(), + isClean()); + storageInfo_ = null; + } + return storageInfoBuilder_; + } + + // @@protoc_insertion_point(builder_scope:NamespaceInfoProto) + } + + static { + defaultInstance = new NamespaceInfoProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:NamespaceInfoProto) + } + + public interface BlockKeyProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required uint32 keyId = 1; + boolean hasKeyId(); + int getKeyId(); + + // required uint64 expiryDate = 2; + boolean hasExpiryDate(); + long getExpiryDate(); + + // required bytes keyBytes = 3; + boolean hasKeyBytes(); + com.google.protobuf.ByteString getKeyBytes(); + } + public static final class BlockKeyProto extends + com.google.protobuf.GeneratedMessage + implements BlockKeyProtoOrBuilder { + // Use BlockKeyProto.newBuilder() to construct. + private BlockKeyProto(Builder builder) { + super(builder); + } + private BlockKeyProto(boolean noInit) {} + + private static final BlockKeyProto defaultInstance; + public static BlockKeyProto getDefaultInstance() { + return defaultInstance; + } + + public BlockKeyProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_BlockKeyProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_BlockKeyProto_fieldAccessorTable; + } + + private int bitField0_; + // required uint32 keyId = 1; + public static final int KEYID_FIELD_NUMBER = 1; + private int keyId_; + public boolean hasKeyId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getKeyId() { + return keyId_; + } + + // required uint64 expiryDate = 2; + public static final int EXPIRYDATE_FIELD_NUMBER = 2; + private long expiryDate_; + public boolean hasExpiryDate() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getExpiryDate() { + return expiryDate_; + } + + // required bytes keyBytes = 3; + public static final int KEYBYTES_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString keyBytes_; + public boolean hasKeyBytes() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getKeyBytes() { + return keyBytes_; + } + + private void initFields() { + keyId_ = 0; + expiryDate_ = 0L; + keyBytes_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasKeyId()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasExpiryDate()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasKeyBytes()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt32(1, keyId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt64(2, expiryDate_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, keyBytes_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, keyId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, expiryDate_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, keyBytes_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto other = (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto) obj; + + boolean result = true; + result = result && (hasKeyId() == other.hasKeyId()); + if (hasKeyId()) { + result = result && (getKeyId() + == other.getKeyId()); + } + result = result && (hasExpiryDate() == other.hasExpiryDate()); + if (hasExpiryDate()) { + result = result && (getExpiryDate() + == other.getExpiryDate()); + } + result = result && (hasKeyBytes() == other.hasKeyBytes()); + if (hasKeyBytes()) { + result = result && getKeyBytes() + .equals(other.getKeyBytes()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasKeyId()) { + hash = (37 * hash) + KEYID_FIELD_NUMBER; + hash = (53 * hash) + getKeyId(); + } + if (hasExpiryDate()) { + hash = (37 * hash) + EXPIRYDATE_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getExpiryDate()); + } + if (hasKeyBytes()) { + hash = (37 * hash) + KEYBYTES_FIELD_NUMBER; + hash = (53 * hash) + getKeyBytes().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_BlockKeyProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_BlockKeyProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + keyId_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + expiryDate_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + keyBytes_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto build() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto result = new org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.keyId_ = keyId_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.expiryDate_ = expiryDate_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.keyBytes_ = keyBytes_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.getDefaultInstance()) return this; + if (other.hasKeyId()) { + setKeyId(other.getKeyId()); + } + if (other.hasExpiryDate()) { + setExpiryDate(other.getExpiryDate()); + } + if (other.hasKeyBytes()) { + setKeyBytes(other.getKeyBytes()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasKeyId()) { + + return false; + } + if (!hasExpiryDate()) { + + return false; + } + if (!hasKeyBytes()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + keyId_ = input.readUInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + expiryDate_ = input.readUInt64(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + keyBytes_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required uint32 keyId = 1; + private int keyId_ ; + public boolean hasKeyId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getKeyId() { + return keyId_; + } + public Builder setKeyId(int value) { + bitField0_ |= 0x00000001; + keyId_ = value; + onChanged(); + return this; + } + public Builder clearKeyId() { + bitField0_ = (bitField0_ & ~0x00000001); + keyId_ = 0; + onChanged(); + return this; + } + + // required uint64 expiryDate = 2; + private long expiryDate_ ; + public boolean hasExpiryDate() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getExpiryDate() { + return expiryDate_; + } + public Builder setExpiryDate(long value) { + bitField0_ |= 0x00000002; + expiryDate_ = value; + onChanged(); + return this; + } + public Builder clearExpiryDate() { + bitField0_ = (bitField0_ & ~0x00000002); + expiryDate_ = 0L; + onChanged(); + return this; + } + + // required bytes keyBytes = 3; + private com.google.protobuf.ByteString keyBytes_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasKeyBytes() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getKeyBytes() { + return keyBytes_; + } + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + keyBytes_ = value; + onChanged(); + return this; + } + public Builder clearKeyBytes() { + bitField0_ = (bitField0_ & ~0x00000004); + keyBytes_ = getDefaultInstance().getKeyBytes(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:BlockKeyProto) + } + + static { + defaultInstance = new BlockKeyProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:BlockKeyProto) + } + + public interface ExportedBlockKeysProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required bool isBlockTokenEnabled = 1; + boolean hasIsBlockTokenEnabled(); + boolean getIsBlockTokenEnabled(); + + // required uint64 keyUpdateInterval = 2; + boolean hasKeyUpdateInterval(); + long getKeyUpdateInterval(); + + // required uint64 tokenLifeTime = 3; + boolean hasTokenLifeTime(); + long getTokenLifeTime(); + + // required .BlockKeyProto currentKey = 4; + boolean hasCurrentKey(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto getCurrentKey(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProtoOrBuilder getCurrentKeyOrBuilder(); + + // repeated .BlockKeyProto allKeys = 5; + java.util.List + getAllKeysList(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto getAllKeys(int index); + int getAllKeysCount(); + java.util.List + getAllKeysOrBuilderList(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProtoOrBuilder getAllKeysOrBuilder( + int index); + } + public static final class ExportedBlockKeysProto extends + com.google.protobuf.GeneratedMessage + implements ExportedBlockKeysProtoOrBuilder { + // Use ExportedBlockKeysProto.newBuilder() to construct. + private ExportedBlockKeysProto(Builder builder) { + super(builder); + } + private ExportedBlockKeysProto(boolean noInit) {} + + private static final ExportedBlockKeysProto defaultInstance; + public static ExportedBlockKeysProto getDefaultInstance() { + return defaultInstance; + } + + public ExportedBlockKeysProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_ExportedBlockKeysProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_ExportedBlockKeysProto_fieldAccessorTable; + } + + private int bitField0_; + // required bool isBlockTokenEnabled = 1; + public static final int ISBLOCKTOKENENABLED_FIELD_NUMBER = 1; + private boolean isBlockTokenEnabled_; + public boolean hasIsBlockTokenEnabled() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public boolean getIsBlockTokenEnabled() { + return isBlockTokenEnabled_; + } + + // required uint64 keyUpdateInterval = 2; + public static final int KEYUPDATEINTERVAL_FIELD_NUMBER = 2; + private long keyUpdateInterval_; + public boolean hasKeyUpdateInterval() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getKeyUpdateInterval() { + return keyUpdateInterval_; + } + + // required uint64 tokenLifeTime = 3; + public static final int TOKENLIFETIME_FIELD_NUMBER = 3; + private long tokenLifeTime_; + public boolean hasTokenLifeTime() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getTokenLifeTime() { + return tokenLifeTime_; + } + + // required .BlockKeyProto currentKey = 4; + public static final int CURRENTKEY_FIELD_NUMBER = 4; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto currentKey_; + public boolean hasCurrentKey() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto getCurrentKey() { + return currentKey_; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProtoOrBuilder getCurrentKeyOrBuilder() { + return currentKey_; + } + + // repeated .BlockKeyProto allKeys = 5; + public static final int ALLKEYS_FIELD_NUMBER = 5; + private java.util.List allKeys_; + public java.util.List getAllKeysList() { + return allKeys_; + } + public java.util.List + getAllKeysOrBuilderList() { + return allKeys_; + } + public int getAllKeysCount() { + return allKeys_.size(); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto getAllKeys(int index) { + return allKeys_.get(index); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProtoOrBuilder getAllKeysOrBuilder( + int index) { + return allKeys_.get(index); + } + + private void initFields() { + isBlockTokenEnabled_ = false; + keyUpdateInterval_ = 0L; + tokenLifeTime_ = 0L; + currentKey_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.getDefaultInstance(); + allKeys_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasIsBlockTokenEnabled()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasKeyUpdateInterval()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasTokenLifeTime()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasCurrentKey()) { + memoizedIsInitialized = 0; + return false; + } + if (!getCurrentKey().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getAllKeysCount(); i++) { + if (!getAllKeys(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBool(1, isBlockTokenEnabled_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt64(2, keyUpdateInterval_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeUInt64(3, tokenLifeTime_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, currentKey_); + } + for (int i = 0; i < allKeys_.size(); i++) { + output.writeMessage(5, allKeys_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, isBlockTokenEnabled_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, keyUpdateInterval_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, tokenLifeTime_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, currentKey_); + } + for (int i = 0; i < allKeys_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, allKeys_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto other = (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto) obj; + + boolean result = true; + result = result && (hasIsBlockTokenEnabled() == other.hasIsBlockTokenEnabled()); + if (hasIsBlockTokenEnabled()) { + result = result && (getIsBlockTokenEnabled() + == other.getIsBlockTokenEnabled()); + } + result = result && (hasKeyUpdateInterval() == other.hasKeyUpdateInterval()); + if (hasKeyUpdateInterval()) { + result = result && (getKeyUpdateInterval() + == other.getKeyUpdateInterval()); + } + result = result && (hasTokenLifeTime() == other.hasTokenLifeTime()); + if (hasTokenLifeTime()) { + result = result && (getTokenLifeTime() + == other.getTokenLifeTime()); + } + result = result && (hasCurrentKey() == other.hasCurrentKey()); + if (hasCurrentKey()) { + result = result && getCurrentKey() + .equals(other.getCurrentKey()); + } + result = result && getAllKeysList() + .equals(other.getAllKeysList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasIsBlockTokenEnabled()) { + hash = (37 * hash) + ISBLOCKTOKENENABLED_FIELD_NUMBER; + hash = (53 * hash) + hashBoolean(getIsBlockTokenEnabled()); + } + if (hasKeyUpdateInterval()) { + hash = (37 * hash) + KEYUPDATEINTERVAL_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getKeyUpdateInterval()); + } + if (hasTokenLifeTime()) { + hash = (37 * hash) + TOKENLIFETIME_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getTokenLifeTime()); + } + if (hasCurrentKey()) { + hash = (37 * hash) + CURRENTKEY_FIELD_NUMBER; + hash = (53 * hash) + getCurrentKey().hashCode(); + } + if (getAllKeysCount() > 0) { + hash = (37 * hash) + ALLKEYS_FIELD_NUMBER; + hash = (53 * hash) + getAllKeysList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_ExportedBlockKeysProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_ExportedBlockKeysProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getCurrentKeyFieldBuilder(); + getAllKeysFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + isBlockTokenEnabled_ = false; + bitField0_ = (bitField0_ & ~0x00000001); + keyUpdateInterval_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + tokenLifeTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); + if (currentKeyBuilder_ == null) { + currentKey_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.getDefaultInstance(); + } else { + currentKeyBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (allKeysBuilder_ == null) { + allKeys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + allKeysBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto build() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto result = new org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.isBlockTokenEnabled_ = isBlockTokenEnabled_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.keyUpdateInterval_ = keyUpdateInterval_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.tokenLifeTime_ = tokenLifeTime_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (currentKeyBuilder_ == null) { + result.currentKey_ = currentKey_; + } else { + result.currentKey_ = currentKeyBuilder_.build(); + } + if (allKeysBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { + allKeys_ = java.util.Collections.unmodifiableList(allKeys_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.allKeys_ = allKeys_; + } else { + result.allKeys_ = allKeysBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto.getDefaultInstance()) return this; + if (other.hasIsBlockTokenEnabled()) { + setIsBlockTokenEnabled(other.getIsBlockTokenEnabled()); + } + if (other.hasKeyUpdateInterval()) { + setKeyUpdateInterval(other.getKeyUpdateInterval()); + } + if (other.hasTokenLifeTime()) { + setTokenLifeTime(other.getTokenLifeTime()); + } + if (other.hasCurrentKey()) { + mergeCurrentKey(other.getCurrentKey()); + } + if (allKeysBuilder_ == null) { + if (!other.allKeys_.isEmpty()) { + if (allKeys_.isEmpty()) { + allKeys_ = other.allKeys_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureAllKeysIsMutable(); + allKeys_.addAll(other.allKeys_); + } + onChanged(); + } + } else { + if (!other.allKeys_.isEmpty()) { + if (allKeysBuilder_.isEmpty()) { + allKeysBuilder_.dispose(); + allKeysBuilder_ = null; + allKeys_ = other.allKeys_; + bitField0_ = (bitField0_ & ~0x00000010); + allKeysBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getAllKeysFieldBuilder() : null; + } else { + allKeysBuilder_.addAllMessages(other.allKeys_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasIsBlockTokenEnabled()) { + + return false; + } + if (!hasKeyUpdateInterval()) { + + return false; + } + if (!hasTokenLifeTime()) { + + return false; + } + if (!hasCurrentKey()) { + + return false; + } + if (!getCurrentKey().isInitialized()) { + + return false; + } + for (int i = 0; i < getAllKeysCount(); i++) { + if (!getAllKeys(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + isBlockTokenEnabled_ = input.readBool(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + keyUpdateInterval_ = input.readUInt64(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + tokenLifeTime_ = input.readUInt64(); + break; + } + case 34: { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.Builder subBuilder = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.newBuilder(); + if (hasCurrentKey()) { + subBuilder.mergeFrom(getCurrentKey()); + } + input.readMessage(subBuilder, extensionRegistry); + setCurrentKey(subBuilder.buildPartial()); + break; + } + case 42: { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.Builder subBuilder = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addAllKeys(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // required bool isBlockTokenEnabled = 1; + private boolean isBlockTokenEnabled_ ; + public boolean hasIsBlockTokenEnabled() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public boolean getIsBlockTokenEnabled() { + return isBlockTokenEnabled_; + } + public Builder setIsBlockTokenEnabled(boolean value) { + bitField0_ |= 0x00000001; + isBlockTokenEnabled_ = value; + onChanged(); + return this; + } + public Builder clearIsBlockTokenEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + isBlockTokenEnabled_ = false; + onChanged(); + return this; + } + + // required uint64 keyUpdateInterval = 2; + private long keyUpdateInterval_ ; + public boolean hasKeyUpdateInterval() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getKeyUpdateInterval() { + return keyUpdateInterval_; + } + public Builder setKeyUpdateInterval(long value) { + bitField0_ |= 0x00000002; + keyUpdateInterval_ = value; + onChanged(); + return this; + } + public Builder clearKeyUpdateInterval() { + bitField0_ = (bitField0_ & ~0x00000002); + keyUpdateInterval_ = 0L; + onChanged(); + return this; + } + + // required uint64 tokenLifeTime = 3; + private long tokenLifeTime_ ; + public boolean hasTokenLifeTime() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getTokenLifeTime() { + return tokenLifeTime_; + } + public Builder setTokenLifeTime(long value) { + bitField0_ |= 0x00000004; + tokenLifeTime_ = value; + onChanged(); + return this; + } + public Builder clearTokenLifeTime() { + bitField0_ = (bitField0_ & ~0x00000004); + tokenLifeTime_ = 0L; + onChanged(); + return this; + } + + // required .BlockKeyProto currentKey = 4; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto currentKey_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProtoOrBuilder> currentKeyBuilder_; + public boolean hasCurrentKey() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto getCurrentKey() { + if (currentKeyBuilder_ == null) { + return currentKey_; + } else { + return currentKeyBuilder_.getMessage(); + } + } + public Builder setCurrentKey(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto value) { + if (currentKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentKey_ = value; + onChanged(); + } else { + currentKeyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setCurrentKey( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.Builder builderForValue) { + if (currentKeyBuilder_ == null) { + currentKey_ = builderForValue.build(); + onChanged(); + } else { + currentKeyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeCurrentKey(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto value) { + if (currentKeyBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + currentKey_ != org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.getDefaultInstance()) { + currentKey_ = + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.newBuilder(currentKey_).mergeFrom(value).buildPartial(); + } else { + currentKey_ = value; + } + onChanged(); + } else { + currentKeyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearCurrentKey() { + if (currentKeyBuilder_ == null) { + currentKey_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.getDefaultInstance(); + onChanged(); + } else { + currentKeyBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.Builder getCurrentKeyBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCurrentKeyFieldBuilder().getBuilder(); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProtoOrBuilder getCurrentKeyOrBuilder() { + if (currentKeyBuilder_ != null) { + return currentKeyBuilder_.getMessageOrBuilder(); + } else { + return currentKey_; + } + } + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProtoOrBuilder> + getCurrentKeyFieldBuilder() { + if (currentKeyBuilder_ == null) { + currentKeyBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProtoOrBuilder>( + currentKey_, + getParentForChildren(), + isClean()); + currentKey_ = null; + } + return currentKeyBuilder_; + } + + // repeated .BlockKeyProto allKeys = 5; + private java.util.List allKeys_ = + java.util.Collections.emptyList(); + private void ensureAllKeysIsMutable() { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { + allKeys_ = new java.util.ArrayList(allKeys_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProtoOrBuilder> allKeysBuilder_; + + public java.util.List getAllKeysList() { + if (allKeysBuilder_ == null) { + return java.util.Collections.unmodifiableList(allKeys_); + } else { + return allKeysBuilder_.getMessageList(); + } + } + public int getAllKeysCount() { + if (allKeysBuilder_ == null) { + return allKeys_.size(); + } else { + return allKeysBuilder_.getCount(); + } + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto getAllKeys(int index) { + if (allKeysBuilder_ == null) { + return allKeys_.get(index); + } else { + return allKeysBuilder_.getMessage(index); + } + } + public Builder setAllKeys( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto value) { + if (allKeysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllKeysIsMutable(); + allKeys_.set(index, value); + onChanged(); + } else { + allKeysBuilder_.setMessage(index, value); + } + return this; + } + public Builder setAllKeys( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.Builder builderForValue) { + if (allKeysBuilder_ == null) { + ensureAllKeysIsMutable(); + allKeys_.set(index, builderForValue.build()); + onChanged(); + } else { + allKeysBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllKeys(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto value) { + if (allKeysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllKeysIsMutable(); + allKeys_.add(value); + onChanged(); + } else { + allKeysBuilder_.addMessage(value); + } + return this; + } + public Builder addAllKeys( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto value) { + if (allKeysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllKeysIsMutable(); + allKeys_.add(index, value); + onChanged(); + } else { + allKeysBuilder_.addMessage(index, value); + } + return this; + } + public Builder addAllKeys( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.Builder builderForValue) { + if (allKeysBuilder_ == null) { + ensureAllKeysIsMutable(); + allKeys_.add(builderForValue.build()); + onChanged(); + } else { + allKeysBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addAllKeys( + int index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.Builder builderForValue) { + if (allKeysBuilder_ == null) { + ensureAllKeysIsMutable(); + allKeys_.add(index, builderForValue.build()); + onChanged(); + } else { + allKeysBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllAllKeys( + java.lang.Iterable values) { + if (allKeysBuilder_ == null) { + ensureAllKeysIsMutable(); + super.addAll(values, allKeys_); + onChanged(); + } else { + allKeysBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearAllKeys() { + if (allKeysBuilder_ == null) { + allKeys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + allKeysBuilder_.clear(); + } + return this; + } + public Builder removeAllKeys(int index) { + if (allKeysBuilder_ == null) { + ensureAllKeysIsMutable(); + allKeys_.remove(index); + onChanged(); + } else { + allKeysBuilder_.remove(index); + } + return this; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.Builder getAllKeysBuilder( + int index) { + return getAllKeysFieldBuilder().getBuilder(index); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProtoOrBuilder getAllKeysOrBuilder( + int index) { + if (allKeysBuilder_ == null) { + return allKeys_.get(index); } else { + return allKeysBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getAllKeysOrBuilderList() { + if (allKeysBuilder_ != null) { + return allKeysBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(allKeys_); + } + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.Builder addAllKeysBuilder() { + return getAllKeysFieldBuilder().addBuilder( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.getDefaultInstance()); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.Builder addAllKeysBuilder( + int index) { + return getAllKeysFieldBuilder().addBuilder( + index, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.getDefaultInstance()); + } + public java.util.List + getAllKeysBuilderList() { + return getAllKeysFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProtoOrBuilder> + getAllKeysFieldBuilder() { + if (allKeysBuilder_ == null) { + allKeysBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProtoOrBuilder>( + allKeys_, + ((bitField0_ & 0x00000010) == 0x00000010), + getParentForChildren(), + isClean()); + allKeys_ = null; + } + return allKeysBuilder_; + } + + // @@protoc_insertion_point(builder_scope:ExportedBlockKeysProto) + } + + static { + defaultInstance = new ExportedBlockKeysProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:ExportedBlockKeysProto) + } + + public interface RecoveringBlockProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required uint64 newGenStamp = 1; + boolean hasNewGenStamp(); + long getNewGenStamp(); + + // required .LocatedBlockProto block = 2; + boolean hasBlock(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto getBlock(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProtoOrBuilder getBlockOrBuilder(); + } + public static final class RecoveringBlockProto extends + com.google.protobuf.GeneratedMessage + implements RecoveringBlockProtoOrBuilder { + // Use RecoveringBlockProto.newBuilder() to construct. + private RecoveringBlockProto(Builder builder) { + super(builder); + } + private RecoveringBlockProto(boolean noInit) {} + + private static final RecoveringBlockProto defaultInstance; + public static RecoveringBlockProto getDefaultInstance() { + return defaultInstance; + } + + public RecoveringBlockProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_RecoveringBlockProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_RecoveringBlockProto_fieldAccessorTable; + } + + private int bitField0_; + // required uint64 newGenStamp = 1; + public static final int NEWGENSTAMP_FIELD_NUMBER = 1; + private long newGenStamp_; + public boolean hasNewGenStamp() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getNewGenStamp() { + return newGenStamp_; + } + + // required .LocatedBlockProto block = 2; + public static final int BLOCK_FIELD_NUMBER = 2; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto block_; + public boolean hasBlock() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto getBlock() { + return block_; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProtoOrBuilder getBlockOrBuilder() { + return block_; + } + + private void initFields() { + newGenStamp_ = 0L; + block_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasNewGenStamp()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasBlock()) { + memoizedIsInitialized = 0; + return false; + } + if (!getBlock().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt64(1, newGenStamp_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, block_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, newGenStamp_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, block_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto other = (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto) obj; + + boolean result = true; + result = result && (hasNewGenStamp() == other.hasNewGenStamp()); + if (hasNewGenStamp()) { + result = result && (getNewGenStamp() + == other.getNewGenStamp()); + } + result = result && (hasBlock() == other.hasBlock()); + if (hasBlock()) { + result = result && getBlock() + .equals(other.getBlock()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasNewGenStamp()) { + hash = (37 * hash) + NEWGENSTAMP_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getNewGenStamp()); + } + if (hasBlock()) { + hash = (37 * hash) + BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getBlock().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_RecoveringBlockProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.internal_static_RecoveringBlockProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getBlockFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + newGenStamp_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + if (blockBuilder_ == null) { + block_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto.getDefaultInstance(); + } else { + blockBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto build() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto result = new org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.newGenStamp_ = newGenStamp_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (blockBuilder_ == null) { + result.block_ = block_; + } else { + result.block_ = blockBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto.getDefaultInstance()) return this; + if (other.hasNewGenStamp()) { + setNewGenStamp(other.getNewGenStamp()); + } + if (other.hasBlock()) { + mergeBlock(other.getBlock()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasNewGenStamp()) { + + return false; + } + if (!hasBlock()) { + + return false; + } + if (!getBlock().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + newGenStamp_ = input.readUInt64(); + break; + } + case 18: { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto.Builder subBuilder = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto.newBuilder(); + if (hasBlock()) { + subBuilder.mergeFrom(getBlock()); + } + input.readMessage(subBuilder, extensionRegistry); + setBlock(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // required uint64 newGenStamp = 1; + private long newGenStamp_ ; + public boolean hasNewGenStamp() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getNewGenStamp() { + return newGenStamp_; + } + public Builder setNewGenStamp(long value) { + bitField0_ |= 0x00000001; + newGenStamp_ = value; + onChanged(); + return this; + } + public Builder clearNewGenStamp() { + bitField0_ = (bitField0_ & ~0x00000001); + newGenStamp_ = 0L; + onChanged(); + return this; + } + + // required .LocatedBlockProto block = 2; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto block_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProtoOrBuilder> blockBuilder_; + public boolean hasBlock() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto getBlock() { + if (blockBuilder_ == null) { + return block_; + } else { + return blockBuilder_.getMessage(); + } + } + public Builder setBlock(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto value) { + if (blockBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + block_ = value; + onChanged(); + } else { + blockBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setBlock( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto.Builder builderForValue) { + if (blockBuilder_ == null) { + block_ = builderForValue.build(); + onChanged(); + } else { + blockBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeBlock(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto value) { + if (blockBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + block_ != org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto.getDefaultInstance()) { + block_ = + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto.newBuilder(block_).mergeFrom(value).buildPartial(); + } else { + block_ = value; + } + onChanged(); + } else { + blockBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearBlock() { + if (blockBuilder_ == null) { + block_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto.getDefaultInstance(); + onChanged(); + } else { + blockBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto.Builder getBlockBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getBlockFieldBuilder().getBuilder(); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProtoOrBuilder getBlockOrBuilder() { + if (blockBuilder_ != null) { + return blockBuilder_.getMessageOrBuilder(); + } else { + return block_; + } + } + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProtoOrBuilder> + getBlockFieldBuilder() { + if (blockBuilder_ == null) { + blockBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProtoOrBuilder>( + block_, + getParentForChildren(), + isClean()); + block_ = null; + } + return blockBuilder_; + } + + // @@protoc_insertion_point(builder_scope:RecoveringBlockProto) + } + + static { + defaultInstance = new RecoveringBlockProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:RecoveringBlockProto) + } + private static com.google.protobuf.Descriptors.Descriptor internal_static_ExtendedBlockProto_descriptor; private static @@ -10283,6 +20145,11 @@ public final class HdfsProtos { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_DatanodeIDProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_DatanodeIDsProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_DatanodeIDsProto_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_DatanodeInfoProto_descriptor; private static @@ -10333,6 +20200,76 @@ public final class HdfsProtos { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_UpgradeStatusReportProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_StorageInfoProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_StorageInfoProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_NamenodeRegistrationProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_NamenodeRegistrationProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_CheckpointSignatureProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_CheckpointSignatureProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_NamenodeCommandProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_NamenodeCommandProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_CheckpointCommandProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_CheckpointCommandProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_BlockProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_BlockProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_BlockWithLocationsProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_BlockWithLocationsProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_BlocksWithLocationsProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_BlocksWithLocationsProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_RemoteEditLogProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_RemoteEditLogProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_RemoteEditLogManifestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_RemoteEditLogManifestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_NamespaceInfoProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_NamespaceInfoProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_BlockKeyProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_BlockKeyProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_ExportedBlockKeysProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_ExportedBlockKeysProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_RecoveringBlockProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_RecoveringBlockProto_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -10349,48 +20286,91 @@ public final class HdfsProtos { "\020\n\010password\030\002 \002(\014\022\014\n\004kind\030\003 \002(\t\022\017\n\007servi" + "ce\030\004 \002(\t\"U\n\017DatanodeIDProto\022\014\n\004name\030\001 \002(" + "\t\022\021\n\tstorageID\030\002 \002(\t\022\020\n\010infoPort\030\003 \002(\r\022\017" + - "\n\007ipcPort\030\004 \002(\r\"\312\002\n\021DatanodeInfoProto\022\034\n" + - "\002id\030\001 \002(\0132\020.DatanodeIDProto\022\020\n\010capacity\030" + - "\002 \001(\004\022\017\n\007dfsUsed\030\003 \001(\004\022\021\n\tremaining\030\004 \001(", - "\004\022\025\n\rblockPoolUsed\030\005 \001(\004\022\022\n\nlastUpdate\030\006" + - " \001(\004\022\024\n\014xceiverCount\030\007 \001(\r\022\020\n\010location\030\010" + - " \001(\t\022\020\n\010hostName\030\t \001(\t\0221\n\nadminState\030\n \001" + - "(\0162\035.DatanodeInfoProto.AdminState\"I\n\nAdm" + - "inState\022\n\n\006NORMAL\020\000\022\033\n\027DECOMMISSION_INPR" + - "OGRESS\020\001\022\022\n\016DECOMMISSIONED\020\002\"\212\001\n\023Content" + - "SummaryProto\022\016\n\006length\030\001 \002(\004\022\021\n\tfileCoun" + - "t\030\002 \002(\004\022\026\n\016directoryCount\030\003 \002(\004\022\r\n\005quota" + - "\030\004 \002(\004\022\025\n\rspaceConsumed\030\005 \002(\004\022\022\n\nspaceQu" + - "ota\030\006 \002(\004\"7\n\026CorruptFileBlocksProto\022\r\n\005f", - "iles\030\001 \003(\t\022\016\n\006cookie\030\002 \002(\t\"!\n\021FsPermissi" + - "onProto\022\014\n\004perm\030\001 \002(\r\"\246\001\n\021LocatedBlockPr" + - "oto\022\036\n\001b\030\001 \002(\0132\023.ExtendedBlockProto\022\016\n\006o" + - "ffset\030\002 \002(\004\022 \n\004locs\030\003 \003(\0132\022.DatanodeInfo" + - "Proto\022\017\n\007corrupt\030\004 \002(\010\022.\n\nblockToken\030\005 \002" + - "(\0132\032.BlockTokenIdentifierProto\"\253\001\n\022Locat" + - "edBlocksProto\022\022\n\nfileLength\030\001 \002(\004\022\"\n\006blo" + - "cks\030\002 \003(\0132\022.LocatedBlockProto\022\031\n\021underCo" + - "nstruction\030\003 \002(\010\022%\n\tlastBlock\030\004 \001(\0132\022.Lo" + - "catedBlockProto\022\033\n\023isLastBlockComplete\030\005", - " \002(\010\"\366\002\n\023HdfsFileStatusProto\022/\n\010fileType" + - "\030\001 \002(\0162\035.HdfsFileStatusProto.FileType\022\014\n" + - "\004path\030\002 \002(\014\022\016\n\006length\030\003 \002(\004\022&\n\npermissio" + - "n\030\004 \002(\0132\022.FsPermissionProto\022\r\n\005owner\030\005 \002" + - "(\t\022\r\n\005group\030\006 \002(\t\022\031\n\021modification_time\030\007" + - " \002(\004\022\023\n\013access_time\030\010 \002(\004\022\017\n\007symlink\030\t \001" + - "(\014\022\031\n\021block_replication\030\n \001(\r\022\021\n\tblocksi" + - "ze\030\013 \001(\004\022&\n\tlocations\030\014 \001(\0132\023.LocatedBlo" + - "cksProto\"3\n\010FileType\022\n\n\006IS_DIR\020\001\022\013\n\007IS_F" + - "ILE\020\002\022\016\n\nIS_SYMLINK\020\003\"\212\001\n\025FsServerDefaul", - "tsProto\022\021\n\tblockSize\030\001 \002(\004\022\030\n\020bytesPerCh" + - "ecksum\030\002 \002(\r\022\027\n\017writePacketSize\030\003 \002(\r\022\023\n" + - "\013replication\030\004 \002(\r\022\026\n\016fileBufferSize\030\005 \002" + - "(\r\"_\n\025DirectoryListingProto\022,\n\016partialLi" + - "sting\030\001 \003(\0132\024.HdfsFileStatusProto\022\030\n\020rem" + - "ainingEntries\030\002 \002(\r\"B\n\030UpgradeStatusRepo" + - "rtProto\022\017\n\007version\030\001 \002(\r\022\025\n\rupgradeStatu" + - "s\030\002 \002(\rB6\n%org.apache.hadoop.hdfs.protoc" + - "ol.protoB\nHdfsProtos\240\001\001" + "\n\007ipcPort\030\004 \002(\r\"7\n\020DatanodeIDsProto\022#\n\td" + + "atanodes\030\001 \003(\0132\020.DatanodeIDProto\"\312\002\n\021Dat" + + "anodeInfoProto\022\034\n\002id\030\001 \002(\0132\020.DatanodeIDP", + "roto\022\020\n\010capacity\030\002 \001(\004\022\017\n\007dfsUsed\030\003 \001(\004\022" + + "\021\n\tremaining\030\004 \001(\004\022\025\n\rblockPoolUsed\030\005 \001(" + + "\004\022\022\n\nlastUpdate\030\006 \001(\004\022\024\n\014xceiverCount\030\007 " + + "\001(\r\022\020\n\010location\030\010 \001(\t\022\020\n\010hostName\030\t \001(\t\022" + + "1\n\nadminState\030\n \001(\0162\035.DatanodeInfoProto." + + "AdminState\"I\n\nAdminState\022\n\n\006NORMAL\020\000\022\033\n\027" + + "DECOMMISSION_INPROGRESS\020\001\022\022\n\016DECOMMISSIO" + + "NED\020\002\"\212\001\n\023ContentSummaryProto\022\016\n\006length\030" + + "\001 \002(\004\022\021\n\tfileCount\030\002 \002(\004\022\026\n\016directoryCou" + + "nt\030\003 \002(\004\022\r\n\005quota\030\004 \002(\004\022\025\n\rspaceConsumed", + "\030\005 \002(\004\022\022\n\nspaceQuota\030\006 \002(\004\"7\n\026CorruptFil" + + "eBlocksProto\022\r\n\005files\030\001 \003(\t\022\016\n\006cookie\030\002 " + + "\002(\t\"!\n\021FsPermissionProto\022\014\n\004perm\030\001 \002(\r\"\246" + + "\001\n\021LocatedBlockProto\022\036\n\001b\030\001 \002(\0132\023.Extend" + + "edBlockProto\022\016\n\006offset\030\002 \002(\004\022 \n\004locs\030\003 \003" + + "(\0132\022.DatanodeInfoProto\022\017\n\007corrupt\030\004 \002(\010\022" + + ".\n\nblockToken\030\005 \002(\0132\032.BlockTokenIdentifi" + + "erProto\"\253\001\n\022LocatedBlocksProto\022\022\n\nfileLe" + + "ngth\030\001 \002(\004\022\"\n\006blocks\030\002 \003(\0132\022.LocatedBloc" + + "kProto\022\031\n\021underConstruction\030\003 \002(\010\022%\n\tlas", + "tBlock\030\004 \001(\0132\022.LocatedBlockProto\022\033\n\023isLa" + + "stBlockComplete\030\005 \002(\010\"\366\002\n\023HdfsFileStatus" + + "Proto\022/\n\010fileType\030\001 \002(\0162\035.HdfsFileStatus" + + "Proto.FileType\022\014\n\004path\030\002 \002(\014\022\016\n\006length\030\003" + + " \002(\004\022&\n\npermission\030\004 \002(\0132\022.FsPermissionP" + + "roto\022\r\n\005owner\030\005 \002(\t\022\r\n\005group\030\006 \002(\t\022\031\n\021mo" + + "dification_time\030\007 \002(\004\022\023\n\013access_time\030\010 \002" + + "(\004\022\017\n\007symlink\030\t \001(\014\022\031\n\021block_replication" + + "\030\n \001(\r\022\021\n\tblocksize\030\013 \001(\004\022&\n\tlocations\030\014" + + " \001(\0132\023.LocatedBlocksProto\"3\n\010FileType\022\n\n", + "\006IS_DIR\020\001\022\013\n\007IS_FILE\020\002\022\016\n\nIS_SYMLINK\020\003\"\212" + + "\001\n\025FsServerDefaultsProto\022\021\n\tblockSize\030\001 " + + "\002(\004\022\030\n\020bytesPerChecksum\030\002 \002(\r\022\027\n\017writePa" + + "cketSize\030\003 \002(\r\022\023\n\013replication\030\004 \002(\r\022\026\n\016f" + + "ileBufferSize\030\005 \002(\r\"_\n\025DirectoryListingP" + + "roto\022,\n\016partialListing\030\001 \003(\0132\024.HdfsFileS" + + "tatusProto\022\030\n\020remainingEntries\030\002 \002(\r\"B\n\030" + + "UpgradeStatusReportProto\022\017\n\007version\030\001 \002(" + + "\r\022\025\n\rupgradeStatus\030\002 \002(\r\"_\n\020StorageInfoP" + + "roto\022\025\n\rlayoutVersion\030\001 \002(\r\022\022\n\nnamespceI", + "D\030\002 \002(\r\022\021\n\tclusterID\030\003 \002(\t\022\r\n\005cTime\030\004 \002(" + + "\004\"\347\001\n\031NamenodeRegistrationProto\022\022\n\nrpcAd" + + "dress\030\001 \002(\t\022\023\n\013httpAddress\030\002 \002(\t\022&\n\013stor" + + "ageInfo\030\003 \002(\0132\021.StorageInfoProto\022:\n\004role" + + "\030\004 \001(\0162,.NamenodeRegistrationProto.Namen" + + "odeRoleProto\"=\n\021NamenodeRoleProto\022\014\n\010NAM" + + "ENODE\020\001\022\n\n\006BACKUP\020\002\022\016\n\nCHECKPOINT\020\003\"\221\001\n\030" + + "CheckpointSignatureProto\022\023\n\013blockPoolId\030" + + "\001 \002(\t\022 \n\030mostRecentCheckpointTxId\030\002 \002(\004\022" + + "\026\n\016curSegmentTxId\030\003 \002(\004\022&\n\013storageInfo\030\004", + " \002(\0132\021.StorageInfoProto\"\264\001\n\024NamenodeComm" + + "andProto\022\016\n\006action\030\001 \002(\r\022(\n\004type\030\002 \002(\0162\032" + + ".NamenodeCommandProto.Type\022.\n\rcheckpoint" + + "Cmd\030\003 \001(\0132\027.CheckpointCommandProto\"2\n\004Ty" + + "pe\022\023\n\017NamenodeCommand\020\000\022\025\n\021CheckPointCom" + + "mand\020\001\"a\n\026CheckpointCommandProto\022,\n\tsign" + + "ature\030\001 \002(\0132\031.CheckpointSignatureProto\022\031" + + "\n\021needToReturnImage\030\002 \002(\010\"A\n\nBlockProto\022" + + "\017\n\007blockId\030\001 \002(\004\022\020\n\010genStamp\030\002 \002(\004\022\020\n\010nu" + + "mBytes\030\003 \001(\004\"\\\n\027BlockWithLocationsProto\022", + "\032\n\005block\030\001 \002(\0132\013.BlockProto\022%\n\013datanodeI" + + "Ds\030\002 \003(\0132\020.DatanodeIDProto\"D\n\030BlocksWith" + + "LocationsProto\022(\n\006blocks\030\001 \003(\0132\030.BlockWi" + + "thLocationsProto\"8\n\022RemoteEditLogProto\022\021" + + "\n\tstartTxId\030\001 \002(\004\022\017\n\007endTxId\030\002 \002(\004\"?\n\032Re" + + "moteEditLogManifestProto\022!\n\004logs\030\001 \003(\0132\023" + + ".RemoteEditLogProto\"\203\001\n\022NamespaceInfoPro" + + "to\022\024\n\014buildVersion\030\001 \002(\t\022\032\n\022distUpgradeV" + + "ersion\030\002 \002(\r\022\023\n\013blockPoolID\030\003 \002(\t\022&\n\013sto" + + "rageInfo\030\004 \002(\0132\021.StorageInfoProto\"D\n\rBlo", + "ckKeyProto\022\r\n\005keyId\030\001 \002(\r\022\022\n\nexpiryDate\030" + + "\002 \002(\004\022\020\n\010keyBytes\030\003 \002(\014\"\254\001\n\026ExportedBloc" + + "kKeysProto\022\033\n\023isBlockTokenEnabled\030\001 \002(\010\022" + + "\031\n\021keyUpdateInterval\030\002 \002(\004\022\025\n\rtokenLifeT" + + "ime\030\003 \002(\004\022\"\n\ncurrentKey\030\004 \002(\0132\016.BlockKey" + + "Proto\022\037\n\007allKeys\030\005 \003(\0132\016.BlockKeyProto\"N" + + "\n\024RecoveringBlockProto\022\023\n\013newGenStamp\030\001 " + + "\002(\004\022!\n\005block\030\002 \002(\0132\022.LocatedBlockProto*G" + + "\n\014ReplicaState\022\r\n\tFINALIZED\020\000\022\007\n\003RBW\020\001\022\007" + + "\n\003RWR\020\002\022\007\n\003RUR\020\003\022\r\n\tTEMPORARY\020\004B6\n%org.a", + "pache.hadoop.hdfs.protocol.protoB\nHdfsPr" + + "otos\240\001\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -10421,8 +20401,16 @@ public final class HdfsProtos { new java.lang.String[] { "Name", "StorageID", "InfoPort", "IpcPort", }, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.class, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDProto.Builder.class); - internal_static_DatanodeInfoProto_descriptor = + internal_static_DatanodeIDsProto_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_DatanodeIDsProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_DatanodeIDsProto_descriptor, + new java.lang.String[] { "Datanodes", }, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto.class, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeIDsProto.Builder.class); + internal_static_DatanodeInfoProto_descriptor = + getDescriptor().getMessageTypes().get(4); internal_static_DatanodeInfoProto_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_DatanodeInfoProto_descriptor, @@ -10430,7 +20418,7 @@ public final class HdfsProtos { org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeInfoProto.class, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DatanodeInfoProto.Builder.class); internal_static_ContentSummaryProto_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_ContentSummaryProto_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_ContentSummaryProto_descriptor, @@ -10438,7 +20426,7 @@ public final class HdfsProtos { org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ContentSummaryProto.class, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ContentSummaryProto.Builder.class); internal_static_CorruptFileBlocksProto_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_CorruptFileBlocksProto_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_CorruptFileBlocksProto_descriptor, @@ -10446,7 +20434,7 @@ public final class HdfsProtos { org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CorruptFileBlocksProto.class, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CorruptFileBlocksProto.Builder.class); internal_static_FsPermissionProto_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_FsPermissionProto_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_FsPermissionProto_descriptor, @@ -10454,7 +20442,7 @@ public final class HdfsProtos { org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.FsPermissionProto.class, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.FsPermissionProto.Builder.class); internal_static_LocatedBlockProto_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_LocatedBlockProto_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_LocatedBlockProto_descriptor, @@ -10462,7 +20450,7 @@ public final class HdfsProtos { org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto.class, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto.Builder.class); internal_static_LocatedBlocksProto_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_LocatedBlocksProto_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_LocatedBlocksProto_descriptor, @@ -10470,7 +20458,7 @@ public final class HdfsProtos { org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlocksProto.class, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlocksProto.Builder.class); internal_static_HdfsFileStatusProto_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_HdfsFileStatusProto_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_HdfsFileStatusProto_descriptor, @@ -10478,7 +20466,7 @@ public final class HdfsProtos { org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.HdfsFileStatusProto.class, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.HdfsFileStatusProto.Builder.class); internal_static_FsServerDefaultsProto_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_FsServerDefaultsProto_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_FsServerDefaultsProto_descriptor, @@ -10486,7 +20474,7 @@ public final class HdfsProtos { org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.FsServerDefaultsProto.class, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.FsServerDefaultsProto.Builder.class); internal_static_DirectoryListingProto_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(12); internal_static_DirectoryListingProto_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_DirectoryListingProto_descriptor, @@ -10494,13 +20482,125 @@ public final class HdfsProtos { org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DirectoryListingProto.class, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.DirectoryListingProto.Builder.class); internal_static_UpgradeStatusReportProto_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(13); internal_static_UpgradeStatusReportProto_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_UpgradeStatusReportProto_descriptor, new java.lang.String[] { "Version", "UpgradeStatus", }, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.UpgradeStatusReportProto.class, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.UpgradeStatusReportProto.Builder.class); + internal_static_StorageInfoProto_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_StorageInfoProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_StorageInfoProto_descriptor, + new java.lang.String[] { "LayoutVersion", "NamespceID", "ClusterID", "CTime", }, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.class, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.StorageInfoProto.Builder.class); + internal_static_NamenodeRegistrationProto_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_NamenodeRegistrationProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_NamenodeRegistrationProto_descriptor, + new java.lang.String[] { "RpcAddress", "HttpAddress", "StorageInfo", "Role", }, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.class, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.Builder.class); + internal_static_CheckpointSignatureProto_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_CheckpointSignatureProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_CheckpointSignatureProto_descriptor, + new java.lang.String[] { "BlockPoolId", "MostRecentCheckpointTxId", "CurSegmentTxId", "StorageInfo", }, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.class, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointSignatureProto.Builder.class); + internal_static_NamenodeCommandProto_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_NamenodeCommandProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_NamenodeCommandProto_descriptor, + new java.lang.String[] { "Action", "Type", "CheckpointCmd", }, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.class, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeCommandProto.Builder.class); + internal_static_CheckpointCommandProto_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_CheckpointCommandProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_CheckpointCommandProto_descriptor, + new java.lang.String[] { "Signature", "NeedToReturnImage", }, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.class, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.CheckpointCommandProto.Builder.class); + internal_static_BlockProto_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_BlockProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_BlockProto_descriptor, + new java.lang.String[] { "BlockId", "GenStamp", "NumBytes", }, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.class, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.Builder.class); + internal_static_BlockWithLocationsProto_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_BlockWithLocationsProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_BlockWithLocationsProto_descriptor, + new java.lang.String[] { "Block", "DatanodeIDs", }, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.class, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockWithLocationsProto.Builder.class); + internal_static_BlocksWithLocationsProto_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_BlocksWithLocationsProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_BlocksWithLocationsProto_descriptor, + new java.lang.String[] { "Blocks", }, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto.class, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlocksWithLocationsProto.Builder.class); + internal_static_RemoteEditLogProto_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_RemoteEditLogProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_RemoteEditLogProto_descriptor, + new java.lang.String[] { "StartTxId", "EndTxId", }, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.class, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogProto.Builder.class); + internal_static_RemoteEditLogManifestProto_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_RemoteEditLogManifestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_RemoteEditLogManifestProto_descriptor, + new java.lang.String[] { "Logs", }, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto.class, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RemoteEditLogManifestProto.Builder.class); + internal_static_NamespaceInfoProto_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_NamespaceInfoProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_NamespaceInfoProto_descriptor, + new java.lang.String[] { "BuildVersion", "DistUpgradeVersion", "BlockPoolID", "StorageInfo", }, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto.class, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamespaceInfoProto.Builder.class); + internal_static_BlockKeyProto_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_BlockKeyProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_BlockKeyProto_descriptor, + new java.lang.String[] { "KeyId", "ExpiryDate", "KeyBytes", }, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.class, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockKeyProto.Builder.class); + internal_static_ExportedBlockKeysProto_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_ExportedBlockKeysProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_ExportedBlockKeysProto_descriptor, + new java.lang.String[] { "IsBlockTokenEnabled", "KeyUpdateInterval", "TokenLifeTime", "CurrentKey", "AllKeys", }, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto.class, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.ExportedBlockKeysProto.Builder.class); + internal_static_RecoveringBlockProto_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_RecoveringBlockProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_RecoveringBlockProto_descriptor, + new java.lang.String[] { "NewGenStamp", "Block", }, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto.class, + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.RecoveringBlockProto.Builder.class); return null; } }; diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/proto/JournalProtocolProtos.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/proto/JournalProtocolProtos.java new file mode 100644 index 00000000000..74267456b73 --- /dev/null +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/proto/JournalProtocolProtos.java @@ -0,0 +1,2234 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: JournalProtocol.proto + +package org.apache.hadoop.hdfs.protocol.proto; + +public final class JournalProtocolProtos { + private JournalProtocolProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public interface JournalRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .NamenodeRegistrationProto registration = 1; + boolean hasRegistration(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto getRegistration(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProtoOrBuilder getRegistrationOrBuilder(); + + // required uint64 firstTxnId = 2; + boolean hasFirstTxnId(); + long getFirstTxnId(); + + // required uint32 numTxns = 3; + boolean hasNumTxns(); + int getNumTxns(); + + // required bytes records = 4; + boolean hasRecords(); + com.google.protobuf.ByteString getRecords(); + } + public static final class JournalRequestProto extends + com.google.protobuf.GeneratedMessage + implements JournalRequestProtoOrBuilder { + // Use JournalRequestProto.newBuilder() to construct. + private JournalRequestProto(Builder builder) { + super(builder); + } + private JournalRequestProto(boolean noInit) {} + + private static final JournalRequestProto defaultInstance; + public static JournalRequestProto getDefaultInstance() { + return defaultInstance; + } + + public JournalRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.internal_static_JournalRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.internal_static_JournalRequestProto_fieldAccessorTable; + } + + private int bitField0_; + // required .NamenodeRegistrationProto registration = 1; + public static final int REGISTRATION_FIELD_NUMBER = 1; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto registration_; + public boolean hasRegistration() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto getRegistration() { + return registration_; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProtoOrBuilder getRegistrationOrBuilder() { + return registration_; + } + + // required uint64 firstTxnId = 2; + public static final int FIRSTTXNID_FIELD_NUMBER = 2; + private long firstTxnId_; + public boolean hasFirstTxnId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getFirstTxnId() { + return firstTxnId_; + } + + // required uint32 numTxns = 3; + public static final int NUMTXNS_FIELD_NUMBER = 3; + private int numTxns_; + public boolean hasNumTxns() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public int getNumTxns() { + return numTxns_; + } + + // required bytes records = 4; + public static final int RECORDS_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString records_; + public boolean hasRecords() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.google.protobuf.ByteString getRecords() { + return records_; + } + + private void initFields() { + registration_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.getDefaultInstance(); + firstTxnId_ = 0L; + numTxns_ = 0; + records_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasRegistration()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasFirstTxnId()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasNumTxns()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasRecords()) { + memoizedIsInitialized = 0; + return false; + } + if (!getRegistration().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, registration_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt64(2, firstTxnId_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeUInt32(3, numTxns_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, records_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, registration_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, firstTxnId_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, numTxns_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, records_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto other = (org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto) obj; + + boolean result = true; + result = result && (hasRegistration() == other.hasRegistration()); + if (hasRegistration()) { + result = result && getRegistration() + .equals(other.getRegistration()); + } + result = result && (hasFirstTxnId() == other.hasFirstTxnId()); + if (hasFirstTxnId()) { + result = result && (getFirstTxnId() + == other.getFirstTxnId()); + } + result = result && (hasNumTxns() == other.hasNumTxns()); + if (hasNumTxns()) { + result = result && (getNumTxns() + == other.getNumTxns()); + } + result = result && (hasRecords() == other.hasRecords()); + if (hasRecords()) { + result = result && getRecords() + .equals(other.getRecords()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasRegistration()) { + hash = (37 * hash) + REGISTRATION_FIELD_NUMBER; + hash = (53 * hash) + getRegistration().hashCode(); + } + if (hasFirstTxnId()) { + hash = (37 * hash) + FIRSTTXNID_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getFirstTxnId()); + } + if (hasNumTxns()) { + hash = (37 * hash) + NUMTXNS_FIELD_NUMBER; + hash = (53 * hash) + getNumTxns(); + } + if (hasRecords()) { + hash = (37 * hash) + RECORDS_FIELD_NUMBER; + hash = (53 * hash) + getRecords().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.internal_static_JournalRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.internal_static_JournalRequestProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRegistrationFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (registrationBuilder_ == null) { + registration_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.getDefaultInstance(); + } else { + registrationBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + firstTxnId_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + numTxns_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + records_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto build() { + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto result = new org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (registrationBuilder_ == null) { + result.registration_ = registration_; + } else { + result.registration_ = registrationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.firstTxnId_ = firstTxnId_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.numTxns_ = numTxns_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.records_ = records_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto.getDefaultInstance()) return this; + if (other.hasRegistration()) { + mergeRegistration(other.getRegistration()); + } + if (other.hasFirstTxnId()) { + setFirstTxnId(other.getFirstTxnId()); + } + if (other.hasNumTxns()) { + setNumTxns(other.getNumTxns()); + } + if (other.hasRecords()) { + setRecords(other.getRecords()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasRegistration()) { + + return false; + } + if (!hasFirstTxnId()) { + + return false; + } + if (!hasNumTxns()) { + + return false; + } + if (!hasRecords()) { + + return false; + } + if (!getRegistration().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.Builder subBuilder = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.newBuilder(); + if (hasRegistration()) { + subBuilder.mergeFrom(getRegistration()); + } + input.readMessage(subBuilder, extensionRegistry); + setRegistration(subBuilder.buildPartial()); + break; + } + case 16: { + bitField0_ |= 0x00000002; + firstTxnId_ = input.readUInt64(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + numTxns_ = input.readUInt32(); + break; + } + case 34: { + bitField0_ |= 0x00000008; + records_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required .NamenodeRegistrationProto registration = 1; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto registration_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProtoOrBuilder> registrationBuilder_; + public boolean hasRegistration() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto getRegistration() { + if (registrationBuilder_ == null) { + return registration_; + } else { + return registrationBuilder_.getMessage(); + } + } + public Builder setRegistration(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto value) { + if (registrationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + registration_ = value; + onChanged(); + } else { + registrationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setRegistration( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.Builder builderForValue) { + if (registrationBuilder_ == null) { + registration_ = builderForValue.build(); + onChanged(); + } else { + registrationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeRegistration(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto value) { + if (registrationBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + registration_ != org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.getDefaultInstance()) { + registration_ = + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.newBuilder(registration_).mergeFrom(value).buildPartial(); + } else { + registration_ = value; + } + onChanged(); + } else { + registrationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearRegistration() { + if (registrationBuilder_ == null) { + registration_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.getDefaultInstance(); + onChanged(); + } else { + registrationBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.Builder getRegistrationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRegistrationFieldBuilder().getBuilder(); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProtoOrBuilder getRegistrationOrBuilder() { + if (registrationBuilder_ != null) { + return registrationBuilder_.getMessageOrBuilder(); + } else { + return registration_; + } + } + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProtoOrBuilder> + getRegistrationFieldBuilder() { + if (registrationBuilder_ == null) { + registrationBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProtoOrBuilder>( + registration_, + getParentForChildren(), + isClean()); + registration_ = null; + } + return registrationBuilder_; + } + + // required uint64 firstTxnId = 2; + private long firstTxnId_ ; + public boolean hasFirstTxnId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getFirstTxnId() { + return firstTxnId_; + } + public Builder setFirstTxnId(long value) { + bitField0_ |= 0x00000002; + firstTxnId_ = value; + onChanged(); + return this; + } + public Builder clearFirstTxnId() { + bitField0_ = (bitField0_ & ~0x00000002); + firstTxnId_ = 0L; + onChanged(); + return this; + } + + // required uint32 numTxns = 3; + private int numTxns_ ; + public boolean hasNumTxns() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public int getNumTxns() { + return numTxns_; + } + public Builder setNumTxns(int value) { + bitField0_ |= 0x00000004; + numTxns_ = value; + onChanged(); + return this; + } + public Builder clearNumTxns() { + bitField0_ = (bitField0_ & ~0x00000004); + numTxns_ = 0; + onChanged(); + return this; + } + + // required bytes records = 4; + private com.google.protobuf.ByteString records_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRecords() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.google.protobuf.ByteString getRecords() { + return records_; + } + public Builder setRecords(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + records_ = value; + onChanged(); + return this; + } + public Builder clearRecords() { + bitField0_ = (bitField0_ & ~0x00000008); + records_ = getDefaultInstance().getRecords(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:JournalRequestProto) + } + + static { + defaultInstance = new JournalRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:JournalRequestProto) + } + + public interface JournalResponseProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class JournalResponseProto extends + com.google.protobuf.GeneratedMessage + implements JournalResponseProtoOrBuilder { + // Use JournalResponseProto.newBuilder() to construct. + private JournalResponseProto(Builder builder) { + super(builder); + } + private JournalResponseProto(boolean noInit) {} + + private static final JournalResponseProto defaultInstance; + public static JournalResponseProto getDefaultInstance() { + return defaultInstance; + } + + public JournalResponseProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.internal_static_JournalResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.internal_static_JournalResponseProto_fieldAccessorTable; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto other = (org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.internal_static_JournalResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.internal_static_JournalResponseProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto build() { + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto result = new org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + } + } + } + + + // @@protoc_insertion_point(builder_scope:JournalResponseProto) + } + + static { + defaultInstance = new JournalResponseProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:JournalResponseProto) + } + + public interface StartLogSegmentRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .NamenodeRegistrationProto registration = 1; + boolean hasRegistration(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto getRegistration(); + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProtoOrBuilder getRegistrationOrBuilder(); + + // required uint64 txid = 2; + boolean hasTxid(); + long getTxid(); + } + public static final class StartLogSegmentRequestProto extends + com.google.protobuf.GeneratedMessage + implements StartLogSegmentRequestProtoOrBuilder { + // Use StartLogSegmentRequestProto.newBuilder() to construct. + private StartLogSegmentRequestProto(Builder builder) { + super(builder); + } + private StartLogSegmentRequestProto(boolean noInit) {} + + private static final StartLogSegmentRequestProto defaultInstance; + public static StartLogSegmentRequestProto getDefaultInstance() { + return defaultInstance; + } + + public StartLogSegmentRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.internal_static_StartLogSegmentRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.internal_static_StartLogSegmentRequestProto_fieldAccessorTable; + } + + private int bitField0_; + // required .NamenodeRegistrationProto registration = 1; + public static final int REGISTRATION_FIELD_NUMBER = 1; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto registration_; + public boolean hasRegistration() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto getRegistration() { + return registration_; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProtoOrBuilder getRegistrationOrBuilder() { + return registration_; + } + + // required uint64 txid = 2; + public static final int TXID_FIELD_NUMBER = 2; + private long txid_; + public boolean hasTxid() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getTxid() { + return txid_; + } + + private void initFields() { + registration_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.getDefaultInstance(); + txid_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasRegistration()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasTxid()) { + memoizedIsInitialized = 0; + return false; + } + if (!getRegistration().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, registration_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt64(2, txid_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, registration_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, txid_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto other = (org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto) obj; + + boolean result = true; + result = result && (hasRegistration() == other.hasRegistration()); + if (hasRegistration()) { + result = result && getRegistration() + .equals(other.getRegistration()); + } + result = result && (hasTxid() == other.hasTxid()); + if (hasTxid()) { + result = result && (getTxid() + == other.getTxid()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasRegistration()) { + hash = (37 * hash) + REGISTRATION_FIELD_NUMBER; + hash = (53 * hash) + getRegistration().hashCode(); + } + if (hasTxid()) { + hash = (37 * hash) + TXID_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getTxid()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.internal_static_StartLogSegmentRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.internal_static_StartLogSegmentRequestProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRegistrationFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (registrationBuilder_ == null) { + registration_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.getDefaultInstance(); + } else { + registrationBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + txid_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto build() { + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto result = new org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (registrationBuilder_ == null) { + result.registration_ = registration_; + } else { + result.registration_ = registrationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.txid_ = txid_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto.getDefaultInstance()) return this; + if (other.hasRegistration()) { + mergeRegistration(other.getRegistration()); + } + if (other.hasTxid()) { + setTxid(other.getTxid()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasRegistration()) { + + return false; + } + if (!hasTxid()) { + + return false; + } + if (!getRegistration().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.Builder subBuilder = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.newBuilder(); + if (hasRegistration()) { + subBuilder.mergeFrom(getRegistration()); + } + input.readMessage(subBuilder, extensionRegistry); + setRegistration(subBuilder.buildPartial()); + break; + } + case 16: { + bitField0_ |= 0x00000002; + txid_ = input.readUInt64(); + break; + } + } + } + } + + private int bitField0_; + + // required .NamenodeRegistrationProto registration = 1; + private org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto registration_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProtoOrBuilder> registrationBuilder_; + public boolean hasRegistration() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto getRegistration() { + if (registrationBuilder_ == null) { + return registration_; + } else { + return registrationBuilder_.getMessage(); + } + } + public Builder setRegistration(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto value) { + if (registrationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + registration_ = value; + onChanged(); + } else { + registrationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setRegistration( + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.Builder builderForValue) { + if (registrationBuilder_ == null) { + registration_ = builderForValue.build(); + onChanged(); + } else { + registrationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeRegistration(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto value) { + if (registrationBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + registration_ != org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.getDefaultInstance()) { + registration_ = + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.newBuilder(registration_).mergeFrom(value).buildPartial(); + } else { + registration_ = value; + } + onChanged(); + } else { + registrationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearRegistration() { + if (registrationBuilder_ == null) { + registration_ = org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.getDefaultInstance(); + onChanged(); + } else { + registrationBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.Builder getRegistrationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRegistrationFieldBuilder().getBuilder(); + } + public org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProtoOrBuilder getRegistrationOrBuilder() { + if (registrationBuilder_ != null) { + return registrationBuilder_.getMessageOrBuilder(); + } else { + return registration_; + } + } + private com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProtoOrBuilder> + getRegistrationFieldBuilder() { + if (registrationBuilder_ == null) { + registrationBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.Builder, org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProtoOrBuilder>( + registration_, + getParentForChildren(), + isClean()); + registration_ = null; + } + return registrationBuilder_; + } + + // required uint64 txid = 2; + private long txid_ ; + public boolean hasTxid() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getTxid() { + return txid_; + } + public Builder setTxid(long value) { + bitField0_ |= 0x00000002; + txid_ = value; + onChanged(); + return this; + } + public Builder clearTxid() { + bitField0_ = (bitField0_ & ~0x00000002); + txid_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:StartLogSegmentRequestProto) + } + + static { + defaultInstance = new StartLogSegmentRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:StartLogSegmentRequestProto) + } + + public interface StartLogSegmentResponseProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class StartLogSegmentResponseProto extends + com.google.protobuf.GeneratedMessage + implements StartLogSegmentResponseProtoOrBuilder { + // Use StartLogSegmentResponseProto.newBuilder() to construct. + private StartLogSegmentResponseProto(Builder builder) { + super(builder); + } + private StartLogSegmentResponseProto(boolean noInit) {} + + private static final StartLogSegmentResponseProto defaultInstance; + public static StartLogSegmentResponseProto getDefaultInstance() { + return defaultInstance; + } + + public StartLogSegmentResponseProto getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.internal_static_StartLogSegmentResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.internal_static_StartLogSegmentResponseProto_fieldAccessorTable; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto)) { + return super.equals(obj); + } + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto other = (org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + @java.lang.Override + public int hashCode() { + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + return hash; + } + + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.internal_static_StartLogSegmentResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.internal_static_StartLogSegmentResponseProto_fieldAccessorTable; + } + + // Construct using org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto.getDescriptor(); + } + + public org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto getDefaultInstanceForType() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto.getDefaultInstance(); + } + + public org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto build() { + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto buildPartial() { + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto result = new org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto) { + return mergeFrom((org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto other) { + if (other == org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + } + } + } + + + // @@protoc_insertion_point(builder_scope:StartLogSegmentResponseProto) + } + + static { + defaultInstance = new StartLogSegmentResponseProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:StartLogSegmentResponseProto) + } + + public static abstract class JournalProtocolService + implements com.google.protobuf.Service { + protected JournalProtocolService() {} + + public interface Interface { + public abstract void journal( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto request, + com.google.protobuf.RpcCallback done); + + public abstract void startLogSegment( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto request, + com.google.protobuf.RpcCallback done); + + } + + public static com.google.protobuf.Service newReflectiveService( + final Interface impl) { + return new JournalProtocolService() { + @java.lang.Override + public void journal( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.journal(controller, request, done); + } + + @java.lang.Override + public void startLogSegment( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.startLogSegment(controller, request, done); + } + + }; + } + + public static com.google.protobuf.BlockingService + newReflectiveBlockingService(final BlockingInterface impl) { + return new com.google.protobuf.BlockingService() { + public final com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptorForType() { + return getDescriptor(); + } + + public final com.google.protobuf.Message callBlockingMethod( + com.google.protobuf.Descriptors.MethodDescriptor method, + com.google.protobuf.RpcController controller, + com.google.protobuf.Message request) + throws com.google.protobuf.ServiceException { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.callBlockingMethod() given method descriptor for " + + "wrong service type."); + } + switch(method.getIndex()) { + case 0: + return impl.journal(controller, (org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto)request); + case 1: + return impl.startLogSegment(controller, (org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto)request); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getRequestPrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getRequestPrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto.getDefaultInstance(); + case 1: + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getResponsePrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getResponsePrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto.getDefaultInstance(); + case 1: + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + }; + } + + public abstract void journal( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto request, + com.google.protobuf.RpcCallback done); + + public abstract void startLogSegment( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto request, + com.google.protobuf.RpcCallback done); + + public static final + com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptor() { + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.getDescriptor().getServices().get(0); + } + public final com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptorForType() { + return getDescriptor(); + } + + public final void callMethod( + com.google.protobuf.Descriptors.MethodDescriptor method, + com.google.protobuf.RpcController controller, + com.google.protobuf.Message request, + com.google.protobuf.RpcCallback< + com.google.protobuf.Message> done) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.callMethod() given method descriptor for wrong " + + "service type."); + } + switch(method.getIndex()) { + case 0: + this.journal(controller, (org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 1: + this.startLogSegment(controller, (org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getRequestPrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getRequestPrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto.getDefaultInstance(); + case 1: + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getResponsePrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getResponsePrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto.getDefaultInstance(); + case 1: + return org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public static Stub newStub( + com.google.protobuf.RpcChannel channel) { + return new Stub(channel); + } + + public static final class Stub extends org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalProtocolService implements Interface { + private Stub(com.google.protobuf.RpcChannel channel) { + this.channel = channel; + } + + private final com.google.protobuf.RpcChannel channel; + + public com.google.protobuf.RpcChannel getChannel() { + return channel; + } + + public void journal( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(0), + controller, + request, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto.class, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto.getDefaultInstance())); + } + + public void startLogSegment( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(1), + controller, + request, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto.class, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto.getDefaultInstance())); + } + } + + public static BlockingInterface newBlockingStub( + com.google.protobuf.BlockingRpcChannel channel) { + return new BlockingStub(channel); + } + + public interface BlockingInterface { + public org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto journal( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto startLogSegment( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto request) + throws com.google.protobuf.ServiceException; + } + + private static final class BlockingStub implements BlockingInterface { + private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) { + this.channel = channel; + } + + private final com.google.protobuf.BlockingRpcChannel channel; + + public org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto journal( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(0), + controller, + request, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto.getDefaultInstance()); + } + + + public org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto startLogSegment( + com.google.protobuf.RpcController controller, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(1), + controller, + request, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto.getDefaultInstance()); + } + + } + } + + private static com.google.protobuf.Descriptors.Descriptor + internal_static_JournalRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_JournalRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_JournalResponseProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_JournalResponseProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_StartLogSegmentRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_StartLogSegmentRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_StartLogSegmentResponseProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_StartLogSegmentResponseProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\025JournalProtocol.proto\032\nhdfs.proto\"}\n\023J" + + "ournalRequestProto\0220\n\014registration\030\001 \002(\013" + + "2\032.NamenodeRegistrationProto\022\022\n\nfirstTxn" + + "Id\030\002 \002(\004\022\017\n\007numTxns\030\003 \002(\r\022\017\n\007records\030\004 \002" + + "(\014\"\026\n\024JournalResponseProto\"]\n\033StartLogSe" + + "gmentRequestProto\0220\n\014registration\030\001 \002(\0132" + + "\032.NamenodeRegistrationProto\022\014\n\004txid\030\002 \002(" + + "\004\"\036\n\034StartLogSegmentResponseProto2\240\001\n\026Jo" + + "urnalProtocolService\0226\n\007journal\022\024.Journa" + + "lRequestProto\032\025.JournalResponseProto\022N\n\017", + "startLogSegment\022\034.StartLogSegmentRequest" + + "Proto\032\035.StartLogSegmentResponseProtoBD\n%" + + "org.apache.hadoop.hdfs.protocol.protoB\025J" + + "ournalProtocolProtos\210\001\001\240\001\001" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_JournalRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_JournalRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_JournalRequestProto_descriptor, + new java.lang.String[] { "Registration", "FirstTxnId", "NumTxns", "Records", }, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto.class, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalRequestProto.Builder.class); + internal_static_JournalResponseProto_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_JournalResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_JournalResponseProto_descriptor, + new java.lang.String[] { }, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto.class, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.JournalResponseProto.Builder.class); + internal_static_StartLogSegmentRequestProto_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_StartLogSegmentRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_StartLogSegmentRequestProto_descriptor, + new java.lang.String[] { "Registration", "Txid", }, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto.class, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentRequestProto.Builder.class); + internal_static_StartLogSegmentResponseProto_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_StartLogSegmentResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_StartLogSegmentResponseProto_descriptor, + new java.lang.String[] { }, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto.class, + org.apache.hadoop.hdfs.protocol.proto.JournalProtocolProtos.StartLogSegmentResponseProto.Builder.class); + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.getDescriptor(), + }, assigner); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/proto/JournalProtocol.proto b/hadoop-hdfs-project/hadoop-hdfs/src/proto/JournalProtocol.proto new file mode 100644 index 00000000000..fa7ed15c64a --- /dev/null +++ b/hadoop-hdfs-project/hadoop-hdfs/src/proto/JournalProtocol.proto @@ -0,0 +1,83 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file contains protocol buffers that are used throughout HDFS -- i.e. +// by the client, server, and data transfer protocols. + +option java_package = "org.apache.hadoop.hdfs.protocol.proto"; +option java_outer_classname = "JournalProtocolProtos"; +option java_generic_services = true; +option java_generate_equals_and_hash = true; + +import "hdfs.proto"; + +/** + * registration - the registration info of the active NameNode + * firstTxnId - the first txid in the rolled edit log + * numTxns - Number of transactions in editlog + * records - bytes containing serialized journal records + */ +message JournalRequestProto { + required NamenodeRegistrationProto registration = 1; // Registration info + required uint64 firstTxnId = 2; // Transaction ID + required uint32 numTxns = 3; // Transaction ID + required bytes records = 4; // Journal record +} + +/** + * void response + */ +message JournalResponseProto { +} + +/** + * registration - the registration info of the active NameNode + * txid - first txid in the new log + */ +message StartLogSegmentRequestProto { + required NamenodeRegistrationProto registration = 1; // Registration info + required uint64 txid = 2; // Transaction ID +} + +/** + * void response + */ +message StartLogSegmentResponseProto { +} + +/** + * Protocol used to journal edits to a remote node. Currently, + * this is used to publish edits from the NameNode to a BackupNode. + * + * See the request and response for details of rpc call. + */ +service JournalProtocolService { + /** + * Request sent by active namenode to backup node via + * EditLogBackupOutputStream to stream editlog records. + */ + rpc journal(JournalRequestProto) returns (JournalResponseProto); + + /** + * Request sent by active namenode to backup node to notify + * that the NameNode has rolled its edit logs and is now writing a + * new log segment. + */ + rpc startLogSegment(StartLogSegmentRequestProto) + returns (StartLogSegmentResponseProto); +} diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/proto/hdfs.proto b/hadoop-hdfs-project/hadoop-hdfs/src/proto/hdfs.proto index a77a7c312e8..8b86066980d 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/proto/hdfs.proto +++ b/hadoop-hdfs-project/hadoop-hdfs/src/proto/hdfs.proto @@ -53,6 +53,12 @@ message DatanodeIDProto { required uint32 ipcPort = 4; // the port where the ipc Server is running } +/** + * DatanodeID array + */ +message DatanodeIDsProto { + repeated DatanodeIDProto datanodes = 1; +} /** * The status of a Datanode @@ -76,7 +82,6 @@ message DatanodeInfoProto { optional AdminState adminState = 10; } - /** * Summary of a file or directory */ @@ -152,10 +157,10 @@ message HdfsFileStatusProto { required string group = 6; required uint64 modification_time = 7; required uint64 access_time = 8; - // + // Optional fields for symlink - optional bytes symlink = 9; // if symlink, target encoded java UTF8 - // + optional bytes symlink = 9; // if symlink, target encoded java UTF8 + // Optional fields for file optional uint32 block_replication = 10; // Actually a short - only 16bits used optional uint64 blocksize = 11; @@ -169,7 +174,7 @@ message FsServerDefaultsProto { required uint64 blockSize = 1; required uint32 bytesPerChecksum = 2; required uint32 writePacketSize = 3; - required uint32 replication = 4; // Actually a short - only 16bits used + required uint32 replication = 4; // Actually a short - only 16 bits used required uint32 fileBufferSize = 5; } @@ -187,5 +192,156 @@ message DirectoryListingProto { */ message UpgradeStatusReportProto { required uint32 version = 1;; - required uint32 upgradeStatus = 2; // Between 0 and 100 indicating the % complete + required uint32 upgradeStatus = 2; // % completed in range 0 & 100 } + +/** + * Common node information shared by all the nodes in the cluster + */ +message StorageInfoProto { + required uint32 layoutVersion = 1; // Layout version of the file system + required uint32 namespceID = 2; // File system namespace ID + required string clusterID = 3; // ID of the cluster + required uint64 cTime = 4; // File system creation time +} + +/** + * Information sent by a namenode to identify itself to the primary namenode. + */ +message NamenodeRegistrationProto { + required string rpcAddress = 1; // host:port of the namenode RPC address + required string httpAddress = 2; // host:port of the namenode http server + enum NamenodeRoleProto { + NAMENODE = 1; + BACKUP = 2; + CHECKPOINT = 3; + } + required StorageInfoProto storageInfo = 3; // Node information + optional NamenodeRoleProto role = 4; // Namenode role +} + +/** + * Unique signature to identify checkpoint transactions. + */ +message CheckpointSignatureProto { + required string blockPoolId = 1; + required uint64 mostRecentCheckpointTxId = 2; + required uint64 curSegmentTxId = 3; + required StorageInfoProto storageInfo = 4; +} + +/** + * Command sent from one namenode to another namenode. + */ +message NamenodeCommandProto { + enum Type { + NamenodeCommand = 0; // Base command + CheckPointCommand = 1; // Check point command + } + required uint32 action = 1; + required Type type = 2; + optional CheckpointCommandProto checkpointCmd = 3; +} + +/** + * Command returned from primary to checkpointing namenode. + * This command has checkpoint signature that identifies + * checkpoint transaction and is needed for further + * communication related to checkpointing. + */ +message CheckpointCommandProto { + // Unique signature to identify checkpoint transation + required CheckpointSignatureProto signature = 1; + + // If true, return transfer image to primary upon the completion of checkpoint + required bool needToReturnImage = 2; +} + +/** + * Block information + */ +message BlockProto { + required uint64 blockId = 1; + required uint64 genStamp = 2; + optional uint64 numBytes = 3; +} + +/** + * Block and datanodes where is it located + */ +message BlockWithLocationsProto { + required BlockProto block = 1; // Block + repeated DatanodeIDProto datanodeIDs = 2; // Datanodes with replicas of the block +} + +/** + * List of block with locations + */ +message BlocksWithLocationsProto { + repeated BlockWithLocationsProto blocks = 1; +} + +/** + * Editlog information with available transactions + */ +message RemoteEditLogProto { + required uint64 startTxId = 1; // Starting available edit log transaction + required uint64 endTxId = 2; // Ending available edit log transaction +} + +/** + * Enumeration of editlogs available on a remote namenode + */ +message RemoteEditLogManifestProto { + repeated RemoteEditLogProto logs = 1; +} + +/** + * Namespace information that describes namespace on a namenode + */ +message NamespaceInfoProto { + required string buildVersion = 1; // Software build version + required uint32 distUpgradeVersion = 2; // Distributed upgrade version + required string blockPoolID = 3; // block pool used by the namespace + required StorageInfoProto storageInfo = 4;// Noe information +} + +/** + * Block access token information + */ +message BlockKeyProto { + required uint32 keyId = 1; // Key identifier + required uint64 expiryDate = 2; // Expiry time in milliseconds + required bytes keyBytes = 3; // Key secret +} + +/** + * Current key and set of block keys at the namenode. + */ +message ExportedBlockKeysProto { + required bool isBlockTokenEnabled = 1; + required uint64 keyUpdateInterval = 2; + required uint64 tokenLifeTime = 3; + required BlockKeyProto currentKey = 4; + repeated BlockKeyProto allKeys = 5; +} + +/** + * State of a block replica at a datanode + */ +enum ReplicaState { + FINALIZED = 0; // State of a replica when it is not modified + RBW = 1; // State of replica that is being written to + RWR = 2; // State of replica that is waiting to be recovered + RUR = 3; // State of replica that is under recovery + TEMPORARY = 4; // State of replica that is created for replication +} + +/** + * Block that needs to be recovered with at a given location + */ +message RecoveringBlockProto { + required uint64 newGenStamp = 1; // New genstamp post recovery + required LocatedBlockProto block = 2; // Block to be recovered +} +