drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [1/3] drill git commit: DRILL-2971, DRILL-2886, DRILL-2778, DRILL-2545: Improve RPC connection detection failure. Add RPC timeout.
Date Sat, 09 May 2015 15:51:47 GMT
Repository: drill
Updated Branches:
  refs/heads/master d4f9bf2e9 -> 9d2096229


http://git-wip-us.apache.org/repos/asf/drill/blob/960f876a/protocol/src/main/java/org/apache/drill/exec/proto/UserProtos.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/UserProtos.java b/protocol/src/main/java/org/apache/drill/exec/proto/UserProtos.java
index c072a47..c3ff58b 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/UserProtos.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/UserProtos.java
@@ -1836,6 +1836,16 @@ public final class UserProtos {
      * <code>optional bool support_complex_types = 6 [default = false];</code>
      */
     boolean getSupportComplexTypes();
+
+    // optional bool support_timeout = 7 [default = false];
+    /**
+     * <code>optional bool support_timeout = 7 [default = false];</code>
+     */
+    boolean hasSupportTimeout();
+    /**
+     * <code>optional bool support_timeout = 7 [default = false];</code>
+     */
+    boolean getSupportTimeout();
   }
   /**
    * Protobuf type {@code exec.user.UserToBitHandshake}
@@ -1940,6 +1950,11 @@ public final class UserProtos {
               supportComplexTypes_ = input.readBool();
               break;
             }
+            case 56: {
+              bitField0_ |= 0x00000040;
+              supportTimeout_ = input.readBool();
+              break;
+            }
           }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -2088,6 +2103,22 @@ public final class UserProtos {
       return supportComplexTypes_;
     }
 
+    // optional bool support_timeout = 7 [default = false];
+    public static final int SUPPORT_TIMEOUT_FIELD_NUMBER = 7;
+    private boolean supportTimeout_;
+    /**
+     * <code>optional bool support_timeout = 7 [default = false];</code>
+     */
+    public boolean hasSupportTimeout() {
+      return ((bitField0_ & 0x00000040) == 0x00000040);
+    }
+    /**
+     * <code>optional bool support_timeout = 7 [default = false];</code>
+     */
+    public boolean getSupportTimeout() {
+      return supportTimeout_;
+    }
+
     private void initFields() {
       channel_ = org.apache.drill.exec.proto.UserBitShared.RpcChannel.USER;
       supportListening_ = false;
@@ -2095,6 +2126,7 @@ public final class UserProtos {
       credentials_ = org.apache.drill.exec.proto.UserBitShared.UserCredentials.getDefaultInstance();
       properties_ = org.apache.drill.exec.proto.UserProtos.UserProperties.getDefaultInstance();
       supportComplexTypes_ = false;
+      supportTimeout_ = false;
     }
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
@@ -2132,6 +2164,9 @@ public final class UserProtos {
       if (((bitField0_ & 0x00000020) == 0x00000020)) {
         output.writeBool(6, supportComplexTypes_);
       }
+      if (((bitField0_ & 0x00000040) == 0x00000040)) {
+        output.writeBool(7, supportTimeout_);
+      }
       getUnknownFields().writeTo(output);
     }
 
@@ -2165,6 +2200,10 @@ public final class UserProtos {
         size += com.google.protobuf.CodedOutputStream
           .computeBoolSize(6, supportComplexTypes_);
       }
+      if (((bitField0_ & 0x00000040) == 0x00000040)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBoolSize(7, supportTimeout_);
+      }
       size += getUnknownFields().getSerializedSize();
       memoizedSerializedSize = size;
       return size;
@@ -2303,6 +2342,8 @@ public final class UserProtos {
         bitField0_ = (bitField0_ & ~0x00000010);
         supportComplexTypes_ = false;
         bitField0_ = (bitField0_ & ~0x00000020);
+        supportTimeout_ = false;
+        bitField0_ = (bitField0_ & ~0x00000040);
         return this;
       }
 
@@ -2363,6 +2404,10 @@ public final class UserProtos {
           to_bitField0_ |= 0x00000020;
         }
         result.supportComplexTypes_ = supportComplexTypes_;
+        if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
+          to_bitField0_ |= 0x00000040;
+        }
+        result.supportTimeout_ = supportTimeout_;
         result.bitField0_ = to_bitField0_;
         onBuilt();
         return result;
@@ -2397,6 +2442,9 @@ public final class UserProtos {
         if (other.hasSupportComplexTypes()) {
           setSupportComplexTypes(other.getSupportComplexTypes());
         }
+        if (other.hasSupportTimeout()) {
+          setSupportTimeout(other.getSupportTimeout());
+        }
         this.mergeUnknownFields(other.getUnknownFields());
         return this;
       }
@@ -2799,6 +2847,39 @@ public final class UserProtos {
         return this;
       }
 
+      // optional bool support_timeout = 7 [default = false];
+      private boolean supportTimeout_ ;
+      /**
+       * <code>optional bool support_timeout = 7 [default = false];</code>
+       */
+      public boolean hasSupportTimeout() {
+        return ((bitField0_ & 0x00000040) == 0x00000040);
+      }
+      /**
+       * <code>optional bool support_timeout = 7 [default = false];</code>
+       */
+      public boolean getSupportTimeout() {
+        return supportTimeout_;
+      }
+      /**
+       * <code>optional bool support_timeout = 7 [default = false];</code>
+       */
+      public Builder setSupportTimeout(boolean value) {
+        bitField0_ |= 0x00000040;
+        supportTimeout_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional bool support_timeout = 7 [default = false];</code>
+       */
+      public Builder clearSupportTimeout() {
+        bitField0_ = (bitField0_ & ~0x00000040);
+        supportTimeout_ = false;
+        onChanged();
+        return this;
+      }
+
       // @@protoc_insertion_point(builder_scope:exec.user.UserToBitHandshake)
     }
 
@@ -4890,31 +4971,31 @@ public final class UserProtos {
       "\032\023UserBitShared.proto\"&\n\010Property\022\013\n\003key" +
       "\030\001 \002(\t\022\r\n\005value\030\002 \002(\t\"9\n\016UserProperties\022" +
       "\'\n\nproperties\030\001 \003(\0132\023.exec.user.Property" +
-      "\"\374\001\n\022UserToBitHandshake\022.\n\007channel\030\001 \001(\016" +
+      "\"\234\002\n\022UserToBitHandshake\022.\n\007channel\030\001 \001(\016" +
       "2\027.exec.shared.RpcChannel:\004USER\022\031\n\021suppo" +
       "rt_listening\030\002 \001(\010\022\023\n\013rpc_version\030\003 \001(\005\022" +
       "1\n\013credentials\030\004 \001(\0132\034.exec.shared.UserC" +
       "redentials\022-\n\nproperties\030\005 \001(\0132\031.exec.us" +
       "er.UserProperties\022$\n\025support_complex_typ",
-      "es\030\006 \001(\010:\005false\"S\n\016RequestResults\022&\n\010que" +
-      "ry_id\030\001 \001(\0132\024.exec.shared.QueryId\022\031\n\021max" +
-      "imum_responses\030\002 \001(\005\"q\n\010RunQuery\0221\n\014resu" +
-      "lts_mode\030\001 \001(\0162\033.exec.user.QueryResultsM" +
-      "ode\022$\n\004type\030\002 \001(\0162\026.exec.shared.QueryTyp" +
-      "e\022\014\n\004plan\030\003 \001(\t\"|\n\022BitToUserHandshake\022\023\n" +
-      "\013rpc_version\030\002 \001(\005\022*\n\006status\030\003 \001(\0162\032.exe" +
-      "c.user.HandshakeStatus\022\017\n\007errorId\030\004 \001(\t\022" +
-      "\024\n\014errorMessage\030\005 \001(\t*\310\001\n\007RpcType\022\r\n\tHAN" +
-      "DSHAKE\020\000\022\007\n\003ACK\020\001\022\013\n\007GOODBYE\020\002\022\r\n\tRUN_QU",
-      "ERY\020\003\022\020\n\014CANCEL_QUERY\020\004\022\023\n\017REQUEST_RESUL" +
-      "TS\020\005\022\016\n\nQUERY_DATA\020\006\022\020\n\014QUERY_HANDLE\020\007\022\026"
+
-      "\n\022REQ_META_FUNCTIONS\020\010\022\026\n\022RESP_FUNCTION_" +
-      "LIST\020\t\022\020\n\014QUERY_RESULT\020\n*#\n\020QueryResults" +
-      "Mode\022\017\n\013STREAM_FULL\020\001*^\n\017HandshakeStatus" +
-      "\022\013\n\007SUCCESS\020\001\022\030\n\024RPC_VERSION_MISMATCH\020\002\022" +
-      "\017\n\013AUTH_FAILED\020\003\022\023\n\017UNKNOWN_FAILURE\020\004B+\n" +
-      "\033org.apache.drill.exec.protoB\nUserProtos" +
-      "H\001"
+      "es\030\006 \001(\010:\005false\022\036\n\017support_timeout\030\007 \001(\010" +
+      ":\005false\"S\n\016RequestResults\022&\n\010query_id\030\001 " +
+      "\001(\0132\024.exec.shared.QueryId\022\031\n\021maximum_res" +
+      "ponses\030\002 \001(\005\"q\n\010RunQuery\0221\n\014results_mode" +
+      "\030\001 \001(\0162\033.exec.user.QueryResultsMode\022$\n\004t" +
+      "ype\030\002 \001(\0162\026.exec.shared.QueryType\022\014\n\004pla" +
+      "n\030\003 \001(\t\"|\n\022BitToUserHandshake\022\023\n\013rpc_ver" +
+      "sion\030\002 \001(\005\022*\n\006status\030\003 \001(\0162\032.exec.user.H" +
+      "andshakeStatus\022\017\n\007errorId\030\004 \001(\t\022\024\n\014error" +
+      "Message\030\005 \001(\t*\310\001\n\007RpcType\022\r\n\tHANDSHAKE\020\000",
+      "\022\007\n\003ACK\020\001\022\013\n\007GOODBYE\020\002\022\r\n\tRUN_QUERY\020\003\022\020\n"
+
+      "\014CANCEL_QUERY\020\004\022\023\n\017REQUEST_RESULTS\020\005\022\016\n\n" +
+      "QUERY_DATA\020\006\022\020\n\014QUERY_HANDLE\020\007\022\026\n\022REQ_ME" +
+      "TA_FUNCTIONS\020\010\022\026\n\022RESP_FUNCTION_LIST\020\t\022\020" +
+      "\n\014QUERY_RESULT\020\n*#\n\020QueryResultsMode\022\017\n\013" +
+      "STREAM_FULL\020\001*^\n\017HandshakeStatus\022\013\n\007SUCC" +
+      "ESS\020\001\022\030\n\024RPC_VERSION_MISMATCH\020\002\022\017\n\013AUTH_" +
+      "FAILED\020\003\022\023\n\017UNKNOWN_FAILURE\020\004B+\n\033org.apa" +
+      "che.drill.exec.protoB\nUserProtosH\001"
     };
     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
       new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@@ -4938,7 +5019,7 @@ public final class UserProtos {
           internal_static_exec_user_UserToBitHandshake_fieldAccessorTable = new
             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
               internal_static_exec_user_UserToBitHandshake_descriptor,
-              new java.lang.String[] { "Channel", "SupportListening", "RpcVersion", "Credentials",
"Properties", "SupportComplexTypes", });
+              new java.lang.String[] { "Channel", "SupportListening", "RpcVersion", "Credentials",
"Properties", "SupportComplexTypes", "SupportTimeout", });
           internal_static_exec_user_RequestResults_descriptor =
             getDescriptor().getMessageTypes().get(3);
           internal_static_exec_user_RequestResults_fieldAccessorTable = new

http://git-wip-us.apache.org/repos/asf/drill/blob/960f876a/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcMode.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcMode.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcMode.java
index df71855..e34b52d 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcMode.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcMode.java
@@ -24,7 +24,9 @@ public enum RpcMode implements com.dyuproject.protostuff.EnumLite<RpcMode>
 {
     REQUEST(0),
     RESPONSE(1),
-    RESPONSE_FAILURE(2);
+    RESPONSE_FAILURE(2),
+    PING(3),
+    PONG(4);
     
     public final int number;
     
@@ -45,6 +47,8 @@ public enum RpcMode implements com.dyuproject.protostuff.EnumLite<RpcMode>
             case 0: return REQUEST;
             case 1: return RESPONSE;
             case 2: return RESPONSE_FAILURE;
+            case 3: return PING;
+            case 4: return PONG;
             default: return null;
         }
     }

http://git-wip-us.apache.org/repos/asf/drill/blob/960f876a/protocol/src/main/java/org/apache/drill/exec/proto/beans/UserToBitHandshake.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/UserToBitHandshake.java
b/protocol/src/main/java/org/apache/drill/exec/proto/beans/UserToBitHandshake.java
index 67ac4e5..efd8e58 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/beans/UserToBitHandshake.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/UserToBitHandshake.java
@@ -47,6 +47,7 @@ public final class UserToBitHandshake implements Externalizable, Message<UserToB
     static final UserToBitHandshake DEFAULT_INSTANCE = new UserToBitHandshake();
 
     static final Boolean DEFAULT_SUPPORT_COMPLEX_TYPES = new Boolean(false);
+    static final Boolean DEFAULT_SUPPORT_TIMEOUT = new Boolean(false);
     
     private RpcChannel channel;
     private Boolean supportListening;
@@ -54,6 +55,7 @@ public final class UserToBitHandshake implements Externalizable, Message<UserToB
     private UserCredentials credentials;
     private UserProperties properties;
     private Boolean supportComplexTypes = DEFAULT_SUPPORT_COMPLEX_TYPES;
+    private Boolean supportTimeout = DEFAULT_SUPPORT_TIMEOUT;
 
     public UserToBitHandshake()
     {
@@ -140,6 +142,19 @@ public final class UserToBitHandshake implements Externalizable, Message<UserToB
         return this;
     }
 
+    // supportTimeout
+
+    public Boolean getSupportTimeout()
+    {
+        return supportTimeout;
+    }
+
+    public UserToBitHandshake setSupportTimeout(Boolean supportTimeout)
+    {
+        this.supportTimeout = supportTimeout;
+        return this;
+    }
+
     // java serialization
 
     public void readExternal(ObjectInput in) throws IOException
@@ -214,6 +229,9 @@ public final class UserToBitHandshake implements Externalizable, Message<UserToB
                 case 6:
                     message.supportComplexTypes = input.readBool();
                     break;
+                case 7:
+                    message.supportTimeout = input.readBool();
+                    break;
                 default:
                     input.handleUnknownField(number, this);
             }   
@@ -242,6 +260,9 @@ public final class UserToBitHandshake implements Externalizable, Message<UserToB
 
         if(message.supportComplexTypes != null && message.supportComplexTypes !=
DEFAULT_SUPPORT_COMPLEX_TYPES)
             output.writeBool(6, message.supportComplexTypes, false);
+
+        if(message.supportTimeout != null && message.supportTimeout != DEFAULT_SUPPORT_TIMEOUT)
+            output.writeBool(7, message.supportTimeout, false);
     }
 
     public String getFieldName(int number)
@@ -254,6 +275,7 @@ public final class UserToBitHandshake implements Externalizable, Message<UserToB
             case 4: return "credentials";
             case 5: return "properties";
             case 6: return "supportComplexTypes";
+            case 7: return "supportTimeout";
             default: return null;
         }
     }
@@ -273,6 +295,7 @@ public final class UserToBitHandshake implements Externalizable, Message<UserToB
         __fieldMap.put("credentials", 4);
         __fieldMap.put("properties", 5);
         __fieldMap.put("supportComplexTypes", 6);
+        __fieldMap.put("supportTimeout", 7);
     }
     
 }

http://git-wip-us.apache.org/repos/asf/drill/blob/960f876a/protocol/src/main/protobuf/GeneralRPC.proto
----------------------------------------------------------------------
diff --git a/protocol/src/main/protobuf/GeneralRPC.proto b/protocol/src/main/protobuf/GeneralRPC.proto
index 5538abe..26ab821 100644
--- a/protocol/src/main/protobuf/GeneralRPC.proto
+++ b/protocol/src/main/protobuf/GeneralRPC.proto
@@ -14,6 +14,8 @@ enum RpcMode {
   REQUEST = 0;
   RESPONSE = 1;
   RESPONSE_FAILURE = 2;
+  PING = 3;
+  PONG = 4;
 }
 
 message RpcHeader{

http://git-wip-us.apache.org/repos/asf/drill/blob/960f876a/protocol/src/main/protobuf/User.proto
----------------------------------------------------------------------
diff --git a/protocol/src/main/protobuf/User.proto b/protocol/src/main/protobuf/User.proto
index 59e22ae..185a646 100644
--- a/protocol/src/main/protobuf/User.proto
+++ b/protocol/src/main/protobuf/User.proto
@@ -44,6 +44,7 @@ message UserToBitHandshake {
   optional exec.shared.UserCredentials credentials = 4;
   optional UserProperties properties = 5;
   optional bool support_complex_types = 6 [default = false];
+  optional bool support_timeout = 7 [default = false];
 }
 
 message RequestResults {


Mime
View raw message