bookkeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject [3/4] bookkeeper git commit: BOOKKEEPER-937: Upgrade protobuf to 2.6
Date Tue, 16 Aug 2016 17:42:21 GMT
http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/28f23e80/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookkeeperProtocol.java
----------------------------------------------------------------------
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookkeeperProtocol.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookkeeperProtocol.java
index 7fbb2cd..9156751 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookkeeperProtocol.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookkeeperProtocol.java
@@ -8,20 +8,46 @@ public final class BookkeeperProtocol {
   public static void registerAllExtensions(
       com.google.protobuf.ExtensionRegistry registry) {
   }
+  /**
+   * Protobuf enum {@code ProtocolVersion}
+   *
+   * <pre>
+   **
+   * Protocol Versions.
+   * </pre>
+   */
   public enum ProtocolVersion
       implements com.google.protobuf.ProtocolMessageEnum {
+    /**
+     * <code>VERSION_ONE = 1;</code>
+     */
     VERSION_ONE(0, 1),
+    /**
+     * <code>VERSION_TWO = 2;</code>
+     */
     VERSION_TWO(1, 2),
+    /**
+     * <code>VERSION_THREE = 3;</code>
+     */
     VERSION_THREE(2, 3),
     ;
-    
+
+    /**
+     * <code>VERSION_ONE = 1;</code>
+     */
     public static final int VERSION_ONE_VALUE = 1;
+    /**
+     * <code>VERSION_TWO = 2;</code>
+     */
     public static final int VERSION_TWO_VALUE = 2;
+    /**
+     * <code>VERSION_THREE = 3;</code>
+     */
     public static final int VERSION_THREE_VALUE = 3;
-    
-    
+
+
     public final int getNumber() { return value; }
-    
+
     public static ProtocolVersion valueOf(int value) {
       switch (value) {
         case 1: return VERSION_ONE;
@@ -30,7 +56,7 @@ public final class BookkeeperProtocol {
         default: return null;
       }
     }
-    
+
     public static com.google.protobuf.Internal.EnumLiteMap<ProtocolVersion>
         internalGetValueMap() {
       return internalValueMap;
@@ -42,7 +68,7 @@ public final class BookkeeperProtocol {
               return ProtocolVersion.valueOf(number);
             }
           };
-    
+
     public final com.google.protobuf.Descriptors.EnumValueDescriptor
         getValueDescriptor() {
       return getDescriptor().getValues().get(index);
@@ -55,11 +81,9 @@ public final class BookkeeperProtocol {
         getDescriptor() {
       return org.apache.bookkeeper.proto.BookkeeperProtocol.getDescriptor().getEnumTypes().get(0);
     }
-    
-    private static final ProtocolVersion[] VALUES = {
-      VERSION_ONE, VERSION_TWO, VERSION_THREE, 
-    };
-    
+
+    private static final ProtocolVersion[] VALUES = values();
+
     public static ProtocolVersion valueOf(
         com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
       if (desc.getType() != getDescriptor()) {
@@ -68,44 +92,122 @@ public final class BookkeeperProtocol {
       }
       return VALUES[desc.getIndex()];
     }
-    
+
     private final int index;
     private final int value;
-    
+
     private ProtocolVersion(int index, int value) {
       this.index = index;
       this.value = value;
     }
-    
+
     // @@protoc_insertion_point(enum_scope:ProtocolVersion)
   }
-  
+
+  /**
+   * Protobuf enum {@code StatusCode}
+   *
+   * <pre>
+   **
+   * Status codes.
+   * </pre>
+   */
   public enum StatusCode
       implements com.google.protobuf.ProtocolMessageEnum {
+    /**
+     * <code>EOK = 0;</code>
+     */
     EOK(0, 0),
+    /**
+     * <code>ENOLEDGER = 402;</code>
+     *
+     * <pre>
+     * Server side Errors 4xx
+     * </pre>
+     */
     ENOLEDGER(1, 402),
+    /**
+     * <code>ENOENTRY = 403;</code>
+     */
     ENOENTRY(2, 403),
+    /**
+     * <code>EBADREQ = 404;</code>
+     */
     EBADREQ(3, 404),
+    /**
+     * <code>EIO = 501;</code>
+     *
+     * <pre>
+     * IO/access errors 5xx
+     * </pre>
+     */
     EIO(4, 501),
+    /**
+     * <code>EUA = 502;</code>
+     */
     EUA(5, 502),
+    /**
+     * <code>EBADVERSION = 503;</code>
+     */
     EBADVERSION(6, 503),
+    /**
+     * <code>EFENCED = 504;</code>
+     */
     EFENCED(7, 504),
+    /**
+     * <code>EREADONLY = 505;</code>
+     */
     EREADONLY(8, 505),
     ;
-    
+
+    /**
+     * <code>EOK = 0;</code>
+     */
     public static final int EOK_VALUE = 0;
+    /**
+     * <code>ENOLEDGER = 402;</code>
+     *
+     * <pre>
+     * Server side Errors 4xx
+     * </pre>
+     */
     public static final int ENOLEDGER_VALUE = 402;
+    /**
+     * <code>ENOENTRY = 403;</code>
+     */
     public static final int ENOENTRY_VALUE = 403;
+    /**
+     * <code>EBADREQ = 404;</code>
+     */
     public static final int EBADREQ_VALUE = 404;
+    /**
+     * <code>EIO = 501;</code>
+     *
+     * <pre>
+     * IO/access errors 5xx
+     * </pre>
+     */
     public static final int EIO_VALUE = 501;
+    /**
+     * <code>EUA = 502;</code>
+     */
     public static final int EUA_VALUE = 502;
+    /**
+     * <code>EBADVERSION = 503;</code>
+     */
     public static final int EBADVERSION_VALUE = 503;
+    /**
+     * <code>EFENCED = 504;</code>
+     */
     public static final int EFENCED_VALUE = 504;
+    /**
+     * <code>EREADONLY = 505;</code>
+     */
     public static final int EREADONLY_VALUE = 505;
-    
-    
+
+
     public final int getNumber() { return value; }
-    
+
     public static StatusCode valueOf(int value) {
       switch (value) {
         case 0: return EOK;
@@ -120,7 +222,7 @@ public final class BookkeeperProtocol {
         default: return null;
       }
     }
-    
+
     public static com.google.protobuf.Internal.EnumLiteMap<StatusCode>
         internalGetValueMap() {
       return internalValueMap;
@@ -132,7 +234,7 @@ public final class BookkeeperProtocol {
               return StatusCode.valueOf(number);
             }
           };
-    
+
     public final com.google.protobuf.Descriptors.EnumValueDescriptor
         getValueDescriptor() {
       return getDescriptor().getValues().get(index);
@@ -145,11 +247,9 @@ public final class BookkeeperProtocol {
         getDescriptor() {
       return org.apache.bookkeeper.proto.BookkeeperProtocol.getDescriptor().getEnumTypes().get(1);
     }
-    
-    private static final StatusCode[] VALUES = {
-      EOK, ENOLEDGER, ENOENTRY, EBADREQ, EIO, EUA, EBADVERSION, EFENCED, EREADONLY, 
-    };
-    
+
+    private static final StatusCode[] VALUES = values();
+
     public static StatusCode valueOf(
         com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
       if (desc.getType() != getDescriptor()) {
@@ -158,36 +258,82 @@ public final class BookkeeperProtocol {
       }
       return VALUES[desc.getIndex()];
     }
-    
+
     private final int index;
     private final int value;
-    
+
     private StatusCode(int index, int value) {
       this.index = index;
       this.value = value;
     }
-    
+
     // @@protoc_insertion_point(enum_scope:StatusCode)
   }
-  
+
+  /**
+   * Protobuf enum {@code OperationType}
+   *
+   * <pre>
+   **
+   * Supported operations by this protocol.
+   * </pre>
+   */
   public enum OperationType
       implements com.google.protobuf.ProtocolMessageEnum {
+    /**
+     * <code>READ_ENTRY = 1;</code>
+     */
     READ_ENTRY(0, 1),
+    /**
+     * <code>ADD_ENTRY = 2;</code>
+     */
     ADD_ENTRY(1, 2),
+    /**
+     * <code>RANGE_READ_ENTRY = 3;</code>
+     *
+     * <pre>
+     * Not supported yet.
+     * </pre>
+     */
     RANGE_READ_ENTRY(2, 3),
+    /**
+     * <code>RANGE_ADD_ENTRY = 4;</code>
+     */
     RANGE_ADD_ENTRY(3, 4),
+    /**
+     * <code>AUTH = 5;</code>
+     */
     AUTH(4, 5),
     ;
-    
+
+    /**
+     * <code>READ_ENTRY = 1;</code>
+     */
     public static final int READ_ENTRY_VALUE = 1;
+    /**
+     * <code>ADD_ENTRY = 2;</code>
+     */
     public static final int ADD_ENTRY_VALUE = 2;
+    /**
+     * <code>RANGE_READ_ENTRY = 3;</code>
+     *
+     * <pre>
+     * Not supported yet.
+     * </pre>
+     */
     public static final int RANGE_READ_ENTRY_VALUE = 3;
+    /**
+     * <code>RANGE_ADD_ENTRY = 4;</code>
+     */
     public static final int RANGE_ADD_ENTRY_VALUE = 4;
+    /**
+     * <code>AUTH = 5;</code>
+     */
     public static final int AUTH_VALUE = 5;
-    
-    
+
+
     public final int getNumber() { return value; }
-    
+
     public static OperationType valueOf(int value) {
       switch (value) {
         case 1: return READ_ENTRY;
@@ -198,7 +344,7 @@ public final class BookkeeperProtocol {
         default: return null;
       }
     }
-    
+
     public static com.google.protobuf.Internal.EnumLiteMap<OperationType>
         internalGetValueMap() {
       return internalValueMap;
@@ -210,7 +356,7 @@ public final class BookkeeperProtocol {
               return OperationType.valueOf(number);
             }
           };
-    
+
     public final com.google.protobuf.Descriptors.EnumValueDescriptor
         getValueDescriptor() {
       return getDescriptor().getValues().get(index);
@@ -223,11 +369,9 @@ public final class BookkeeperProtocol {
         getDescriptor() {
       return org.apache.bookkeeper.proto.BookkeeperProtocol.getDescriptor().getEnumTypes().get(2);
     }
-    
-    private static final OperationType[] VALUES = {
-      READ_ENTRY, ADD_ENTRY, RANGE_READ_ENTRY, RANGE_ADD_ENTRY, AUTH, 
-    };
-    
+
+    private static final OperationType[] VALUES = values();
+
     public static OperationType valueOf(
         com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
       if (desc.getType() != getDescriptor()) {
@@ -236,92 +380,218 @@ public final class BookkeeperProtocol {
       }
       return VALUES[desc.getIndex()];
     }
-    
+
     private final int index;
     private final int value;
-    
+
     private OperationType(int index, int value) {
       this.index = index;
       this.value = value;
     }
-    
+
     // @@protoc_insertion_point(enum_scope:OperationType)
   }
-  
-  public interface BKPacketHeaderOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
-    
-    // required .ProtocolVersion version = 1;
+
+  public interface BKPacketHeaderOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:BKPacketHeader)
+      com.google.protobuf.MessageOrBuilder {
+
+    /**
+     * <code>required .ProtocolVersion version = 1;</code>
+     */
     boolean hasVersion();
+    /**
+     * <code>required .ProtocolVersion version = 1;</code>
+     */
     org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion getVersion();
-    
-    // required .OperationType operation = 2;
+
+    /**
+     * <code>required .OperationType operation = 2;</code>
+     */
     boolean hasOperation();
+    /**
+     * <code>required .OperationType operation = 2;</code>
+     */
     org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType getOperation();
-    
-    // required uint64 txnId = 3;
+
+    /**
+     * <code>required uint64 txnId = 3;</code>
+     */
     boolean hasTxnId();
+    /**
+     * <code>required uint64 txnId = 3;</code>
+     */
     long getTxnId();
   }
+  /**
+   * Protobuf type {@code BKPacketHeader}
+   *
+   * <pre>
+   **
+   * Packet header for all requests.
+   * </pre>
+   */
   public static final class BKPacketHeader extends
-      com.google.protobuf.GeneratedMessage
-      implements BKPacketHeaderOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:BKPacketHeader)
+      BKPacketHeaderOrBuilder {
     // Use BKPacketHeader.newBuilder() to construct.
-    private BKPacketHeader(Builder builder) {
+    private BKPacketHeader(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
+      this.unknownFields = builder.getUnknownFields();
     }
-    private BKPacketHeader(boolean noInit) {}
-    
+    private BKPacketHeader(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
     private static final BKPacketHeader defaultInstance;
     public static BKPacketHeader getDefaultInstance() {
       return defaultInstance;
     }
-    
+
     public BKPacketHeader getDefaultInstanceForType() {
       return defaultInstance;
     }
-    
+
+    private final com.google.protobuf.UnknownFieldSet unknownFields;
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+        getUnknownFields() {
+      return this.unknownFields;
+    }
+    private BKPacketHeader(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 8: {
+              int rawValue = input.readEnum();
+              org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion value = org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion.valueOf(rawValue);
+              if (value == null) {
+                unknownFields.mergeVarintField(1, rawValue);
+              } else {
+                bitField0_ |= 0x00000001;
+                version_ = value;
+              }
+              break;
+            }
+            case 16: {
+              int rawValue = input.readEnum();
+              org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType value = org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType.valueOf(rawValue);
+              if (value == null) {
+                unknownFields.mergeVarintField(2, rawValue);
+              } else {
+                bitField0_ |= 0x00000002;
+                operation_ = value;
+              }
+              break;
+            }
+            case 24: {
+              bitField0_ |= 0x00000004;
+              txnId_ = input.readUInt64();
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_BKPacketHeader_descriptor;
     }
-    
+
     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
-      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_BKPacketHeader_fieldAccessorTable;
+      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_BKPacketHeader_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.class, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder.class);
+    }
+
+    public static com.google.protobuf.Parser<BKPacketHeader> PARSER =
+        new com.google.protobuf.AbstractParser<BKPacketHeader>() {
+      public BKPacketHeader parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new BKPacketHeader(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<BKPacketHeader> getParserForType() {
+      return PARSER;
     }
-    
+
     private int bitField0_;
-    // required .ProtocolVersion version = 1;
     public static final int VERSION_FIELD_NUMBER = 1;
     private org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion version_;
+    /**
+     * <code>required .ProtocolVersion version = 1;</code>
+     */
     public boolean hasVersion() {
       return ((bitField0_ & 0x00000001) == 0x00000001);
     }
+    /**
+     * <code>required .ProtocolVersion version = 1;</code>
+     */
     public org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion getVersion() {
       return version_;
     }
-    
-    // required .OperationType operation = 2;
+
     public static final int OPERATION_FIELD_NUMBER = 2;
     private org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType operation_;
+    /**
+     * <code>required .OperationType operation = 2;</code>
+     */
     public boolean hasOperation() {
       return ((bitField0_ & 0x00000002) == 0x00000002);
     }
+    /**
+     * <code>required .OperationType operation = 2;</code>
+     */
     public org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType getOperation() {
       return operation_;
     }
-    
-    // required uint64 txnId = 3;
+
     public static final int TXNID_FIELD_NUMBER = 3;
     private long txnId_;
+    /**
+     * <code>required uint64 txnId = 3;</code>
+     */
     public boolean hasTxnId() {
       return ((bitField0_ & 0x00000004) == 0x00000004);
     }
+    /**
+     * <code>required uint64 txnId = 3;</code>
+     */
     public long getTxnId() {
       return txnId_;
     }
-    
+
     private void initFields() {
       version_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion.VERSION_ONE;
       operation_ = org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType.READ_ENTRY;
@@ -330,8 +600,9 @@ public final class BookkeeperProtocol {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
-      
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
       if (!hasVersion()) {
         memoizedIsInitialized = 0;
         return false;
@@ -347,7 +618,7 @@ public final class BookkeeperProtocol {
       memoizedIsInitialized = 1;
       return true;
     }
-    
+
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
@@ -362,12 +633,12 @@ public final class BookkeeperProtocol {
       }
       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
@@ -385,113 +656,111 @@ public final class BookkeeperProtocol {
       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();
     }
-    
+
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader 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;
-      }
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
-    
+
     public static Builder newBuilder() { return Builder.create(); }
     public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder(org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader 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;
     }
+    /**
+     * Protobuf type {@code BKPacketHeader}
+     *
+     * <pre>
+     **
+     * Packet header for all requests.
+     * </pre>
+     */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:BKPacketHeader)
+        org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_BKPacketHeader_descriptor;
       }
-      
+
       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
-        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_BKPacketHeader_fieldAccessorTable;
+        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_BKPacketHeader_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.class, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder.class);
       }
-      
+
       // Construct using org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
-      
-      private Builder(BuilderParent parent) {
+
+      private Builder(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
         maybeForceBuilderInitialization();
       }
@@ -502,7 +771,7 @@ public final class BookkeeperProtocol {
       private static Builder create() {
         return new Builder();
       }
-      
+
       public Builder clear() {
         super.clear();
         version_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion.VERSION_ONE;
@@ -513,20 +782,20 @@ public final class BookkeeperProtocol {
         bitField0_ = (bitField0_ & ~0x00000004);
         return this;
       }
-      
+
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
-      
+
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
-        return org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDescriptor();
+        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_BKPacketHeader_descriptor;
       }
-      
+
       public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader getDefaultInstanceForType() {
         return org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
       }
-      
+
       public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader build() {
         org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader result = buildPartial();
         if (!result.isInitialized()) {
@@ -534,17 +803,7 @@ public final class BookkeeperProtocol {
         }
         return result;
       }
-      
-      private org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader buildParsed()
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(
-            result).asInvalidProtocolBufferException();
-        }
-        return result;
-      }
-      
+
       public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader buildPartial() {
         org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader result = new org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader(this);
         int from_bitField0_ = bitField0_;
@@ -565,7 +824,7 @@ public final class BookkeeperProtocol {
         onBuilt();
         return result;
       }
-      
+
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader) {
           return mergeFrom((org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader)other);
@@ -574,7 +833,7 @@ public final class BookkeeperProtocol {
           return this;
         }
       }
-      
+
       public Builder mergeFrom(org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader other) {
         if (other == org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance()) return this;
         if (other.hasVersion()) {
@@ -589,7 +848,7 @@ public final class BookkeeperProtocol {
         this.mergeUnknownFields(other.getUnknownFields());
         return this;
       }
-      
+
       public final boolean isInitialized() {
         if (!hasVersion()) {
           
@@ -605,71 +864,42 @@ public final class BookkeeperProtocol {
         }
         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: {
-              int rawValue = input.readEnum();
-              org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion value = org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion.valueOf(rawValue);
-              if (value == null) {
-                unknownFields.mergeVarintField(1, rawValue);
-              } else {
-                bitField0_ |= 0x00000001;
-                version_ = value;
-              }
-              break;
-            }
-            case 16: {
-              int rawValue = input.readEnum();
-              org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType value = org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType.valueOf(rawValue);
-              if (value == null) {
-                unknownFields.mergeVarintField(2, rawValue);
-              } else {
-                bitField0_ |= 0x00000002;
-                operation_ = value;
-              }
-              break;
-            }
-            case 24: {
-              bitField0_ |= 0x00000004;
-              txnId_ = input.readUInt64();
-              break;
-            }
+        org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
           }
         }
+        return this;
       }
-      
       private int bitField0_;
-      
-      // required .ProtocolVersion version = 1;
+
       private org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion version_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion.VERSION_ONE;
+      /**
+       * <code>required .ProtocolVersion version = 1;</code>
+       */
       public boolean hasVersion() {
         return ((bitField0_ & 0x00000001) == 0x00000001);
       }
+      /**
+       * <code>required .ProtocolVersion version = 1;</code>
+       */
       public org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion getVersion() {
         return version_;
       }
+      /**
+       * <code>required .ProtocolVersion version = 1;</code>
+       */
       public Builder setVersion(org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion value) {
         if (value == null) {
           throw new NullPointerException();
@@ -679,21 +909,32 @@ public final class BookkeeperProtocol {
         onChanged();
         return this;
       }
+      /**
+       * <code>required .ProtocolVersion version = 1;</code>
+       */
       public Builder clearVersion() {
         bitField0_ = (bitField0_ & ~0x00000001);
         version_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion.VERSION_ONE;
         onChanged();
         return this;
       }
-      
-      // required .OperationType operation = 2;
+
       private org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType operation_ = org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType.READ_ENTRY;
+      /**
+       * <code>required .OperationType operation = 2;</code>
+       */
       public boolean hasOperation() {
         return ((bitField0_ & 0x00000002) == 0x00000002);
       }
+      /**
+       * <code>required .OperationType operation = 2;</code>
+       */
       public org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType getOperation() {
         return operation_;
       }
+      /**
+       * <code>required .OperationType operation = 2;</code>
+       */
       public Builder setOperation(org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType value) {
         if (value == null) {
           throw new NullPointerException();
@@ -703,149 +944,367 @@ public final class BookkeeperProtocol {
         onChanged();
         return this;
       }
+      /**
+       * <code>required .OperationType operation = 2;</code>
+       */
       public Builder clearOperation() {
         bitField0_ = (bitField0_ & ~0x00000002);
         operation_ = org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType.READ_ENTRY;
         onChanged();
         return this;
       }
-      
-      // required uint64 txnId = 3;
+
       private long txnId_ ;
+      /**
+       * <code>required uint64 txnId = 3;</code>
+       */
       public boolean hasTxnId() {
         return ((bitField0_ & 0x00000004) == 0x00000004);
       }
+      /**
+       * <code>required uint64 txnId = 3;</code>
+       */
       public long getTxnId() {
         return txnId_;
       }
+      /**
+       * <code>required uint64 txnId = 3;</code>
+       */
       public Builder setTxnId(long value) {
         bitField0_ |= 0x00000004;
         txnId_ = value;
         onChanged();
         return this;
       }
+      /**
+       * <code>required uint64 txnId = 3;</code>
+       */
       public Builder clearTxnId() {
         bitField0_ = (bitField0_ & ~0x00000004);
         txnId_ = 0L;
         onChanged();
         return this;
       }
-      
+
       // @@protoc_insertion_point(builder_scope:BKPacketHeader)
     }
-    
+
     static {
       defaultInstance = new BKPacketHeader(true);
       defaultInstance.initFields();
     }
-    
+
     // @@protoc_insertion_point(class_scope:BKPacketHeader)
   }
-  
-  public interface RequestOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
-    
-    // required .BKPacketHeader header = 1;
+
+  public interface RequestOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:Request)
+      com.google.protobuf.MessageOrBuilder {
+
+    /**
+     * <code>required .BKPacketHeader header = 1;</code>
+     */
     boolean hasHeader();
+    /**
+     * <code>required .BKPacketHeader header = 1;</code>
+     */
     org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader getHeader();
+    /**
+     * <code>required .BKPacketHeader header = 1;</code>
+     */
     org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder getHeaderOrBuilder();
-    
-    // optional .ReadRequest readRequest = 100;
+
+    /**
+     * <code>optional .ReadRequest readRequest = 100;</code>
+     *
+     * <pre>
+     * Requests
+     * </pre>
+     */
     boolean hasReadRequest();
+    /**
+     * <code>optional .ReadRequest readRequest = 100;</code>
+     *
+     * <pre>
+     * Requests
+     * </pre>
+     */
     org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest getReadRequest();
+    /**
+     * <code>optional .ReadRequest readRequest = 100;</code>
+     *
+     * <pre>
+     * Requests
+     * </pre>
+     */
     org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder getReadRequestOrBuilder();
-    
-    // optional .AddRequest addRequest = 101;
+
+    /**
+     * <code>optional .AddRequest addRequest = 101;</code>
+     */
     boolean hasAddRequest();
+    /**
+     * <code>optional .AddRequest addRequest = 101;</code>
+     */
     org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest getAddRequest();
+    /**
+     * <code>optional .AddRequest addRequest = 101;</code>
+     */
     org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder getAddRequestOrBuilder();
-    
-    // optional .AuthMessage authRequest = 102;
+
+    /**
+     * <code>optional .AuthMessage authRequest = 102;</code>
+     */
     boolean hasAuthRequest();
+    /**
+     * <code>optional .AuthMessage authRequest = 102;</code>
+     */
     org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage getAuthRequest();
+    /**
+     * <code>optional .AuthMessage authRequest = 102;</code>
+     */
     org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder getAuthRequestOrBuilder();
   }
+  /**
+   * Protobuf type {@code Request}
+   */
   public static final class Request extends
-      com.google.protobuf.GeneratedMessage
-      implements RequestOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:Request)
+      RequestOrBuilder {
     // Use Request.newBuilder() to construct.
-    private Request(Builder builder) {
+    private Request(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
+      this.unknownFields = builder.getUnknownFields();
     }
-    private Request(boolean noInit) {}
-    
+    private Request(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
     private static final Request defaultInstance;
     public static Request getDefaultInstance() {
       return defaultInstance;
     }
-    
+
     public Request getDefaultInstanceForType() {
       return defaultInstance;
     }
-    
+
+    private final com.google.protobuf.UnknownFieldSet unknownFields;
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+        getUnknownFields() {
+      return this.unknownFields;
+    }
+    private Request(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 10: {
+              org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000001) == 0x00000001)) {
+                subBuilder = header_.toBuilder();
+              }
+              header_ = input.readMessage(org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(header_);
+                header_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000001;
+              break;
+            }
+            case 802: {
+              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000002) == 0x00000002)) {
+                subBuilder = readRequest_.toBuilder();
+              }
+              readRequest_ = input.readMessage(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(readRequest_);
+                readRequest_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000002;
+              break;
+            }
+            case 810: {
+              org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000004) == 0x00000004)) {
+                subBuilder = addRequest_.toBuilder();
+              }
+              addRequest_ = input.readMessage(org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(addRequest_);
+                addRequest_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000004;
+              break;
+            }
+            case 818: {
+              org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000008) == 0x00000008)) {
+                subBuilder = authRequest_.toBuilder();
+              }
+              authRequest_ = input.readMessage(org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(authRequest_);
+                authRequest_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000008;
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Request_descriptor;
     }
-    
+
     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
-      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Request_fieldAccessorTable;
+      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Request_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              org.apache.bookkeeper.proto.BookkeeperProtocol.Request.class, org.apache.bookkeeper.proto.BookkeeperProtocol.Request.Builder.class);
+    }
+
+    public static com.google.protobuf.Parser<Request> PARSER =
+        new com.google.protobuf.AbstractParser<Request>() {
+      public Request parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new Request(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<Request> getParserForType() {
+      return PARSER;
     }
-    
+
     private int bitField0_;
-    // required .BKPacketHeader header = 1;
     public static final int HEADER_FIELD_NUMBER = 1;
     private org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader header_;
+    /**
+     * <code>required .BKPacketHeader header = 1;</code>
+     */
     public boolean hasHeader() {
       return ((bitField0_ & 0x00000001) == 0x00000001);
     }
+    /**
+     * <code>required .BKPacketHeader header = 1;</code>
+     */
     public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader getHeader() {
       return header_;
     }
+    /**
+     * <code>required .BKPacketHeader header = 1;</code>
+     */
     public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder getHeaderOrBuilder() {
       return header_;
     }
-    
-    // optional .ReadRequest readRequest = 100;
+
     public static final int READREQUEST_FIELD_NUMBER = 100;
     private org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest readRequest_;
+    /**
+     * <code>optional .ReadRequest readRequest = 100;</code>
+     *
+     * <pre>
+     * Requests
+     * </pre>
+     */
     public boolean hasReadRequest() {
       return ((bitField0_ & 0x00000002) == 0x00000002);
     }
+    /**
+     * <code>optional .ReadRequest readRequest = 100;</code>
+     *
+     * <pre>
+     * Requests
+     * </pre>
+     */
     public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest getReadRequest() {
       return readRequest_;
     }
+    /**
+     * <code>optional .ReadRequest readRequest = 100;</code>
+     *
+     * <pre>
+     * Requests
+     * </pre>
+     */
     public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder getReadRequestOrBuilder() {
       return readRequest_;
     }
-    
-    // optional .AddRequest addRequest = 101;
+
     public static final int ADDREQUEST_FIELD_NUMBER = 101;
     private org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest addRequest_;
+    /**
+     * <code>optional .AddRequest addRequest = 101;</code>
+     */
     public boolean hasAddRequest() {
       return ((bitField0_ & 0x00000004) == 0x00000004);
     }
+    /**
+     * <code>optional .AddRequest addRequest = 101;</code>
+     */
     public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest getAddRequest() {
       return addRequest_;
     }
+    /**
+     * <code>optional .AddRequest addRequest = 101;</code>
+     */
     public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder getAddRequestOrBuilder() {
       return addRequest_;
     }
-    
-    // optional .AuthMessage authRequest = 102;
+
     public static final int AUTHREQUEST_FIELD_NUMBER = 102;
     private org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage authRequest_;
+    /**
+     * <code>optional .AuthMessage authRequest = 102;</code>
+     */
     public boolean hasAuthRequest() {
       return ((bitField0_ & 0x00000008) == 0x00000008);
     }
+    /**
+     * <code>optional .AuthMessage authRequest = 102;</code>
+     */
     public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage getAuthRequest() {
       return authRequest_;
     }
+    /**
+     * <code>optional .AuthMessage authRequest = 102;</code>
+     */
     public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder getAuthRequestOrBuilder() {
       return authRequest_;
     }
-    
+
     private void initFields() {
       header_ = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
       readRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDefaultInstance();
@@ -855,8 +1314,9 @@ public final class BookkeeperProtocol {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
-      
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
       if (!hasHeader()) {
         memoizedIsInitialized = 0;
         return false;
@@ -886,7 +1346,7 @@ public final class BookkeeperProtocol {
       memoizedIsInitialized = 1;
       return true;
     }
-    
+
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
@@ -904,12 +1364,12 @@ public final class BookkeeperProtocol {
       }
       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
@@ -931,113 +1391,106 @@ public final class BookkeeperProtocol {
       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();
     }
-    
+
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request 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;
-      }
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
-    
+
     public static Builder newBuilder() { return Builder.create(); }
     public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder(org.apache.bookkeeper.proto.BookkeeperProtocol.Request 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;
     }
+    /**
+     * Protobuf type {@code Request}
+     */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.apache.bookkeeper.proto.BookkeeperProtocol.RequestOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:Request)
+        org.apache.bookkeeper.proto.BookkeeperProtocol.RequestOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Request_descriptor;
       }
-      
+
       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
-        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Request_fieldAccessorTable;
+        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Request_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                org.apache.bookkeeper.proto.BookkeeperProtocol.Request.class, org.apache.bookkeeper.proto.BookkeeperProtocol.Request.Builder.class);
       }
-      
+
       // Construct using org.apache.bookkeeper.proto.BookkeeperProtocol.Request.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
-      
-      private Builder(BuilderParent parent) {
+
+      private Builder(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
         maybeForceBuilderInitialization();
       }
@@ -1052,7 +1505,7 @@ public final class BookkeeperProtocol {
       private static Builder create() {
         return new Builder();
       }
-      
+
       public Builder clear() {
         super.clear();
         if (headerBuilder_ == null) {
@@ -1081,20 +1534,20 @@ public final class BookkeeperProtocol {
         bitField0_ = (bitField0_ & ~0x00000008);
         return this;
       }
-      
+
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
-      
+
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
-        return org.apache.bookkeeper.proto.BookkeeperProtocol.Request.getDescriptor();
+        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Request_descriptor;
       }
-      
+
       public org.apache.bookkeeper.proto.BookkeeperProtocol.Request getDefaultInstanceForType() {
         return org.apache.bookkeeper.proto.BookkeeperProtocol.Request.getDefaultInstance();
       }
-      
+
       public org.apache.bookkeeper.proto.BookkeeperProtocol.Request build() {
         org.apache.bookkeeper.proto.BookkeeperProtocol.Request result = buildPartial();
         if (!result.isInitialized()) {
@@ -1102,17 +1555,7 @@ public final class BookkeeperProtocol {
         }
         return result;
       }
-      
-      private org.apache.bookkeeper.proto.BookkeeperProtocol.Request buildParsed()
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        org.apache.bookkeeper.proto.BookkeeperProtocol.Request result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(
-            result).asInvalidProtocolBufferException();
-        }
-        return result;
-      }
-      
+
       public org.apache.bookkeeper.proto.BookkeeperProtocol.Request buildPartial() {
         org.apache.bookkeeper.proto.BookkeeperProtocol.Request result = new org.apache.bookkeeper.proto.BookkeeperProtocol.Request(this);
         int from_bitField0_ = bitField0_;
@@ -1153,7 +1596,7 @@ public final class BookkeeperProtocol {
         onBuilt();
         return result;
       }
-      
+
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof org.apache.bookkeeper.proto.BookkeeperProtocol.Request) {
           return mergeFrom((org.apache.bookkeeper.proto.BookkeeperProtocol.Request)other);
@@ -1162,7 +1605,7 @@ public final class BookkeeperProtocol {
           return this;
         }
       }
-      
+
       public Builder mergeFrom(org.apache.bookkeeper.proto.BookkeeperProtocol.Request other) {
         if (other == org.apache.bookkeeper.proto.BookkeeperProtocol.Request.getDefaultInstance()) return this;
         if (other.hasHeader()) {
@@ -1180,7 +1623,7 @@ public final class BookkeeperProtocol {
         this.mergeUnknownFields(other.getUnknownFields());
         return this;
       }
-      
+
       public final boolean isInitialized() {
         if (!hasHeader()) {
           
@@ -1210,79 +1653,38 @@ public final class BookkeeperProtocol {
         }
         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.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder subBuilder = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.newBuilder();
-              if (hasHeader()) {
-                subBuilder.mergeFrom(getHeader());
-              }
-              input.readMessage(subBuilder, extensionRegistry);
-              setHeader(subBuilder.buildPartial());
-              break;
-            }
-            case 802: {
-              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder subBuilder = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.newBuilder();
-              if (hasReadRequest()) {
-                subBuilder.mergeFrom(getReadRequest());
-              }
-              input.readMessage(subBuilder, extensionRegistry);
-              setReadRequest(subBuilder.buildPartial());
-              break;
-            }
-            case 810: {
-              org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder subBuilder = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.newBuilder();
-              if (hasAddRequest()) {
-                subBuilder.mergeFrom(getAddRequest());
-              }
-              input.readMessage(subBuilder, extensionRegistry);
-              setAddRequest(subBuilder.buildPartial());
-              break;
-            }
-            case 818: {
-              org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder subBuilder = org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.newBuilder();
-              if (hasAuthRequest()) {
-                subBuilder.mergeFrom(getAuthRequest());
-              }
-              input.readMessage(subBuilder, extensionRegistry);
-              setAuthRequest(subBuilder.buildPartial());
-              break;
-            }
+        org.apache.bookkeeper.proto.BookkeeperProtocol.Request parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.apache.bookkeeper.proto.BookkeeperProtocol.Request) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
           }
         }
+        return this;
       }
-      
       private int bitField0_;
-      
-      // required .BKPacketHeader header = 1;
+
       private org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader header_ = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
       private com.google.protobuf.SingleFieldBuilder<
           org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder> headerBuilder_;
+      /**
+       * <code>required .BKPacketHeader header = 1;</code>
+       */
       public boolean hasHeader() {
         return ((bitField0_ & 0x00000001) == 0x00000001);
       }
+      /**
+       * <code>required .BKPacketHeader header = 1;</code>
+       */
       public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader getHeader() {
         if (headerBuilder_ == null) {
           return header_;
@@ -1290,6 +1692,9 @@ public final class BookkeeperProtocol {
           return headerBuilder_.getMessage();
         }
       }
+      /**
+       * <code>required .BKPacketHeader header = 1;</code>
+       */
       public Builder setHeader(org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader value) {
         if (headerBuilder_ == null) {
           if (value == null) {
@@ -1303,6 +1708,9 @@ public final class BookkeeperProtocol {
         bitField0_ |= 0x00000001;
         return this;
       }
+      /**
+       * <code>required .BKPacketHeader header = 1;</code>
+       */
       public Builder setHeader(
           org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder builderForValue) {
         if (headerBuilder_ == null) {
@@ -1314,6 +1722,9 @@ public final class BookkeeperProtocol {
         bitField0_ |= 0x00000001;
         return this;
       }
+      /**
+       * <code>required .BKPacketHeader header = 1;</code>
+       */
       public Builder mergeHeader(org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader value) {
         if (headerBuilder_ == null) {
           if (((bitField0_ & 0x00000001) == 0x00000001) &&
@@ -1330,6 +1741,9 @@ public final class BookkeeperProtocol {
         bitField0_ |= 0x00000001;
         return this;
       }
+      /**
+       * <code>required .BKPacketHeader header = 1;</code>
+       */
       public Builder clearHeader() {
         if (headerBuilder_ == null) {
           header_ = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
@@ -1340,11 +1754,17 @@ public final class BookkeeperProtocol {
         bitField0_ = (bitField0_ & ~0x00000001);
         return this;
       }
+      /**
+       * <code>required .BKPacketHeader header = 1;</code>
+       */
       public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder getHeaderBuilder() {
         bitField0_ |= 0x00000001;
         onChanged();
         return getHeaderFieldBuilder().getBuilder();
       }
+      /**
+       * <code>required .BKPacketHeader header = 1;</code>
+       */
       public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder getHeaderOrBuilder() {
         if (headerBuilder_ != null) {
           return headerBuilder_.getMessageOrBuilder();
@@ -1352,27 +1772,43 @@ public final class BookkeeperProtocol {
           return header_;
         }
       }
+      /**
+       * <code>required .BKPacketHeader header = 1;</code>
+       */
       private com.google.protobuf.SingleFieldBuilder<
           org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder> 
           getHeaderFieldBuilder() {
         if (headerBuilder_ == null) {
           headerBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder>(
-                  header_,
+                  getHeader(),
                   getParentForChildren(),
                   isClean());
           header_ = null;
         }
         return headerBuilder_;
       }
-      
-      // optional .ReadRequest readRequest = 100;
+
       private org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest readRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDefaultInstance();
       private com.google.protobuf.SingleFieldBuilder<
           org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder> readRequestBuilder_;
+      /**
+       * <code>optional .ReadRequest readRequest = 100;</code>
+       *
+       * <pre>
+       * Requests
+       * </pre>
+       */
       public boolean hasReadRequest() {
         return ((bitField0_ & 0x00000002) == 0x00000002);
       }
+      /**
+       * <code>optional .ReadRequest readRequest = 100;</code>
+       *
+       * <pre>
+       * Requests
+       * </pre>
+       */
       public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest getReadRequest() {
         if (readRequestBuilder_ == null) {
           return readRequest_;
@@ -1380,6 +1816,13 @@ public final class BookkeeperProtocol {
           return readRequestBuilder_.getMessage();
         }
       }
+      /**
+       * <code>optional .ReadRequest readRequest = 100;</code>
+       *
+       * <pre>
+       * Requests
+       * </pre>
+       */
       public Builder setReadRequest(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest value) {
         if (readRequestBuilder_ == null) {
           if (value == null) {
@@ -1393,6 +1836,13 @@ public final class BookkeeperProtocol {
         bitField0_ |= 0x00000002;
         return this;
       }
+      /**
+       * <code>optional .ReadRequest readRequest = 100;</code>
+       *
+       * <pre>
+       * Requests
+       * </pre>
+       */
       public Builder setReadRequest(
           org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder builderForValue) {
         if (readRequestBuilder_ == null) {
@@ -1404,6 +1854,13 @@ public final class BookkeeperProtocol {
         bitField0_ |= 0x00000002;
         return this;
       }
+      /**
+       * <code>optional .ReadRequest readRequest = 100;</code>
+       *
+       * <pre>
+       * Requests
+       * </pre>
+       */
       public Builder mergeReadRequest(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest value) {
         if (readRequestBuilder_ == null) {
           if (((bitField0_ & 0x00000002) == 0x00000002) &&
@@ -1420,6 +1877,13 @@ public final class BookkeeperProtocol {
         bitField0_ |= 0x00000002;
         return this;
       }
+      /**
+       * <code>optional .ReadRequest readRequest = 100;</code>
+       *
+       * <pre>
+       * Requests
+       * </pre>
+       */
       public Builder clearReadRequest() {
         if (readRequestBuilder_ == null) {
           readRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDefaultInstance();
@@ -1430,11 +1894,25 @@ public final class BookkeeperProtocol {
         bitField0_ = (bitField0_ & ~0x00000002);
         return this;
       }
+      /**
+       * <code>optional .ReadRequest readRequest = 100;</code>
+       *
+       * <pre>
+       * Requests
+       * </pre>
+       */
       public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder getReadRequestBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
         return getReadRequestFieldBuilder().getBuilder();
       }
+      /**
+       * <code>optional .ReadRequest readRequest = 100;</code>
+       *
+       * <pre>
+       * Requests
+       * </pre>
+       */
       public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder getReadRequestOrBuilder() {
         if (readRequestBuilder_ != null) {
           return readRequestBuilder_.getMessageOrBuilder();
@@ -1442,27 +1920,39 @@ public final class BookkeeperProtocol {
           return readRequest_;
         }
       }
+      /**
+       * <code>optional .ReadRequest readRequest = 100;</code>
+       *
+       * <pre>
+       * Requests
+       * </pre>
+       */
       private com.google.protobuf.SingleFieldBuilder<
           org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder> 
           getReadRequestFieldBuilder() {
         if (readRequestBuilder_ == null) {
           readRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder>(
-                  readRequest_,
+                  getReadRequest(),
                   getParentForChildren(),
                   isClean());
           readRequest_ = null;
         }
         return readRequestBuilder_;
       }
-      
-      // optional .AddRequest addRequest = 101;
+
       private org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest addRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.getDefaultInstance();
       private com.google.protobuf.SingleFieldBuilder<
           org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder> addRequestBuilder_;
+      /**
+       * <code>optional .AddRequest addRequest = 101;</code>
+       */
       public boolean hasAddRequest() {
         return ((bitField0_ & 0x00000004) == 0x00000004);
       }
+      /**
+       * <code>optional .AddRequest addRequest = 101;</code>
+       */
       public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest getAddRequest() {
         if (addRequestBuilder_ == null) {
           return addRequest_;
@@ -1470,6 +1960,9 @@ public final class BookkeeperProtocol {
           return addRequestBuilder_.getMessage();
         }
       }
+      /**
+       * <code>optional .AddRequest addRequest = 101;</code>
+       */
       public Builder setAddRequest(org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest value) {
         if (addRequestBuilder_ == null) {
           if (value == null) {
@@ -1483,6 +1976,9 @@ public final class BookkeeperProtocol {
         bitField0_ |= 0x00000004;
         return this;
       }
+      /**
+       * <code>optional .AddRequest addRequest = 101;</code>
+       */
       public Builder setAddRequest(
           org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder builderForValue) {
         if (addRequestBuilder_ == null) {
@@ -1494,6 +1990,9 @@ public final class BookkeeperProtocol {
         bitField0_ |= 0x00000004;
         return this;
       }
+      /**
+       * <code>optional .AddRequest addRequest = 101;</code>
+       */
       public Builder mergeAddRequest(org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest value) {
         if (addRequestBuilder_ == null) {
           if (((bitField0_ & 0x00000004) == 0x00000004) &&
@@ -1510,6 +2009,9 @@ public final class BookkeeperProtocol {
         bitField0_ |= 0x00000004;
         return this;
       }
+      /**
+       * <code>optional .AddRequest addRequest = 101;</code>
+       */
       public Builder clearAddRequest() {
         if (addRequestBuilder_ == null) {
           addRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.getDefaultInstance();
@@ -1520,11 +2022,17 @@ public final class BookkeeperProtocol {
         bitField0_ = (bitField0_ & ~0x00000004);
         return this;
       }
+      /**
+       * <code>optional .AddRequest addRequest = 101;</code>
+       */
       public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder getAddRequestBuilder() {
         bitField0_ |= 0x00000004;
         onChanged();
         return getAddRequestFieldBuilder().getBuilder();
       }
+      /**
+       * <code>optional .AddRequest addRequest = 101;</code>
+       */
       public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder getAddRequestOrBuilder() {
         if (addRequestBuilder_ != null) {
           return addRequestBuilder_.getMessageOrBuilder();
@@ -1532,27 +2040,35 @@ public final class BookkeeperProtocol {
           return addRequest_;
         }
       }
+      /**
+       * <code>optional .AddRequest addRequest = 101;</code>
+       */
       private com.google.protobuf.SingleFieldBuilder<
           org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder> 
           getAddRequestFieldBuilder() {
         if (addRequestBuilder_ == null) {
           addRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder>(
-                  addRequest_,
+                  getAddRequest(),
                   getParentForChildren(),
                   isClean());
           addRequest_ = null;
         }
         return addRequestBuilder_;
       }
-      
-      // optional .AuthMessage authRequest = 102;
+
       private org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage authRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.getDefaultInstance();
       private com.google.protobuf.SingleFieldBuilder<
           org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder> authRequestBuilder_;
+      /**
+       * <code>optional .AuthMessage authRequest = 102;</code>
+       */
       public boolean hasAuthRequest() {
         return ((bitField0_ & 0x00000008) == 0x00000008);
       }
+      /**
+       * <code>optional .AuthMessage authRequest = 102;</code>
+       */
       public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage getAuthRequest() {
         if (authRequestBuilder_ == null) {
           return authRequest_;
@@ -1560,6 +2076,9 @@ public final class BookkeeperProtocol {
           return authRequestBuilder_.getMessage();
         }
       }
+      /**
+       * <code>optional .AuthMessage authRequest = 102;</code>
+       */
       public Builder setAuthRequest(org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage value) {
         if (authRequestBuilder_ == null) {
           if (value == null) {
@@ -1573,6 +2092,9 @@ public final class BookkeeperProtocol {
         bitField0_ |= 0x00000008;
         return this;
       }
+      /**
+       * <code>optional .AuthMessage authRequest = 102;</code>
+       */
       public Builder setAuthRequest(
           org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder builderForValue) {
         if (authRequestBuilder_ == null) {
@@ -1584,6 +2106,9 @@ public final class BookkeeperProtocol {
         bitField0_ |= 0x00000008;
         return this;
       }
+      /**
+       * <code>optional .AuthMessage authRequest = 102;</code>
+       */
       public Builder mergeAuthRequest(org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage value) {
         if (authRequestBuilder_ == null) {
           if (((bitField0_ & 0x00000008) == 0x00000008) &&
@@ -1600,6 +2125,9 @@ public final class BookkeeperProtocol {
         bitField0_ |= 0x00000008;
         return this;
       }
+      /**
+       * <code>optional .AuthMessage authRequest = 102;</code>
+       */
       public Builder clearAuthRequest() {
         if (authRequestBuilder_ == null) {
           authRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.getDefaultInstance();
@@ -1610,11 +2138,17 @@ public final class BookkeeperProtocol {
         bitField0_ = (bitField0_ & ~0x00000008);
         return this;
       }
+      /**
+       * <code>optional .AuthMessage authRequest = 102;</code>
+       */
       public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder getAuthRequestBuilder() {
         bitField0_ |= 0x00000008;
         onChanged();
         return getAuthRequestFieldBuilder().getBuilder();
       }
+      /**
+       * <code>optional .AuthMessage authRequest = 102;</code>
+       */
       public org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder getAuthRequestOrBuilder() {
         if (authRequestBuilder_ != null) {
           return authRequestBuilder_.getMessageOrBuilder();
@@ -1622,95 +2156,233 @@ public final class BookkeeperProtocol {
           return authRequest_;
         }
       }
+      /**
+       * <code>optional .AuthMessage authRequest = 102;</code>
+       */
       private com.google.protobuf.SingleFieldBuilder<
           org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder> 
           getAuthRequestFieldBuilder() {
         if (authRequestBuilder_ == null) {
           authRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessage.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AuthMessageOrBuilder>(
-                  authRequest_,
+                  getAuthRequest(),
                   getParentForChildren(),
                   isClean());
           authRequest_ = null;
         }
         return authRequestBuilder_;
       }
-      
+
       // @@protoc_insertion_point(builder_scope:Request)
     }
-    
+
     static {
       defaultInstance = new Request(true);
       defaultInstance.initFields();
     }
-    
+
     // @@protoc_insertion_point(class_scope:Request)
   }
-  
-  public interface ReadRequestOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
-    
-    // optional .ReadRequest.Flag flag = 100;
+
+  public interface ReadRequestOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:ReadRequest)
+      com.google.protobuf.MessageOrBuilder {
+
+    /**
+     * <code>optional .ReadRequest.Flag flag = 100;</code>
+     */
     boolean hasFlag();
+    /**
+     * <code>optional .ReadRequest.Flag flag = 100;</code>
+     */
     org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag getFlag();
-    
-    // required int64 ledgerId = 1;
+
+    /**
+     * <code>required int64 ledgerId = 1;</code>
+     */
     boolean hasLedgerId();
+    /**
+     * <code>required int64 ledgerId = 1;</code>
+     */
     long getLedgerId();
-    
-    // required int64 entryId = 2;
+
+    /**
+     * <code>required int64 entryId = 2;</code>
+     *
+     * <pre>
+     * entryId will be -1 for reading the LAST_ADD_CONFIRMED entry.
+     * </pre>
+     */
     boolean hasEntryId();
+    /**
+     * <code>required int64 entryId = 2;</code>
+     *
+     * <pre>
+     * entryId will be -1 for reading the LAST_ADD_CONFIRMED entry.
+     * </pre>
+     */
     long getEntryId();
-    
-    // optional bytes masterKey = 3;
+
+    /**
+     * <code>optional bytes masterKey = 3;</code>
+     *
+     * <pre>
+     * Used while fencing a ledger.
+     * </pre>
+     */
     boolean hasMasterKey();
+    /**
+     * <code>optional bytes masterKey = 3;</code>
+     *
+     * <pre>
+     * Used while fencing a ledger.
+     * </pre>
+     */
     com.google.protobuf.ByteString getMasterKey();
   }
+  /**
+   * Protobuf type {@code ReadRequest}
+   */
   public static final class ReadRequest extends
-      com.google.protobuf.GeneratedMessage
-      implements ReadRequestOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:ReadRequest)
+      ReadRequestOrBuilder {
     // Use ReadRequest.newBuilder() to construct.
-    private ReadRequest(Builder builder) {
+    private ReadRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
+      this.unknownFields = builder.getUnknownFields();
     }
-    private ReadRequest(boolean noInit) {}
-    
+    private ReadRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
     private static final ReadRequest defaultInstance;
     public static ReadRequest getDefaultInstance() {
       return defaultInstance;
     }
-    
+
     public ReadRequest getDefaultInstanceForType() {
       return defaultInstance;
     }
-    
+
+    private final com.google.protobuf.UnknownFieldSet unknownFields;
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+        getUnknownFields() {
+      return this.unknownFields;
+    }
+    private ReadRequest(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 8: {
+              bitField0_ |= 0x00000002;
+              ledgerId_ = input.readInt64();
+              break;
+            }
+            case 16: {
+              bitField0_ |= 0x00000004;
+              entryId_ = input.readInt64();
+              break;
+            }
+            case 26: {
+              bitField0_ |= 0x00000008;
+              masterKey_ = input.readBytes();
+              break;
+            }
+            case 800: {
+              int rawValue = input.readEnum();
+              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag value = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag.valueOf(rawValue);
+              if (value == null) {
+                unknownFields.mergeVarintField(100, rawValue);
+              } else {
+                bitField0_ |= 0x00000001;
+                flag_ = value;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_ReadRequest_descriptor;
     }
-    
+
     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
-      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_ReadRequest_fieldAccessorTable;
+      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_ReadRequest_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.class, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder.class);
+    }
+
+    public static com.google.protobuf.Parser<ReadRequest> PARSER =
+        new com.google.protobuf.AbstractParser<ReadRequest>() {
+      public ReadRequest parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new ReadRequest(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<ReadRequest> getParserForType() {
+      return PARSER;
     }
-    
+
+    /**
+     * Protobuf enum {@code ReadRequest.Flag}
+     */
     public enum Flag
         implements com.google.protobuf.ProtocolMessageEnum {
+      /**
+       * <code>FENCE_LEDGER = 1;</code>
+       */
       FENCE_LEDGER(0, 1),
       ;
-      
+
+      /**
+       * <code>FENCE_LEDGER = 1;</code>
+       */
       public static final int FENCE_LEDGER_VALUE = 1;
-      
-      
+
+
       public final int getNumber() { return value; }
-      
+
       public static Flag valueOf(int value) {
         switch (value) {
           case 1: return FENCE_LEDGER;
           default: return null;
         }
       }
-      
+
       public static com.google.protobuf.Internal.EnumLiteMap<Flag>
           internalGetValueMap() {
         return internalValueMap;
@@ -1722,7 +2394,7 @@ public final class BookkeeperProtocol {
                 return Flag.valueOf(number);
               }
             };
-      
+
       public final com.google.protobuf.Descriptors.EnumValueDescriptor
           getValueDescriptor() {
         return getDescriptor().getValues().get(index);
@@ -1735,11 +2407,9 @@ public final class BookkeeperProtocol {
           getDescriptor() {
         return org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDescriptor().getEnumTypes().get(0);
       }
-      
-      private static final Flag[] VALUES = {
-        FENCE_LEDGER, 
-      };
-      
+
+      private static final Flag[] VALUES = values();
+
       public static Flag valueOf(
           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
         if (desc.getType() != getDescriptor()) {
@@ -1748,59 +2418,95 @@ public final class BookkeeperProtocol {
         }
         return VALUES[desc.getIndex()];
       }
-      
+
       private final int index;
       private final int value;
-      
+
       private Flag(int index, int value) {
         this.index = index;
         this.value = value;
       }
-      
+
       // @@protoc_insertion_point(enum_scope:ReadRequest.Flag)
     }
-    
+
     private int bitField0_;
-    // optional .ReadRequest.Flag flag = 100;
     public static final int FLAG_FIELD_NUMBER = 100;
     private org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag flag_;
+    /**
+     * <code>optional .ReadRequest.Flag flag = 100;</code>
+     */
     public boolean hasFlag() {
       return ((bitField0_ & 0x00000001) == 0x00000001);
     }
+    /**
+     * <code>optional .ReadRequest.Flag flag = 100;</code>
+     */
     public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag getFlag() {
       return flag_;
     }
-    
-    // required int64 ledgerId = 1;
+
     public static final int LEDGERID_FIELD_NUMBER = 1;
     private long ledgerId_;
+    /**
+     * <code>required int64 ledgerId = 1;</code>
+     */
     public boolean hasLedgerId() {
       return ((bitField0_ & 0x00000002) == 0x00000002);
     }
+    /**
+     * <code>required int64 ledgerId = 1;</code>
+     */
     public long getLedgerId() {

<TRUNCATED>

Mime
View raw message