hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1516086 [37/43] - in /hbase/branches/0.95: ./ hbase-client/src/main/java/org/apache/hadoop/hbase/ hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ hbase-common/src/test/java/org/apache/hadoop/hbase/ hbase-protocol/src/main/java...
Date Wed, 21 Aug 2013 05:10:45 GMT
Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/protobuf/generated/VersionMessage.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/protobuf/generated/VersionMessage.java?rev=1516086&r1=1516085&r2=1516086&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/protobuf/generated/VersionMessage.java
(original)
+++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/protobuf/generated/VersionMessage.java
Wed Aug 21 05:10:43 2013
@@ -10,216 +10,413 @@ public final class VersionMessage {
   }
   public interface VersionOrBuilder
       extends com.google.protobuf.MessageOrBuilder {
-    
+
     // optional string restVersion = 1;
+    /**
+     * <code>optional string restVersion = 1;</code>
+     */
     boolean hasRestVersion();
-    String getRestVersion();
-    
+    /**
+     * <code>optional string restVersion = 1;</code>
+     */
+    java.lang.String getRestVersion();
+    /**
+     * <code>optional string restVersion = 1;</code>
+     */
+    com.google.protobuf.ByteString
+        getRestVersionBytes();
+
     // optional string jvmVersion = 2;
+    /**
+     * <code>optional string jvmVersion = 2;</code>
+     */
     boolean hasJvmVersion();
-    String getJvmVersion();
-    
+    /**
+     * <code>optional string jvmVersion = 2;</code>
+     */
+    java.lang.String getJvmVersion();
+    /**
+     * <code>optional string jvmVersion = 2;</code>
+     */
+    com.google.protobuf.ByteString
+        getJvmVersionBytes();
+
     // optional string osVersion = 3;
+    /**
+     * <code>optional string osVersion = 3;</code>
+     */
     boolean hasOsVersion();
-    String getOsVersion();
-    
+    /**
+     * <code>optional string osVersion = 3;</code>
+     */
+    java.lang.String getOsVersion();
+    /**
+     * <code>optional string osVersion = 3;</code>
+     */
+    com.google.protobuf.ByteString
+        getOsVersionBytes();
+
     // optional string serverVersion = 4;
+    /**
+     * <code>optional string serverVersion = 4;</code>
+     */
     boolean hasServerVersion();
-    String getServerVersion();
-    
+    /**
+     * <code>optional string serverVersion = 4;</code>
+     */
+    java.lang.String getServerVersion();
+    /**
+     * <code>optional string serverVersion = 4;</code>
+     */
+    com.google.protobuf.ByteString
+        getServerVersionBytes();
+
     // optional string jerseyVersion = 5;
+    /**
+     * <code>optional string jerseyVersion = 5;</code>
+     */
     boolean hasJerseyVersion();
-    String getJerseyVersion();
+    /**
+     * <code>optional string jerseyVersion = 5;</code>
+     */
+    java.lang.String getJerseyVersion();
+    /**
+     * <code>optional string jerseyVersion = 5;</code>
+     */
+    com.google.protobuf.ByteString
+        getJerseyVersionBytes();
   }
+  /**
+   * Protobuf type {@code org.apache.hadoop.hbase.rest.protobuf.generated.Version}
+   */
   public static final class Version extends
       com.google.protobuf.GeneratedMessage
       implements VersionOrBuilder {
     // Use Version.newBuilder() to construct.
-    private Version(Builder builder) {
+    private Version(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
+      this.unknownFields = builder.getUnknownFields();
     }
-    private Version(boolean noInit) {}
-    
+    private Version(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
+
     private static final Version defaultInstance;
     public static Version getDefaultInstance() {
       return defaultInstance;
     }
-    
+
     public Version getDefaultInstanceForType() {
       return defaultInstance;
     }
-    
+
+    private final com.google.protobuf.UnknownFieldSet unknownFields;
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+        getUnknownFields() {
+      return this.unknownFields;
+    }
+    private Version(
+        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: {
+              bitField0_ |= 0x00000001;
+              restVersion_ = input.readBytes();
+              break;
+            }
+            case 18: {
+              bitField0_ |= 0x00000002;
+              jvmVersion_ = input.readBytes();
+              break;
+            }
+            case 26: {
+              bitField0_ |= 0x00000004;
+              osVersion_ = input.readBytes();
+              break;
+            }
+            case 34: {
+              bitField0_ |= 0x00000008;
+              serverVersion_ = input.readBytes();
+              break;
+            }
+            case 42: {
+              bitField0_ |= 0x00000010;
+              jerseyVersion_ = input.readBytes();
+              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.hadoop.hbase.rest.protobuf.generated.VersionMessage.internal_static_org_apache_hadoop_hbase_rest_protobuf_generated_Version_descriptor;
     }
-    
+
     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
-      return org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.internal_static_org_apache_hadoop_hbase_rest_protobuf_generated_Version_fieldAccessorTable;
+      return org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.internal_static_org_apache_hadoop_hbase_rest_protobuf_generated_Version_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version.class,
org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version.Builder.class);
+    }
+
+    public static com.google.protobuf.Parser<Version> PARSER =
+        new com.google.protobuf.AbstractParser<Version>() {
+      public Version parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new Version(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<Version> getParserForType() {
+      return PARSER;
     }
-    
+
     private int bitField0_;
     // optional string restVersion = 1;
     public static final int RESTVERSION_FIELD_NUMBER = 1;
     private java.lang.Object restVersion_;
+    /**
+     * <code>optional string restVersion = 1;</code>
+     */
     public boolean hasRestVersion() {
       return ((bitField0_ & 0x00000001) == 0x00000001);
     }
-    public String getRestVersion() {
+    /**
+     * <code>optional string restVersion = 1;</code>
+     */
+    public java.lang.String getRestVersion() {
       java.lang.Object ref = restVersion_;
-      if (ref instanceof String) {
-        return (String) ref;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
       } else {
         com.google.protobuf.ByteString bs = 
             (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
+        java.lang.String s = bs.toStringUtf8();
+        if (bs.isValidUtf8()) {
           restVersion_ = s;
         }
         return s;
       }
     }
-    private com.google.protobuf.ByteString getRestVersionBytes() {
+    /**
+     * <code>optional string restVersion = 1;</code>
+     */
+    public com.google.protobuf.ByteString
+        getRestVersionBytes() {
       java.lang.Object ref = restVersion_;
-      if (ref instanceof String) {
+      if (ref instanceof java.lang.String) {
         com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
         restVersion_ = b;
         return b;
       } else {
         return (com.google.protobuf.ByteString) ref;
       }
     }
-    
+
     // optional string jvmVersion = 2;
     public static final int JVMVERSION_FIELD_NUMBER = 2;
     private java.lang.Object jvmVersion_;
+    /**
+     * <code>optional string jvmVersion = 2;</code>
+     */
     public boolean hasJvmVersion() {
       return ((bitField0_ & 0x00000002) == 0x00000002);
     }
-    public String getJvmVersion() {
+    /**
+     * <code>optional string jvmVersion = 2;</code>
+     */
+    public java.lang.String getJvmVersion() {
       java.lang.Object ref = jvmVersion_;
-      if (ref instanceof String) {
-        return (String) ref;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
       } else {
         com.google.protobuf.ByteString bs = 
             (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
+        java.lang.String s = bs.toStringUtf8();
+        if (bs.isValidUtf8()) {
           jvmVersion_ = s;
         }
         return s;
       }
     }
-    private com.google.protobuf.ByteString getJvmVersionBytes() {
+    /**
+     * <code>optional string jvmVersion = 2;</code>
+     */
+    public com.google.protobuf.ByteString
+        getJvmVersionBytes() {
       java.lang.Object ref = jvmVersion_;
-      if (ref instanceof String) {
+      if (ref instanceof java.lang.String) {
         com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
         jvmVersion_ = b;
         return b;
       } else {
         return (com.google.protobuf.ByteString) ref;
       }
     }
-    
+
     // optional string osVersion = 3;
     public static final int OSVERSION_FIELD_NUMBER = 3;
     private java.lang.Object osVersion_;
+    /**
+     * <code>optional string osVersion = 3;</code>
+     */
     public boolean hasOsVersion() {
       return ((bitField0_ & 0x00000004) == 0x00000004);
     }
-    public String getOsVersion() {
+    /**
+     * <code>optional string osVersion = 3;</code>
+     */
+    public java.lang.String getOsVersion() {
       java.lang.Object ref = osVersion_;
-      if (ref instanceof String) {
-        return (String) ref;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
       } else {
         com.google.protobuf.ByteString bs = 
             (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
+        java.lang.String s = bs.toStringUtf8();
+        if (bs.isValidUtf8()) {
           osVersion_ = s;
         }
         return s;
       }
     }
-    private com.google.protobuf.ByteString getOsVersionBytes() {
+    /**
+     * <code>optional string osVersion = 3;</code>
+     */
+    public com.google.protobuf.ByteString
+        getOsVersionBytes() {
       java.lang.Object ref = osVersion_;
-      if (ref instanceof String) {
+      if (ref instanceof java.lang.String) {
         com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
         osVersion_ = b;
         return b;
       } else {
         return (com.google.protobuf.ByteString) ref;
       }
     }
-    
+
     // optional string serverVersion = 4;
     public static final int SERVERVERSION_FIELD_NUMBER = 4;
     private java.lang.Object serverVersion_;
+    /**
+     * <code>optional string serverVersion = 4;</code>
+     */
     public boolean hasServerVersion() {
       return ((bitField0_ & 0x00000008) == 0x00000008);
     }
-    public String getServerVersion() {
+    /**
+     * <code>optional string serverVersion = 4;</code>
+     */
+    public java.lang.String getServerVersion() {
       java.lang.Object ref = serverVersion_;
-      if (ref instanceof String) {
-        return (String) ref;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
       } else {
         com.google.protobuf.ByteString bs = 
             (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
+        java.lang.String s = bs.toStringUtf8();
+        if (bs.isValidUtf8()) {
           serverVersion_ = s;
         }
         return s;
       }
     }
-    private com.google.protobuf.ByteString getServerVersionBytes() {
+    /**
+     * <code>optional string serverVersion = 4;</code>
+     */
+    public com.google.protobuf.ByteString
+        getServerVersionBytes() {
       java.lang.Object ref = serverVersion_;
-      if (ref instanceof String) {
+      if (ref instanceof java.lang.String) {
         com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
         serverVersion_ = b;
         return b;
       } else {
         return (com.google.protobuf.ByteString) ref;
       }
     }
-    
+
     // optional string jerseyVersion = 5;
     public static final int JERSEYVERSION_FIELD_NUMBER = 5;
     private java.lang.Object jerseyVersion_;
+    /**
+     * <code>optional string jerseyVersion = 5;</code>
+     */
     public boolean hasJerseyVersion() {
       return ((bitField0_ & 0x00000010) == 0x00000010);
     }
-    public String getJerseyVersion() {
+    /**
+     * <code>optional string jerseyVersion = 5;</code>
+     */
+    public java.lang.String getJerseyVersion() {
       java.lang.Object ref = jerseyVersion_;
-      if (ref instanceof String) {
-        return (String) ref;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
       } else {
         com.google.protobuf.ByteString bs = 
             (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
+        java.lang.String s = bs.toStringUtf8();
+        if (bs.isValidUtf8()) {
           jerseyVersion_ = s;
         }
         return s;
       }
     }
-    private com.google.protobuf.ByteString getJerseyVersionBytes() {
+    /**
+     * <code>optional string jerseyVersion = 5;</code>
+     */
+    public com.google.protobuf.ByteString
+        getJerseyVersionBytes() {
       java.lang.Object ref = jerseyVersion_;
-      if (ref instanceof String) {
+      if (ref instanceof java.lang.String) {
         com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
         jerseyVersion_ = b;
         return b;
       } else {
         return (com.google.protobuf.ByteString) ref;
       }
     }
-    
+
     private void initFields() {
       restVersion_ = "";
       jvmVersion_ = "";
@@ -231,11 +428,11 @@ public final class VersionMessage {
     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();
@@ -256,12 +453,12 @@ public final class VersionMessage {
       }
       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
@@ -287,94 +484,83 @@ public final class VersionMessage {
       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.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version
parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version
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.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version
parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version
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.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version
parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version
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.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version
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.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version
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.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version
parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version
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.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version
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 org.apache.hadoop.hbase.rest.protobuf.generated.Version}
+     */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessage.Builder<Builder>
        implements org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.VersionOrBuilder
{
@@ -382,18 +568,21 @@ public final class VersionMessage {
           getDescriptor() {
         return org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.internal_static_org_apache_hadoop_hbase_rest_protobuf_generated_Version_descriptor;
       }
-      
+
       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
-        return org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.internal_static_org_apache_hadoop_hbase_rest_protobuf_generated_Version_fieldAccessorTable;
+        return org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.internal_static_org_apache_hadoop_hbase_rest_protobuf_generated_Version_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version.class,
org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version.Builder.class);
       }
-      
+
       // Construct using org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
-      
-      private Builder(BuilderParent parent) {
+
+      private Builder(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
         maybeForceBuilderInitialization();
       }
@@ -404,7 +593,7 @@ public final class VersionMessage {
       private static Builder create() {
         return new Builder();
       }
-      
+
       public Builder clear() {
         super.clear();
         restVersion_ = "";
@@ -419,20 +608,20 @@ public final class VersionMessage {
         bitField0_ = (bitField0_ & ~0x00000010);
         return this;
       }
-      
+
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
-      
+
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
-        return org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version.getDescriptor();
+        return org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.internal_static_org_apache_hadoop_hbase_rest_protobuf_generated_Version_descriptor;
       }
-      
+
       public org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version getDefaultInstanceForType()
{
         return org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version.getDefaultInstance();
       }
-      
+
       public org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version build()
{
         org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version result = buildPartial();
         if (!result.isInitialized()) {
@@ -440,17 +629,7 @@ public final class VersionMessage {
         }
         return result;
       }
-      
-      private org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version buildParsed()
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(
-            result).asInvalidProtocolBufferException();
-        }
-        return result;
-      }
-      
+
       public org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version buildPartial()
{
         org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version result = new
org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version(this);
         int from_bitField0_ = bitField0_;
@@ -479,7 +658,7 @@ public final class VersionMessage {
         onBuilt();
         return result;
       }
-      
+
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version)
{
           return mergeFrom((org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version)other);
@@ -488,102 +667,104 @@ public final class VersionMessage {
           return this;
         }
       }
-      
+
       public Builder mergeFrom(org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version
other) {
         if (other == org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version.getDefaultInstance())
return this;
         if (other.hasRestVersion()) {
-          setRestVersion(other.getRestVersion());
+          bitField0_ |= 0x00000001;
+          restVersion_ = other.restVersion_;
+          onChanged();
         }
         if (other.hasJvmVersion()) {
-          setJvmVersion(other.getJvmVersion());
+          bitField0_ |= 0x00000002;
+          jvmVersion_ = other.jvmVersion_;
+          onChanged();
         }
         if (other.hasOsVersion()) {
-          setOsVersion(other.getOsVersion());
+          bitField0_ |= 0x00000004;
+          osVersion_ = other.osVersion_;
+          onChanged();
         }
         if (other.hasServerVersion()) {
-          setServerVersion(other.getServerVersion());
+          bitField0_ |= 0x00000008;
+          serverVersion_ = other.serverVersion_;
+          onChanged();
         }
         if (other.hasJerseyVersion()) {
-          setJerseyVersion(other.getJerseyVersion());
+          bitField0_ |= 0x00000010;
+          jerseyVersion_ = other.jerseyVersion_;
+          onChanged();
         }
         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;
-            }
-            case 10: {
-              bitField0_ |= 0x00000001;
-              restVersion_ = input.readBytes();
-              break;
-            }
-            case 18: {
-              bitField0_ |= 0x00000002;
-              jvmVersion_ = input.readBytes();
-              break;
-            }
-            case 26: {
-              bitField0_ |= 0x00000004;
-              osVersion_ = input.readBytes();
-              break;
-            }
-            case 34: {
-              bitField0_ |= 0x00000008;
-              serverVersion_ = input.readBytes();
-              break;
-            }
-            case 42: {
-              bitField0_ |= 0x00000010;
-              jerseyVersion_ = input.readBytes();
-              break;
-            }
+        org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version parsedMessage
= null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version)
e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
           }
         }
+        return this;
       }
-      
       private int bitField0_;
-      
+
       // optional string restVersion = 1;
       private java.lang.Object restVersion_ = "";
+      /**
+       * <code>optional string restVersion = 1;</code>
+       */
       public boolean hasRestVersion() {
         return ((bitField0_ & 0x00000001) == 0x00000001);
       }
-      public String getRestVersion() {
+      /**
+       * <code>optional string restVersion = 1;</code>
+       */
+      public java.lang.String getRestVersion() {
         java.lang.Object ref = restVersion_;
-        if (!(ref instanceof String)) {
-          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
+        if (!(ref instanceof java.lang.String)) {
+          java.lang.String s = ((com.google.protobuf.ByteString) ref)
+              .toStringUtf8();
           restVersion_ = s;
           return s;
         } else {
-          return (String) ref;
+          return (java.lang.String) ref;
         }
       }
-      public Builder setRestVersion(String value) {
+      /**
+       * <code>optional string restVersion = 1;</code>
+       */
+      public com.google.protobuf.ByteString
+          getRestVersionBytes() {
+        java.lang.Object ref = restVersion_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b =
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          restVersion_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>optional string restVersion = 1;</code>
+       */
+      public Builder setRestVersion(
+          java.lang.String value) {
         if (value == null) {
     throw new NullPointerException();
   }
@@ -592,34 +773,72 @@ public final class VersionMessage {
         onChanged();
         return this;
       }
+      /**
+       * <code>optional string restVersion = 1;</code>
+       */
       public Builder clearRestVersion() {
         bitField0_ = (bitField0_ & ~0x00000001);
         restVersion_ = getDefaultInstance().getRestVersion();
         onChanged();
         return this;
       }
-      void setRestVersion(com.google.protobuf.ByteString value) {
-        bitField0_ |= 0x00000001;
+      /**
+       * <code>optional string restVersion = 1;</code>
+       */
+      public Builder setRestVersionBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000001;
         restVersion_ = value;
         onChanged();
+        return this;
       }
-      
+
       // optional string jvmVersion = 2;
       private java.lang.Object jvmVersion_ = "";
+      /**
+       * <code>optional string jvmVersion = 2;</code>
+       */
       public boolean hasJvmVersion() {
         return ((bitField0_ & 0x00000002) == 0x00000002);
       }
-      public String getJvmVersion() {
+      /**
+       * <code>optional string jvmVersion = 2;</code>
+       */
+      public java.lang.String getJvmVersion() {
         java.lang.Object ref = jvmVersion_;
-        if (!(ref instanceof String)) {
-          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
+        if (!(ref instanceof java.lang.String)) {
+          java.lang.String s = ((com.google.protobuf.ByteString) ref)
+              .toStringUtf8();
           jvmVersion_ = s;
           return s;
         } else {
-          return (String) ref;
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <code>optional string jvmVersion = 2;</code>
+       */
+      public com.google.protobuf.ByteString
+          getJvmVersionBytes() {
+        java.lang.Object ref = jvmVersion_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b =
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          jvmVersion_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
         }
       }
-      public Builder setJvmVersion(String value) {
+      /**
+       * <code>optional string jvmVersion = 2;</code>
+       */
+      public Builder setJvmVersion(
+          java.lang.String value) {
         if (value == null) {
     throw new NullPointerException();
   }
@@ -628,34 +847,72 @@ public final class VersionMessage {
         onChanged();
         return this;
       }
+      /**
+       * <code>optional string jvmVersion = 2;</code>
+       */
       public Builder clearJvmVersion() {
         bitField0_ = (bitField0_ & ~0x00000002);
         jvmVersion_ = getDefaultInstance().getJvmVersion();
         onChanged();
         return this;
       }
-      void setJvmVersion(com.google.protobuf.ByteString value) {
-        bitField0_ |= 0x00000002;
+      /**
+       * <code>optional string jvmVersion = 2;</code>
+       */
+      public Builder setJvmVersionBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000002;
         jvmVersion_ = value;
         onChanged();
+        return this;
       }
-      
+
       // optional string osVersion = 3;
       private java.lang.Object osVersion_ = "";
+      /**
+       * <code>optional string osVersion = 3;</code>
+       */
       public boolean hasOsVersion() {
         return ((bitField0_ & 0x00000004) == 0x00000004);
       }
-      public String getOsVersion() {
+      /**
+       * <code>optional string osVersion = 3;</code>
+       */
+      public java.lang.String getOsVersion() {
         java.lang.Object ref = osVersion_;
-        if (!(ref instanceof String)) {
-          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
+        if (!(ref instanceof java.lang.String)) {
+          java.lang.String s = ((com.google.protobuf.ByteString) ref)
+              .toStringUtf8();
           osVersion_ = s;
           return s;
         } else {
-          return (String) ref;
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <code>optional string osVersion = 3;</code>
+       */
+      public com.google.protobuf.ByteString
+          getOsVersionBytes() {
+        java.lang.Object ref = osVersion_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b =
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          osVersion_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
         }
       }
-      public Builder setOsVersion(String value) {
+      /**
+       * <code>optional string osVersion = 3;</code>
+       */
+      public Builder setOsVersion(
+          java.lang.String value) {
         if (value == null) {
     throw new NullPointerException();
   }
@@ -664,34 +921,72 @@ public final class VersionMessage {
         onChanged();
         return this;
       }
+      /**
+       * <code>optional string osVersion = 3;</code>
+       */
       public Builder clearOsVersion() {
         bitField0_ = (bitField0_ & ~0x00000004);
         osVersion_ = getDefaultInstance().getOsVersion();
         onChanged();
         return this;
       }
-      void setOsVersion(com.google.protobuf.ByteString value) {
-        bitField0_ |= 0x00000004;
+      /**
+       * <code>optional string osVersion = 3;</code>
+       */
+      public Builder setOsVersionBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000004;
         osVersion_ = value;
         onChanged();
+        return this;
       }
-      
+
       // optional string serverVersion = 4;
       private java.lang.Object serverVersion_ = "";
+      /**
+       * <code>optional string serverVersion = 4;</code>
+       */
       public boolean hasServerVersion() {
         return ((bitField0_ & 0x00000008) == 0x00000008);
       }
-      public String getServerVersion() {
+      /**
+       * <code>optional string serverVersion = 4;</code>
+       */
+      public java.lang.String getServerVersion() {
         java.lang.Object ref = serverVersion_;
-        if (!(ref instanceof String)) {
-          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
+        if (!(ref instanceof java.lang.String)) {
+          java.lang.String s = ((com.google.protobuf.ByteString) ref)
+              .toStringUtf8();
           serverVersion_ = s;
           return s;
         } else {
-          return (String) ref;
+          return (java.lang.String) ref;
         }
       }
-      public Builder setServerVersion(String value) {
+      /**
+       * <code>optional string serverVersion = 4;</code>
+       */
+      public com.google.protobuf.ByteString
+          getServerVersionBytes() {
+        java.lang.Object ref = serverVersion_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b =
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          serverVersion_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>optional string serverVersion = 4;</code>
+       */
+      public Builder setServerVersion(
+          java.lang.String value) {
         if (value == null) {
     throw new NullPointerException();
   }
@@ -700,34 +995,72 @@ public final class VersionMessage {
         onChanged();
         return this;
       }
+      /**
+       * <code>optional string serverVersion = 4;</code>
+       */
       public Builder clearServerVersion() {
         bitField0_ = (bitField0_ & ~0x00000008);
         serverVersion_ = getDefaultInstance().getServerVersion();
         onChanged();
         return this;
       }
-      void setServerVersion(com.google.protobuf.ByteString value) {
-        bitField0_ |= 0x00000008;
+      /**
+       * <code>optional string serverVersion = 4;</code>
+       */
+      public Builder setServerVersionBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000008;
         serverVersion_ = value;
         onChanged();
+        return this;
       }
-      
+
       // optional string jerseyVersion = 5;
       private java.lang.Object jerseyVersion_ = "";
+      /**
+       * <code>optional string jerseyVersion = 5;</code>
+       */
       public boolean hasJerseyVersion() {
         return ((bitField0_ & 0x00000010) == 0x00000010);
       }
-      public String getJerseyVersion() {
+      /**
+       * <code>optional string jerseyVersion = 5;</code>
+       */
+      public java.lang.String getJerseyVersion() {
         java.lang.Object ref = jerseyVersion_;
-        if (!(ref instanceof String)) {
-          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
+        if (!(ref instanceof java.lang.String)) {
+          java.lang.String s = ((com.google.protobuf.ByteString) ref)
+              .toStringUtf8();
           jerseyVersion_ = s;
           return s;
         } else {
-          return (String) ref;
+          return (java.lang.String) ref;
         }
       }
-      public Builder setJerseyVersion(String value) {
+      /**
+       * <code>optional string jerseyVersion = 5;</code>
+       */
+      public com.google.protobuf.ByteString
+          getJerseyVersionBytes() {
+        java.lang.Object ref = jerseyVersion_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b =
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          jerseyVersion_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>optional string jerseyVersion = 5;</code>
+       */
+      public Builder setJerseyVersion(
+          java.lang.String value) {
         if (value == null) {
     throw new NullPointerException();
   }
@@ -736,35 +1069,46 @@ public final class VersionMessage {
         onChanged();
         return this;
       }
+      /**
+       * <code>optional string jerseyVersion = 5;</code>
+       */
       public Builder clearJerseyVersion() {
         bitField0_ = (bitField0_ & ~0x00000010);
         jerseyVersion_ = getDefaultInstance().getJerseyVersion();
         onChanged();
         return this;
       }
-      void setJerseyVersion(com.google.protobuf.ByteString value) {
-        bitField0_ |= 0x00000010;
+      /**
+       * <code>optional string jerseyVersion = 5;</code>
+       */
+      public Builder setJerseyVersionBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000010;
         jerseyVersion_ = value;
         onChanged();
+        return this;
       }
-      
+
       // @@protoc_insertion_point(builder_scope:org.apache.hadoop.hbase.rest.protobuf.generated.Version)
     }
-    
+
     static {
       defaultInstance = new Version(true);
       defaultInstance.initFields();
     }
-    
+
     // @@protoc_insertion_point(class_scope:org.apache.hadoop.hbase.rest.protobuf.generated.Version)
   }
-  
+
   private static com.google.protobuf.Descriptors.Descriptor
     internal_static_org_apache_hadoop_hbase_rest_protobuf_generated_Version_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_org_apache_hadoop_hbase_rest_protobuf_generated_Version_fieldAccessorTable;
-  
+
   public static com.google.protobuf.Descriptors.FileDescriptor
       getDescriptor() {
     return descriptor;
@@ -789,9 +1133,7 @@ public final class VersionMessage {
           internal_static_org_apache_hadoop_hbase_rest_protobuf_generated_Version_fieldAccessorTable
= new
             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
               internal_static_org_apache_hadoop_hbase_rest_protobuf_generated_Version_descriptor,
-              new java.lang.String[] { "RestVersion", "JvmVersion", "OsVersion", "ServerVersion",
"JerseyVersion", },
-              org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version.class,
-              org.apache.hadoop.hbase.rest.protobuf.generated.VersionMessage.Version.Builder.class);
+              new java.lang.String[] { "RestVersion", "JvmVersion", "OsVersion", "ServerVersion",
"JerseyVersion", });
           return null;
         }
       };
@@ -800,6 +1142,6 @@ public final class VersionMessage {
         new com.google.protobuf.Descriptors.FileDescriptor[] {
         }, assigner);
   }
-  
+
   // @@protoc_insertion_point(outer_class_scope)
 }

Modified: hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java?rev=1516086&r1=1516085&r2=1516086&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
(original)
+++ hbase/branches/0.95/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
Wed Aug 21 05:10:43 2013
@@ -1,7 +1,4 @@
-
-
 /**
- *
  * 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
@@ -119,6 +116,8 @@ import org.apache.zookeeper.ZooKeeper.St
  * Depends on log4j being on classpath and
  * hbase-site.xml for logging and test-run configuration.  It does not set
  * logging levels nor make changes to configuration parameters.
+ * <p>To preserve test data directories, pass the system property "hbase.testing.preserve.testdir"
+ * setting it to true.
  */
 @InterfaceAudience.Public
 @InterfaceStability.Evolving
@@ -283,7 +282,7 @@ public class HBaseTestingUtility extends
   private void createSubDir(String propertyName, Path parent, String subDirName){
     Path newPath= new Path(parent, subDirName);
     File newDir = new File(newPath.toString()).getAbsoluteFile();
-    newDir.deleteOnExit();
+    if (deleteOnExit()) newDir.deleteOnExit();
     conf.set(propertyName, newDir.getAbsolutePath());
   }
 
@@ -349,9 +348,10 @@ public class HBaseTestingUtility extends
     Path testDir = getDataTestDir("dfscluster_" + UUID.randomUUID().toString());
     clusterTestDir = new File(testDir.toString()).getAbsoluteFile();
     // Have it cleaned up on exit
-    clusterTestDir.deleteOnExit();
+    boolean b = deleteOnExit();
+    if (b) clusterTestDir.deleteOnExit();
     conf.set(TEST_DIRECTORY_KEY, clusterTestDir.getPath());
-    LOG.info("Created new mini-cluster data directory: " + clusterTestDir);
+    LOG.info("Created new mini-cluster data directory: " + clusterTestDir + ", deleteOnExit="
+ b);
   }
 
   /**
@@ -396,13 +396,13 @@ public class HBaseTestingUtility extends
     FileSystem fs = getTestFileSystem();
     if (fs.getUri().getScheme().equals(FileSystem.getLocal(conf).getUri().getScheme())) {
       File dataTestDir = new File(getDataTestDir().toString());
-      dataTestDir.deleteOnExit();
+      if (deleteOnExit()) dataTestDir.deleteOnExit();
       dataTestDirOnTestFS = new Path(dataTestDir.getAbsolutePath());
     } else {
       Path base = getBaseTestDirOnTestFS();
       String randomStr = UUID.randomUUID().toString();
       dataTestDirOnTestFS = new Path(base, randomStr);
-      fs.deleteOnExit(dataTestDirOnTestFS);
+      if (deleteOnExit()) fs.deleteOnExit(dataTestDirOnTestFS);
     }
   }
 



Mime
View raw message