You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by ja...@apache.org on 2014/10/27 06:03:13 UTC
[1/6] DRILL-1436: Remove use of UDP based cache for purposes of
intermediate PlanFragment distribution
Repository: incubator-drill
Updated Branches:
refs/heads/master 6dca24af0 -> 451dd608a
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/protocol/src/main/java/org/apache/drill/exec/proto/beans/DrillPBError.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/DrillPBError.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/DrillPBError.java
index 303f9b6..ac9cef5 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/beans/DrillPBError.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/DrillPBError.java
@@ -53,6 +53,7 @@ public final class DrillPBError implements Externalizable, Message<DrillPBError>
private DrillbitEndpoint endpoint;
private int errorType;
private String message;
+ private ExceptionWrapper exception;
private List<ParsingError> parsingError;
public DrillPBError()
@@ -114,6 +115,19 @@ public final class DrillPBError implements Externalizable, Message<DrillPBError>
return this;
}
+ // exception
+
+ public ExceptionWrapper getException()
+ {
+ return exception;
+ }
+
+ public DrillPBError setException(ExceptionWrapper exception)
+ {
+ this.exception = exception;
+ return this;
+ }
+
// parsingError
public List<ParsingError> getParsingErrorList()
@@ -195,6 +209,10 @@ public final class DrillPBError implements Externalizable, Message<DrillPBError>
message.message = input.readString();
break;
case 5:
+ message.exception = input.mergeObject(message.exception, ExceptionWrapper.getSchema());
+ break;
+
+ case 6:
if(message.parsingError == null)
message.parsingError = new ArrayList<ParsingError>();
message.parsingError.add(input.mergeObject(null, ParsingError.getSchema()));
@@ -222,12 +240,16 @@ public final class DrillPBError implements Externalizable, Message<DrillPBError>
if(message.message != null)
output.writeString(4, message.message, false);
+ if(message.exception != null)
+ output.writeObject(5, message.exception, ExceptionWrapper.getSchema(), false);
+
+
if(message.parsingError != null)
{
for(ParsingError parsingError : message.parsingError)
{
if(parsingError != null)
- output.writeObject(5, parsingError, ParsingError.getSchema(), true);
+ output.writeObject(6, parsingError, ParsingError.getSchema(), true);
}
}
@@ -241,7 +263,8 @@ public final class DrillPBError implements Externalizable, Message<DrillPBError>
case 2: return "endpoint";
case 3: return "errorType";
case 4: return "message";
- case 5: return "parsingError";
+ case 5: return "exception";
+ case 6: return "parsingError";
default: return null;
}
}
@@ -259,7 +282,8 @@ public final class DrillPBError implements Externalizable, Message<DrillPBError>
__fieldMap.put("endpoint", 2);
__fieldMap.put("errorType", 3);
__fieldMap.put("message", 4);
- __fieldMap.put("parsingError", 5);
+ __fieldMap.put("exception", 5);
+ __fieldMap.put("parsingError", 6);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/protocol/src/main/java/org/apache/drill/exec/proto/beans/ExceptionWrapper.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/ExceptionWrapper.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/ExceptionWrapper.java
new file mode 100644
index 0000000..c6e8b35
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/ExceptionWrapper.java
@@ -0,0 +1,243 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by http://code.google.com/p/protostuff/ ... DO NOT EDIT!
+// Generated from protobuf
+
+package org.apache.drill.exec.proto.beans;
+
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.dyuproject.protostuff.GraphIOUtil;
+import com.dyuproject.protostuff.Input;
+import com.dyuproject.protostuff.Message;
+import com.dyuproject.protostuff.Output;
+import com.dyuproject.protostuff.Schema;
+
+public final class ExceptionWrapper implements Externalizable, Message<ExceptionWrapper>, Schema<ExceptionWrapper>
+{
+
+ public static Schema<ExceptionWrapper> getSchema()
+ {
+ return DEFAULT_INSTANCE;
+ }
+
+ public static ExceptionWrapper getDefaultInstance()
+ {
+ return DEFAULT_INSTANCE;
+ }
+
+ static final ExceptionWrapper DEFAULT_INSTANCE = new ExceptionWrapper();
+
+
+ private String exceptionClass;
+ private String message;
+ private List<StackTraceElementWrapper> stackTrace;
+ private ExceptionWrapper cause;
+
+ public ExceptionWrapper()
+ {
+
+ }
+
+ // getters and setters
+
+ // exceptionClass
+
+ public String getExceptionClass()
+ {
+ return exceptionClass;
+ }
+
+ public ExceptionWrapper setExceptionClass(String exceptionClass)
+ {
+ this.exceptionClass = exceptionClass;
+ return this;
+ }
+
+ // message
+
+ public String getMessage()
+ {
+ return message;
+ }
+
+ public ExceptionWrapper setMessage(String message)
+ {
+ this.message = message;
+ return this;
+ }
+
+ // stackTrace
+
+ public List<StackTraceElementWrapper> getStackTraceList()
+ {
+ return stackTrace;
+ }
+
+ public ExceptionWrapper setStackTraceList(List<StackTraceElementWrapper> stackTrace)
+ {
+ this.stackTrace = stackTrace;
+ return this;
+ }
+
+ // cause
+
+ public ExceptionWrapper getCause()
+ {
+ return cause;
+ }
+
+ public ExceptionWrapper setCause(ExceptionWrapper cause)
+ {
+ this.cause = cause;
+ return this;
+ }
+
+ // java serialization
+
+ public void readExternal(ObjectInput in) throws IOException
+ {
+ GraphIOUtil.mergeDelimitedFrom(in, this, this);
+ }
+
+ public void writeExternal(ObjectOutput out) throws IOException
+ {
+ GraphIOUtil.writeDelimitedTo(out, this, this);
+ }
+
+ // message method
+
+ public Schema<ExceptionWrapper> cachedSchema()
+ {
+ return DEFAULT_INSTANCE;
+ }
+
+ // schema methods
+
+ public ExceptionWrapper newMessage()
+ {
+ return new ExceptionWrapper();
+ }
+
+ public Class<ExceptionWrapper> typeClass()
+ {
+ return ExceptionWrapper.class;
+ }
+
+ public String messageName()
+ {
+ return ExceptionWrapper.class.getSimpleName();
+ }
+
+ public String messageFullName()
+ {
+ return ExceptionWrapper.class.getName();
+ }
+
+ public boolean isInitialized(ExceptionWrapper message)
+ {
+ return true;
+ }
+
+ public void mergeFrom(Input input, ExceptionWrapper message) throws IOException
+ {
+ for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+ {
+ switch(number)
+ {
+ case 0:
+ return;
+ case 1:
+ message.exceptionClass = input.readString();
+ break;
+ case 2:
+ message.message = input.readString();
+ break;
+ case 3:
+ if(message.stackTrace == null)
+ message.stackTrace = new ArrayList<StackTraceElementWrapper>();
+ message.stackTrace.add(input.mergeObject(null, StackTraceElementWrapper.getSchema()));
+ break;
+
+ case 4:
+ message.cause = input.mergeObject(message.cause, ExceptionWrapper.getSchema());
+ break;
+
+ default:
+ input.handleUnknownField(number, this);
+ }
+ }
+ }
+
+
+ public void writeTo(Output output, ExceptionWrapper message) throws IOException
+ {
+ if(message.exceptionClass != null)
+ output.writeString(1, message.exceptionClass, false);
+
+ if(message.message != null)
+ output.writeString(2, message.message, false);
+
+ if(message.stackTrace != null)
+ {
+ for(StackTraceElementWrapper stackTrace : message.stackTrace)
+ {
+ if(stackTrace != null)
+ output.writeObject(3, stackTrace, StackTraceElementWrapper.getSchema(), true);
+ }
+ }
+
+
+ if(message.cause != null)
+ output.writeObject(4, message.cause, ExceptionWrapper.getSchema(), false);
+
+ }
+
+ public String getFieldName(int number)
+ {
+ switch(number)
+ {
+ case 1: return "exceptionClass";
+ case 2: return "message";
+ case 3: return "stackTrace";
+ case 4: return "cause";
+ default: return null;
+ }
+ }
+
+ public int getFieldNumber(String name)
+ {
+ final Integer number = __fieldMap.get(name);
+ return number == null ? 0 : number.intValue();
+ }
+
+ private static final java.util.HashMap<String,Integer> __fieldMap = new java.util.HashMap<String,Integer>();
+ static
+ {
+ __fieldMap.put("exceptionClass", 1);
+ __fieldMap.put("message", 2);
+ __fieldMap.put("stackTrace", 3);
+ __fieldMap.put("cause", 4);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/protocol/src/main/java/org/apache/drill/exec/proto/beans/InitializeFragments.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/InitializeFragments.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/InitializeFragments.java
new file mode 100644
index 0000000..f6c326d
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/InitializeFragments.java
@@ -0,0 +1,175 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by http://code.google.com/p/protostuff/ ... DO NOT EDIT!
+// Generated from protobuf
+
+package org.apache.drill.exec.proto.beans;
+
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.dyuproject.protostuff.GraphIOUtil;
+import com.dyuproject.protostuff.Input;
+import com.dyuproject.protostuff.Message;
+import com.dyuproject.protostuff.Output;
+import com.dyuproject.protostuff.Schema;
+
+public final class InitializeFragments implements Externalizable, Message<InitializeFragments>, Schema<InitializeFragments>
+{
+
+ public static Schema<InitializeFragments> getSchema()
+ {
+ return DEFAULT_INSTANCE;
+ }
+
+ public static InitializeFragments getDefaultInstance()
+ {
+ return DEFAULT_INSTANCE;
+ }
+
+ static final InitializeFragments DEFAULT_INSTANCE = new InitializeFragments();
+
+
+ private List<PlanFragment> fragment;
+
+ public InitializeFragments()
+ {
+
+ }
+
+ // getters and setters
+
+ // fragment
+
+ public List<PlanFragment> getFragmentList()
+ {
+ return fragment;
+ }
+
+ public InitializeFragments setFragmentList(List<PlanFragment> fragment)
+ {
+ this.fragment = fragment;
+ return this;
+ }
+
+ // java serialization
+
+ public void readExternal(ObjectInput in) throws IOException
+ {
+ GraphIOUtil.mergeDelimitedFrom(in, this, this);
+ }
+
+ public void writeExternal(ObjectOutput out) throws IOException
+ {
+ GraphIOUtil.writeDelimitedTo(out, this, this);
+ }
+
+ // message method
+
+ public Schema<InitializeFragments> cachedSchema()
+ {
+ return DEFAULT_INSTANCE;
+ }
+
+ // schema methods
+
+ public InitializeFragments newMessage()
+ {
+ return new InitializeFragments();
+ }
+
+ public Class<InitializeFragments> typeClass()
+ {
+ return InitializeFragments.class;
+ }
+
+ public String messageName()
+ {
+ return InitializeFragments.class.getSimpleName();
+ }
+
+ public String messageFullName()
+ {
+ return InitializeFragments.class.getName();
+ }
+
+ public boolean isInitialized(InitializeFragments message)
+ {
+ return true;
+ }
+
+ public void mergeFrom(Input input, InitializeFragments message) throws IOException
+ {
+ for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+ {
+ switch(number)
+ {
+ case 0:
+ return;
+ case 1:
+ if(message.fragment == null)
+ message.fragment = new ArrayList<PlanFragment>();
+ message.fragment.add(input.mergeObject(null, PlanFragment.getSchema()));
+ break;
+
+ default:
+ input.handleUnknownField(number, this);
+ }
+ }
+ }
+
+
+ public void writeTo(Output output, InitializeFragments message) throws IOException
+ {
+ if(message.fragment != null)
+ {
+ for(PlanFragment fragment : message.fragment)
+ {
+ if(fragment != null)
+ output.writeObject(1, fragment, PlanFragment.getSchema(), true);
+ }
+ }
+
+ }
+
+ public String getFieldName(int number)
+ {
+ switch(number)
+ {
+ case 1: return "fragment";
+ default: return null;
+ }
+ }
+
+ public int getFieldNumber(String name)
+ {
+ final Integer number = __fieldMap.get(name);
+ return number == null ? 0 : number.intValue();
+ }
+
+ private static final java.util.HashMap<String,Integer> __fieldMap = new java.util.HashMap<String,Integer>();
+ static
+ {
+ __fieldMap.put("fragment", 1);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/protocol/src/main/java/org/apache/drill/exec/proto/beans/StackTraceElementWrapper.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/StackTraceElementWrapper.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/StackTraceElementWrapper.java
new file mode 100644
index 0000000..25681fd
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/StackTraceElementWrapper.java
@@ -0,0 +1,251 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by http://code.google.com/p/protostuff/ ... DO NOT EDIT!
+// Generated from protobuf
+
+package org.apache.drill.exec.proto.beans;
+
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import com.dyuproject.protostuff.GraphIOUtil;
+import com.dyuproject.protostuff.Input;
+import com.dyuproject.protostuff.Message;
+import com.dyuproject.protostuff.Output;
+import com.dyuproject.protostuff.Schema;
+
+public final class StackTraceElementWrapper implements Externalizable, Message<StackTraceElementWrapper>, Schema<StackTraceElementWrapper>
+{
+
+ public static Schema<StackTraceElementWrapper> getSchema()
+ {
+ return DEFAULT_INSTANCE;
+ }
+
+ public static StackTraceElementWrapper getDefaultInstance()
+ {
+ return DEFAULT_INSTANCE;
+ }
+
+ static final StackTraceElementWrapper DEFAULT_INSTANCE = new StackTraceElementWrapper();
+
+
+ private String className;
+ private String fileName;
+ private int lineNumber;
+ private String methodName;
+ private Boolean isNativeMethod;
+
+ public StackTraceElementWrapper()
+ {
+
+ }
+
+ // getters and setters
+
+ // className
+
+ public String getClassName()
+ {
+ return className;
+ }
+
+ public StackTraceElementWrapper setClassName(String className)
+ {
+ this.className = className;
+ return this;
+ }
+
+ // fileName
+
+ public String getFileName()
+ {
+ return fileName;
+ }
+
+ public StackTraceElementWrapper setFileName(String fileName)
+ {
+ this.fileName = fileName;
+ return this;
+ }
+
+ // lineNumber
+
+ public int getLineNumber()
+ {
+ return lineNumber;
+ }
+
+ public StackTraceElementWrapper setLineNumber(int lineNumber)
+ {
+ this.lineNumber = lineNumber;
+ return this;
+ }
+
+ // methodName
+
+ public String getMethodName()
+ {
+ return methodName;
+ }
+
+ public StackTraceElementWrapper setMethodName(String methodName)
+ {
+ this.methodName = methodName;
+ return this;
+ }
+
+ // isNativeMethod
+
+ public Boolean getIsNativeMethod()
+ {
+ return isNativeMethod;
+ }
+
+ public StackTraceElementWrapper setIsNativeMethod(Boolean isNativeMethod)
+ {
+ this.isNativeMethod = isNativeMethod;
+ return this;
+ }
+
+ // java serialization
+
+ public void readExternal(ObjectInput in) throws IOException
+ {
+ GraphIOUtil.mergeDelimitedFrom(in, this, this);
+ }
+
+ public void writeExternal(ObjectOutput out) throws IOException
+ {
+ GraphIOUtil.writeDelimitedTo(out, this, this);
+ }
+
+ // message method
+
+ public Schema<StackTraceElementWrapper> cachedSchema()
+ {
+ return DEFAULT_INSTANCE;
+ }
+
+ // schema methods
+
+ public StackTraceElementWrapper newMessage()
+ {
+ return new StackTraceElementWrapper();
+ }
+
+ public Class<StackTraceElementWrapper> typeClass()
+ {
+ return StackTraceElementWrapper.class;
+ }
+
+ public String messageName()
+ {
+ return StackTraceElementWrapper.class.getSimpleName();
+ }
+
+ public String messageFullName()
+ {
+ return StackTraceElementWrapper.class.getName();
+ }
+
+ public boolean isInitialized(StackTraceElementWrapper message)
+ {
+ return true;
+ }
+
+ public void mergeFrom(Input input, StackTraceElementWrapper message) throws IOException
+ {
+ for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+ {
+ switch(number)
+ {
+ case 0:
+ return;
+ case 1:
+ message.className = input.readString();
+ break;
+ case 2:
+ message.fileName = input.readString();
+ break;
+ case 3:
+ message.lineNumber = input.readInt32();
+ break;
+ case 4:
+ message.methodName = input.readString();
+ break;
+ case 5:
+ message.isNativeMethod = input.readBool();
+ break;
+ default:
+ input.handleUnknownField(number, this);
+ }
+ }
+ }
+
+
+ public void writeTo(Output output, StackTraceElementWrapper message) throws IOException
+ {
+ if(message.className != null)
+ output.writeString(1, message.className, false);
+
+ if(message.fileName != null)
+ output.writeString(2, message.fileName, false);
+
+ if(message.lineNumber != 0)
+ output.writeInt32(3, message.lineNumber, false);
+
+ if(message.methodName != null)
+ output.writeString(4, message.methodName, false);
+
+ if(message.isNativeMethod != null)
+ output.writeBool(5, message.isNativeMethod, false);
+ }
+
+ public String getFieldName(int number)
+ {
+ switch(number)
+ {
+ case 1: return "className";
+ case 2: return "fileName";
+ case 3: return "lineNumber";
+ case 4: return "methodName";
+ case 5: return "isNativeMethod";
+ default: return null;
+ }
+ }
+
+ public int getFieldNumber(String name)
+ {
+ final Integer number = __fieldMap.get(name);
+ return number == null ? 0 : number.intValue();
+ }
+
+ private static final java.util.HashMap<String,Integer> __fieldMap = new java.util.HashMap<String,Integer>();
+ static
+ {
+ __fieldMap.put("className", 1);
+ __fieldMap.put("fileName", 2);
+ __fieldMap.put("lineNumber", 3);
+ __fieldMap.put("methodName", 4);
+ __fieldMap.put("isNativeMethod", 5);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/protocol/src/main/protobuf/BitControl.proto
----------------------------------------------------------------------
diff --git a/protocol/src/main/protobuf/BitControl.proto b/protocol/src/main/protobuf/BitControl.proto
index 4398b63..1fc5bb3 100644
--- a/protocol/src/main/protobuf/BitControl.proto
+++ b/protocol/src/main/protobuf/BitControl.proto
@@ -16,7 +16,7 @@ enum RpcType {
GOODBYE = 2;
// bit requests
- REQ_INIATILIZE_FRAGMENT = 3; // Returns Handle
+ REQ_INIATILIZE_FRAGMENTS = 3; // Returns Handle
REQ_CANCEL_FRAGMENT = 6; // send a cancellation message for a fragment, returns Ack
REQ_RECEIVER_FINISHED = 7;
@@ -47,6 +47,10 @@ message FragmentStatus {
optional FragmentHandle handle = 2;
}
+message InitializeFragments {
+ repeated PlanFragment fragment = 1;
+}
+
message PlanFragment {
optional FragmentHandle handle = 1;
optional float network_cost = 4;
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/protocol/src/main/protobuf/GeneralRPC.proto
----------------------------------------------------------------------
diff --git a/protocol/src/main/protobuf/GeneralRPC.proto b/protocol/src/main/protobuf/GeneralRPC.proto
index 48011bf..5538abe 100644
--- a/protocol/src/main/protobuf/GeneralRPC.proto
+++ b/protocol/src/main/protobuf/GeneralRPC.proto
@@ -28,12 +28,6 @@ message CompleteRpcMessage {
optional bytes raw_body = 3; // optional
}
-// Class to be used when an unexpected exception occurs while a rpc call is being evaluated.
-message RpcFailure {
- optional int64 error_id = 1; // for server trackback.
- optional int32 error_code = 2; // system defined error code.
- optional string short_error = 3;
- optional string long_error = 4;
-}
+
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/protocol/src/main/protobuf/UserBitShared.proto
----------------------------------------------------------------------
diff --git a/protocol/src/main/protobuf/UserBitShared.proto b/protocol/src/main/protobuf/UserBitShared.proto
index 3ad9a09..fc2e89f 100644
--- a/protocol/src/main/protobuf/UserBitShared.proto
+++ b/protocol/src/main/protobuf/UserBitShared.proto
@@ -34,9 +34,26 @@ message DrillPBError{
optional DrillbitEndpoint endpoint = 2;
optional int32 error_type = 3;
optional string message = 4;
- repeated ParsingError parsing_error = 5; //optional, used when providing location of error within a piece of text.
+ optional ExceptionWrapper exception = 5;
+ repeated ParsingError parsing_error = 6; //optional, used when providing location of error within a piece of text.
}
+message ExceptionWrapper {
+ optional string exception_class = 1;
+ optional string message = 2;
+ repeated StackTraceElementWrapper stack_trace = 3;
+ optional ExceptionWrapper cause = 4;
+}
+
+message StackTraceElementWrapper {
+ optional string class_name = 1;
+ optional string file_name = 2;
+ optional int32 line_number = 3;
+ optional string method_name = 4;
+ optional bool is_native_method = 5;
+}
+
+
message ParsingError{
optional int32 start_column = 2;
optional int32 start_row = 3;
[3/6] DRILL-1436: Remove use of UDP based cache for purposes of
intermediate PlanFragment distribution
Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/protocol/src/main/java/org/apache/drill/exec/proto/SchemaUserBitShared.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/SchemaUserBitShared.java b/protocol/src/main/java/org/apache/drill/exec/proto/SchemaUserBitShared.java
index 23fcf21..f6bd17b 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/SchemaUserBitShared.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/SchemaUserBitShared.java
@@ -273,8 +273,11 @@ public final class SchemaUserBitShared
output.writeInt32(3, message.getErrorType(), false);
if(message.hasMessage())
output.writeString(4, message.getMessage(), false);
+ if(message.hasException())
+ output.writeObject(5, message.getException(), org.apache.drill.exec.proto.SchemaUserBitShared.ExceptionWrapper.WRITE, false);
+
for(org.apache.drill.exec.proto.UserBitShared.ParsingError parsingError : message.getParsingErrorList())
- output.writeObject(5, parsingError, org.apache.drill.exec.proto.SchemaUserBitShared.ParsingError.WRITE, true);
+ output.writeObject(6, parsingError, org.apache.drill.exec.proto.SchemaUserBitShared.ParsingError.WRITE, true);
}
public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.DrillPBError message)
@@ -329,6 +332,10 @@ public final class SchemaUserBitShared
builder.setMessage(input.readString());
break;
case 5:
+ builder.setException(input.mergeObject(org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.newBuilder(), org.apache.drill.exec.proto.SchemaUserBitShared.ExceptionWrapper.MERGE));
+
+ break;
+ case 6:
builder.addParsingError(input.mergeObject(org.apache.drill.exec.proto.UserBitShared.ParsingError.newBuilder(), org.apache.drill.exec.proto.SchemaUserBitShared.ParsingError.MERGE));
break;
@@ -376,7 +383,8 @@ public final class SchemaUserBitShared
case 2: return "endpoint";
case 3: return "errorType";
case 4: return "message";
- case 5: return "parsingError";
+ case 5: return "exception";
+ case 6: return "parsingError";
default: return null;
}
}
@@ -392,7 +400,283 @@ public final class SchemaUserBitShared
fieldMap.put("endpoint", 2);
fieldMap.put("errorType", 3);
fieldMap.put("message", 4);
- fieldMap.put("parsingError", 5);
+ fieldMap.put("exception", 5);
+ fieldMap.put("parsingError", 6);
+ }
+ }
+
+ public static final class ExceptionWrapper
+ {
+ public static final org.apache.drill.exec.proto.SchemaUserBitShared.ExceptionWrapper.MessageSchema WRITE =
+ new org.apache.drill.exec.proto.SchemaUserBitShared.ExceptionWrapper.MessageSchema();
+ public static final org.apache.drill.exec.proto.SchemaUserBitShared.ExceptionWrapper.BuilderSchema MERGE =
+ new org.apache.drill.exec.proto.SchemaUserBitShared.ExceptionWrapper.BuilderSchema();
+
+ public static class MessageSchema implements com.dyuproject.protostuff.Schema<org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper>
+ {
+ public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper message) throws java.io.IOException
+ {
+ if(message.hasExceptionClass())
+ output.writeString(1, message.getExceptionClass(), false);
+ if(message.hasMessage())
+ output.writeString(2, message.getMessage(), false);
+ for(org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper stackTrace : message.getStackTraceList())
+ output.writeObject(3, stackTrace, org.apache.drill.exec.proto.SchemaUserBitShared.StackTraceElementWrapper.WRITE, true);
+
+ if(message.hasCause())
+ output.writeObject(4, message.getCause(), org.apache.drill.exec.proto.SchemaUserBitShared.ExceptionWrapper.WRITE, false);
+
+ }
+ public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper message)
+ {
+ return message.isInitialized();
+ }
+ public java.lang.String getFieldName(int number)
+ {
+ return org.apache.drill.exec.proto.SchemaUserBitShared.ExceptionWrapper.getFieldName(number);
+ }
+ public int getFieldNumber(java.lang.String name)
+ {
+ return org.apache.drill.exec.proto.SchemaUserBitShared.ExceptionWrapper.getFieldNumber(name);
+ }
+ public java.lang.Class<org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper> typeClass()
+ {
+ return org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.class;
+ }
+ public java.lang.String messageName()
+ {
+ return org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.class.getSimpleName();
+ }
+ public java.lang.String messageFullName()
+ {
+ return org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.class.getName();
+ }
+ //unused
+ public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper message) throws java.io.IOException {}
+ public org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper newMessage() { return null; }
+ }
+ public static class BuilderSchema implements com.dyuproject.protostuff.Schema<org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder>
+ {
+ public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder builder) throws java.io.IOException
+ {
+ for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+ {
+ switch(number)
+ {
+ case 0:
+ return;
+ case 1:
+ builder.setExceptionClass(input.readString());
+ break;
+ case 2:
+ builder.setMessage(input.readString());
+ break;
+ case 3:
+ builder.addStackTrace(input.mergeObject(org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.newBuilder(), org.apache.drill.exec.proto.SchemaUserBitShared.StackTraceElementWrapper.MERGE));
+
+ break;
+ case 4:
+ builder.setCause(input.mergeObject(org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.newBuilder(), org.apache.drill.exec.proto.SchemaUserBitShared.ExceptionWrapper.MERGE));
+
+ break;
+ default:
+ input.handleUnknownField(number, this);
+ }
+ }
+ }
+ public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder builder)
+ {
+ return builder.isInitialized();
+ }
+ public org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder newMessage()
+ {
+ return org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.newBuilder();
+ }
+ public java.lang.String getFieldName(int number)
+ {
+ return org.apache.drill.exec.proto.SchemaUserBitShared.ExceptionWrapper.getFieldName(number);
+ }
+ public int getFieldNumber(java.lang.String name)
+ {
+ return org.apache.drill.exec.proto.SchemaUserBitShared.ExceptionWrapper.getFieldNumber(name);
+ }
+ public java.lang.Class<org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder> typeClass()
+ {
+ return org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder.class;
+ }
+ public java.lang.String messageName()
+ {
+ return org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.class.getSimpleName();
+ }
+ public java.lang.String messageFullName()
+ {
+ return org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.class.getName();
+ }
+ //unused
+ public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder builder) throws java.io.IOException {}
+ }
+ public static java.lang.String getFieldName(int number)
+ {
+ switch(number)
+ {
+ case 1: return "exceptionClass";
+ case 2: return "message";
+ case 3: return "stackTrace";
+ case 4: return "cause";
+ default: return null;
+ }
+ }
+ public static int getFieldNumber(java.lang.String name)
+ {
+ java.lang.Integer number = fieldMap.get(name);
+ return number == null ? 0 : number.intValue();
+ }
+ private static final java.util.HashMap<java.lang.String,java.lang.Integer> fieldMap = new java.util.HashMap<java.lang.String,java.lang.Integer>();
+ static
+ {
+ fieldMap.put("exceptionClass", 1);
+ fieldMap.put("message", 2);
+ fieldMap.put("stackTrace", 3);
+ fieldMap.put("cause", 4);
+ }
+ }
+
+ public static final class StackTraceElementWrapper
+ {
+ public static final org.apache.drill.exec.proto.SchemaUserBitShared.StackTraceElementWrapper.MessageSchema WRITE =
+ new org.apache.drill.exec.proto.SchemaUserBitShared.StackTraceElementWrapper.MessageSchema();
+ public static final org.apache.drill.exec.proto.SchemaUserBitShared.StackTraceElementWrapper.BuilderSchema MERGE =
+ new org.apache.drill.exec.proto.SchemaUserBitShared.StackTraceElementWrapper.BuilderSchema();
+
+ public static class MessageSchema implements com.dyuproject.protostuff.Schema<org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper>
+ {
+ public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper message) throws java.io.IOException
+ {
+ if(message.hasClassName())
+ output.writeString(1, message.getClassName(), false);
+ if(message.hasFileName())
+ output.writeString(2, message.getFileName(), false);
+ if(message.hasLineNumber())
+ output.writeInt32(3, message.getLineNumber(), false);
+ if(message.hasMethodName())
+ output.writeString(4, message.getMethodName(), false);
+ if(message.hasIsNativeMethod())
+ output.writeBool(5, message.getIsNativeMethod(), false);
+ }
+ public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper message)
+ {
+ return message.isInitialized();
+ }
+ public java.lang.String getFieldName(int number)
+ {
+ return org.apache.drill.exec.proto.SchemaUserBitShared.StackTraceElementWrapper.getFieldName(number);
+ }
+ public int getFieldNumber(java.lang.String name)
+ {
+ return org.apache.drill.exec.proto.SchemaUserBitShared.StackTraceElementWrapper.getFieldNumber(name);
+ }
+ public java.lang.Class<org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper> typeClass()
+ {
+ return org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.class;
+ }
+ public java.lang.String messageName()
+ {
+ return org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.class.getSimpleName();
+ }
+ public java.lang.String messageFullName()
+ {
+ return org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.class.getName();
+ }
+ //unused
+ public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper message) throws java.io.IOException {}
+ public org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper newMessage() { return null; }
+ }
+ public static class BuilderSchema implements com.dyuproject.protostuff.Schema<org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder>
+ {
+ public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder builder) throws java.io.IOException
+ {
+ for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+ {
+ switch(number)
+ {
+ case 0:
+ return;
+ case 1:
+ builder.setClassName(input.readString());
+ break;
+ case 2:
+ builder.setFileName(input.readString());
+ break;
+ case 3:
+ builder.setLineNumber(input.readInt32());
+ break;
+ case 4:
+ builder.setMethodName(input.readString());
+ break;
+ case 5:
+ builder.setIsNativeMethod(input.readBool());
+ break;
+ default:
+ input.handleUnknownField(number, this);
+ }
+ }
+ }
+ public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder builder)
+ {
+ return builder.isInitialized();
+ }
+ public org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder newMessage()
+ {
+ return org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.newBuilder();
+ }
+ public java.lang.String getFieldName(int number)
+ {
+ return org.apache.drill.exec.proto.SchemaUserBitShared.StackTraceElementWrapper.getFieldName(number);
+ }
+ public int getFieldNumber(java.lang.String name)
+ {
+ return org.apache.drill.exec.proto.SchemaUserBitShared.StackTraceElementWrapper.getFieldNumber(name);
+ }
+ public java.lang.Class<org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder> typeClass()
+ {
+ return org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder.class;
+ }
+ public java.lang.String messageName()
+ {
+ return org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.class.getSimpleName();
+ }
+ public java.lang.String messageFullName()
+ {
+ return org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.class.getName();
+ }
+ //unused
+ public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder builder) throws java.io.IOException {}
+ }
+ public static java.lang.String getFieldName(int number)
+ {
+ switch(number)
+ {
+ case 1: return "className";
+ case 2: return "fileName";
+ case 3: return "lineNumber";
+ case 4: return "methodName";
+ case 5: return "isNativeMethod";
+ default: return null;
+ }
+ }
+ public static int getFieldNumber(java.lang.String name)
+ {
+ java.lang.Integer number = fieldMap.get(name);
+ return number == null ? 0 : number.intValue();
+ }
+ private static final java.util.HashMap<java.lang.String,java.lang.Integer> fieldMap = new java.util.HashMap<java.lang.String,java.lang.Integer>();
+ static
+ {
+ fieldMap.put("className", 1);
+ fieldMap.put("fileName", 2);
+ fieldMap.put("lineNumber", 3);
+ fieldMap.put("methodName", 4);
+ fieldMap.put("isNativeMethod", 5);
}
}
[4/6] DRILL-1436: Remove use of UDP based cache for purposes of
intermediate PlanFragment distribution
Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/protocol/src/main/java/org/apache/drill/exec/proto/BitControl.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/BitControl.java b/protocol/src/main/java/org/apache/drill/exec/proto/BitControl.java
index 6229d9a..a0eba74 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/BitControl.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/BitControl.java
@@ -47,13 +47,13 @@ public final class BitControl {
*/
GOODBYE(2, 2),
/**
- * <code>REQ_INIATILIZE_FRAGMENT = 3;</code>
+ * <code>REQ_INIATILIZE_FRAGMENTS = 3;</code>
*
* <pre>
* bit requests
* </pre>
*/
- REQ_INIATILIZE_FRAGMENT(3, 3),
+ REQ_INIATILIZE_FRAGMENTS(3, 3),
/**
* <code>REQ_CANCEL_FRAGMENT = 6;</code>
*
@@ -121,13 +121,13 @@ public final class BitControl {
*/
public static final int GOODBYE_VALUE = 2;
/**
- * <code>REQ_INIATILIZE_FRAGMENT = 3;</code>
+ * <code>REQ_INIATILIZE_FRAGMENTS = 3;</code>
*
* <pre>
* bit requests
* </pre>
*/
- public static final int REQ_INIATILIZE_FRAGMENT_VALUE = 3;
+ public static final int REQ_INIATILIZE_FRAGMENTS_VALUE = 3;
/**
* <code>REQ_CANCEL_FRAGMENT = 6;</code>
*
@@ -189,7 +189,7 @@ public final class BitControl {
case 0: return HANDSHAKE;
case 1: return ACK;
case 2: return GOODBYE;
- case 3: return REQ_INIATILIZE_FRAGMENT;
+ case 3: return REQ_INIATILIZE_FRAGMENTS;
case 6: return REQ_CANCEL_FRAGMENT;
case 7: return REQ_RECEIVER_FINISHED;
case 8: return REQ_FRAGMENT_STATUS;
@@ -2301,6 +2301,680 @@ public final class BitControl {
// @@protoc_insertion_point(class_scope:exec.bit.control.FragmentStatus)
}
+ public interface InitializeFragmentsOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // repeated .exec.bit.control.PlanFragment fragment = 1;
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ java.util.List<org.apache.drill.exec.proto.BitControl.PlanFragment>
+ getFragmentList();
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ org.apache.drill.exec.proto.BitControl.PlanFragment getFragment(int index);
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ int getFragmentCount();
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ java.util.List<? extends org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder>
+ getFragmentOrBuilderList();
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder getFragmentOrBuilder(
+ int index);
+ }
+ /**
+ * Protobuf type {@code exec.bit.control.InitializeFragments}
+ */
+ public static final class InitializeFragments extends
+ com.google.protobuf.GeneratedMessage
+ implements InitializeFragmentsOrBuilder {
+ // Use InitializeFragments.newBuilder() to construct.
+ private InitializeFragments(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private InitializeFragments(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final InitializeFragments defaultInstance;
+ public static InitializeFragments getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public InitializeFragments getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private InitializeFragments(
+ 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: {
+ if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+ fragment_ = new java.util.ArrayList<org.apache.drill.exec.proto.BitControl.PlanFragment>();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ fragment_.add(input.readMessage(org.apache.drill.exec.proto.BitControl.PlanFragment.PARSER, extensionRegistry));
+ 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 {
+ if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+ fragment_ = java.util.Collections.unmodifiableList(fragment_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.apache.drill.exec.proto.BitControl.internal_static_exec_bit_control_InitializeFragments_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.apache.drill.exec.proto.BitControl.internal_static_exec_bit_control_InitializeFragments_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.apache.drill.exec.proto.BitControl.InitializeFragments.class, org.apache.drill.exec.proto.BitControl.InitializeFragments.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<InitializeFragments> PARSER =
+ new com.google.protobuf.AbstractParser<InitializeFragments>() {
+ public InitializeFragments parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new InitializeFragments(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<InitializeFragments> getParserForType() {
+ return PARSER;
+ }
+
+ // repeated .exec.bit.control.PlanFragment fragment = 1;
+ public static final int FRAGMENT_FIELD_NUMBER = 1;
+ private java.util.List<org.apache.drill.exec.proto.BitControl.PlanFragment> fragment_;
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public java.util.List<org.apache.drill.exec.proto.BitControl.PlanFragment> getFragmentList() {
+ return fragment_;
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public java.util.List<? extends org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder>
+ getFragmentOrBuilderList() {
+ return fragment_;
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public int getFragmentCount() {
+ return fragment_.size();
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public org.apache.drill.exec.proto.BitControl.PlanFragment getFragment(int index) {
+ return fragment_.get(index);
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder getFragmentOrBuilder(
+ int index) {
+ return fragment_.get(index);
+ }
+
+ private void initFields() {
+ fragment_ = java.util.Collections.emptyList();
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ for (int i = 0; i < fragment_.size(); i++) {
+ output.writeMessage(1, fragment_.get(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < fragment_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, fragment_.get(i));
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ protected java.lang.Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.apache.drill.exec.proto.BitControl.InitializeFragments parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.apache.drill.exec.proto.BitControl.InitializeFragments parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.apache.drill.exec.proto.BitControl.InitializeFragments parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.apache.drill.exec.proto.BitControl.InitializeFragments parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.apache.drill.exec.proto.BitControl.InitializeFragments parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.apache.drill.exec.proto.BitControl.InitializeFragments parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.apache.drill.exec.proto.BitControl.InitializeFragments parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.apache.drill.exec.proto.BitControl.InitializeFragments parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.apache.drill.exec.proto.BitControl.InitializeFragments parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.apache.drill.exec.proto.BitControl.InitializeFragments parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.apache.drill.exec.proto.BitControl.InitializeFragments 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 exec.bit.control.InitializeFragments}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.apache.drill.exec.proto.BitControl.InitializeFragmentsOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.apache.drill.exec.proto.BitControl.internal_static_exec_bit_control_InitializeFragments_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.apache.drill.exec.proto.BitControl.internal_static_exec_bit_control_InitializeFragments_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.apache.drill.exec.proto.BitControl.InitializeFragments.class, org.apache.drill.exec.proto.BitControl.InitializeFragments.Builder.class);
+ }
+
+ // Construct using org.apache.drill.exec.proto.BitControl.InitializeFragments.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ getFragmentFieldBuilder();
+ }
+ }
+ private static Builder create() {
+ return new Builder();
+ }
+
+ public Builder clear() {
+ super.clear();
+ if (fragmentBuilder_ == null) {
+ fragment_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ fragmentBuilder_.clear();
+ }
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.apache.drill.exec.proto.BitControl.internal_static_exec_bit_control_InitializeFragments_descriptor;
+ }
+
+ public org.apache.drill.exec.proto.BitControl.InitializeFragments getDefaultInstanceForType() {
+ return org.apache.drill.exec.proto.BitControl.InitializeFragments.getDefaultInstance();
+ }
+
+ public org.apache.drill.exec.proto.BitControl.InitializeFragments build() {
+ org.apache.drill.exec.proto.BitControl.InitializeFragments result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.apache.drill.exec.proto.BitControl.InitializeFragments buildPartial() {
+ org.apache.drill.exec.proto.BitControl.InitializeFragments result = new org.apache.drill.exec.proto.BitControl.InitializeFragments(this);
+ int from_bitField0_ = bitField0_;
+ if (fragmentBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ fragment_ = java.util.Collections.unmodifiableList(fragment_);
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.fragment_ = fragment_;
+ } else {
+ result.fragment_ = fragmentBuilder_.build();
+ }
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.apache.drill.exec.proto.BitControl.InitializeFragments) {
+ return mergeFrom((org.apache.drill.exec.proto.BitControl.InitializeFragments)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.apache.drill.exec.proto.BitControl.InitializeFragments other) {
+ if (other == org.apache.drill.exec.proto.BitControl.InitializeFragments.getDefaultInstance()) return this;
+ if (fragmentBuilder_ == null) {
+ if (!other.fragment_.isEmpty()) {
+ if (fragment_.isEmpty()) {
+ fragment_ = other.fragment_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureFragmentIsMutable();
+ fragment_.addAll(other.fragment_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.fragment_.isEmpty()) {
+ if (fragmentBuilder_.isEmpty()) {
+ fragmentBuilder_.dispose();
+ fragmentBuilder_ = null;
+ fragment_ = other.fragment_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ fragmentBuilder_ =
+ com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+ getFragmentFieldBuilder() : null;
+ } else {
+ fragmentBuilder_.addAllMessages(other.fragment_);
+ }
+ }
+ }
+ 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 {
+ org.apache.drill.exec.proto.BitControl.InitializeFragments parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.apache.drill.exec.proto.BitControl.InitializeFragments) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ // repeated .exec.bit.control.PlanFragment fragment = 1;
+ private java.util.List<org.apache.drill.exec.proto.BitControl.PlanFragment> fragment_ =
+ java.util.Collections.emptyList();
+ private void ensureFragmentIsMutable() {
+ if (!((bitField0_ & 0x00000001) == 0x00000001)) {
+ fragment_ = new java.util.ArrayList<org.apache.drill.exec.proto.BitControl.PlanFragment>(fragment_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilder<
+ org.apache.drill.exec.proto.BitControl.PlanFragment, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder, org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder> fragmentBuilder_;
+
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public java.util.List<org.apache.drill.exec.proto.BitControl.PlanFragment> getFragmentList() {
+ if (fragmentBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(fragment_);
+ } else {
+ return fragmentBuilder_.getMessageList();
+ }
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public int getFragmentCount() {
+ if (fragmentBuilder_ == null) {
+ return fragment_.size();
+ } else {
+ return fragmentBuilder_.getCount();
+ }
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public org.apache.drill.exec.proto.BitControl.PlanFragment getFragment(int index) {
+ if (fragmentBuilder_ == null) {
+ return fragment_.get(index);
+ } else {
+ return fragmentBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public Builder setFragment(
+ int index, org.apache.drill.exec.proto.BitControl.PlanFragment value) {
+ if (fragmentBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureFragmentIsMutable();
+ fragment_.set(index, value);
+ onChanged();
+ } else {
+ fragmentBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public Builder setFragment(
+ int index, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) {
+ if (fragmentBuilder_ == null) {
+ ensureFragmentIsMutable();
+ fragment_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ fragmentBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public Builder addFragment(org.apache.drill.exec.proto.BitControl.PlanFragment value) {
+ if (fragmentBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureFragmentIsMutable();
+ fragment_.add(value);
+ onChanged();
+ } else {
+ fragmentBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public Builder addFragment(
+ int index, org.apache.drill.exec.proto.BitControl.PlanFragment value) {
+ if (fragmentBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureFragmentIsMutable();
+ fragment_.add(index, value);
+ onChanged();
+ } else {
+ fragmentBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public Builder addFragment(
+ org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) {
+ if (fragmentBuilder_ == null) {
+ ensureFragmentIsMutable();
+ fragment_.add(builderForValue.build());
+ onChanged();
+ } else {
+ fragmentBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public Builder addFragment(
+ int index, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder builderForValue) {
+ if (fragmentBuilder_ == null) {
+ ensureFragmentIsMutable();
+ fragment_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ fragmentBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public Builder addAllFragment(
+ java.lang.Iterable<? extends org.apache.drill.exec.proto.BitControl.PlanFragment> values) {
+ if (fragmentBuilder_ == null) {
+ ensureFragmentIsMutable();
+ super.addAll(values, fragment_);
+ onChanged();
+ } else {
+ fragmentBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public Builder clearFragment() {
+ if (fragmentBuilder_ == null) {
+ fragment_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ fragmentBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public Builder removeFragment(int index) {
+ if (fragmentBuilder_ == null) {
+ ensureFragmentIsMutable();
+ fragment_.remove(index);
+ onChanged();
+ } else {
+ fragmentBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public org.apache.drill.exec.proto.BitControl.PlanFragment.Builder getFragmentBuilder(
+ int index) {
+ return getFragmentFieldBuilder().getBuilder(index);
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder getFragmentOrBuilder(
+ int index) {
+ if (fragmentBuilder_ == null) {
+ return fragment_.get(index); } else {
+ return fragmentBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public java.util.List<? extends org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder>
+ getFragmentOrBuilderList() {
+ if (fragmentBuilder_ != null) {
+ return fragmentBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(fragment_);
+ }
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public org.apache.drill.exec.proto.BitControl.PlanFragment.Builder addFragmentBuilder() {
+ return getFragmentFieldBuilder().addBuilder(
+ org.apache.drill.exec.proto.BitControl.PlanFragment.getDefaultInstance());
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public org.apache.drill.exec.proto.BitControl.PlanFragment.Builder addFragmentBuilder(
+ int index) {
+ return getFragmentFieldBuilder().addBuilder(
+ index, org.apache.drill.exec.proto.BitControl.PlanFragment.getDefaultInstance());
+ }
+ /**
+ * <code>repeated .exec.bit.control.PlanFragment fragment = 1;</code>
+ */
+ public java.util.List<org.apache.drill.exec.proto.BitControl.PlanFragment.Builder>
+ getFragmentBuilderList() {
+ return getFragmentFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilder<
+ org.apache.drill.exec.proto.BitControl.PlanFragment, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder, org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder>
+ getFragmentFieldBuilder() {
+ if (fragmentBuilder_ == null) {
+ fragmentBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+ org.apache.drill.exec.proto.BitControl.PlanFragment, org.apache.drill.exec.proto.BitControl.PlanFragment.Builder, org.apache.drill.exec.proto.BitControl.PlanFragmentOrBuilder>(
+ fragment_,
+ ((bitField0_ & 0x00000001) == 0x00000001),
+ getParentForChildren(),
+ isClean());
+ fragment_ = null;
+ }
+ return fragmentBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:exec.bit.control.InitializeFragments)
+ }
+
+ static {
+ defaultInstance = new InitializeFragments(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:exec.bit.control.InitializeFragments)
+ }
+
public interface PlanFragmentOrBuilder
extends com.google.protobuf.MessageOrBuilder {
@@ -5905,6 +6579,11 @@ public final class BitControl {
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_exec_bit_control_FragmentStatus_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_exec_bit_control_InitializeFragments_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_exec_bit_control_InitializeFragments_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
internal_static_exec_bit_control_PlanFragment_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
@@ -5938,32 +6617,34 @@ public final class BitControl {
"2 .exec.bit.control.FragmentStatus\"n\n\016Fr" +
"agmentStatus\0222\n\007profile\030\001 \001(\0132!.exec.sha" +
"red.MinorFragmentProfile\022(\n\006handle\030\002 \001(\013",
- "2\030.exec.bit.FragmentHandle\"\275\003\n\014PlanFragm" +
- "ent\022(\n\006handle\030\001 \001(\0132\030.exec.bit.FragmentH" +
- "andle\022\024\n\014network_cost\030\004 \001(\002\022\020\n\010cpu_cost\030" +
- "\005 \001(\002\022\021\n\tdisk_cost\030\006 \001(\002\022\023\n\013memory_cost\030" +
- "\007 \001(\002\022\025\n\rfragment_json\030\010 \001(\t\022*\n\nassignme" +
- "nt\030\n \001(\0132\026.exec.DrillbitEndpoint\022\025\n\rleaf" +
- "_fragment\030\t \001(\010\022\'\n\007foreman\030\013 \001(\0132\026.exec." +
- "DrillbitEndpoint\022\035\n\013mem_initial\030\014 \001(\003:\0102" +
- "0000000\022\033\n\007mem_max\030\r \001(\003:\n2000000000\022\030\n\020" +
- "query_start_time\030\016 \001(\003\0221\n\013credentials\030\017 ",
- "\001(\0132\034.exec.shared.UserCredentials\022\021\n\ttim" +
- "e_zone\030\020 \001(\005\022\024\n\014options_json\030\021 \001(\t\"f\n\017Wo" +
- "rkQueueStatus\022(\n\010endpoint\030\001 \001(\0132\026.exec.D" +
- "rillbitEndpoint\022\024\n\014queue_length\030\002 \001(\005\022\023\n" +
- "\013report_time\030\003 \001(\003\"h\n\020FinishedReceiver\022*" +
- "\n\010receiver\030\001 \001(\0132\030.exec.bit.FragmentHand" +
- "le\022(\n\006sender\030\002 \001(\0132\030.exec.bit.FragmentHa" +
- "ndle*\242\002\n\007RpcType\022\r\n\tHANDSHAKE\020\000\022\007\n\003ACK\020\001" +
- "\022\013\n\007GOODBYE\020\002\022\033\n\027REQ_INIATILIZE_FRAGMENT" +
- "\020\003\022\027\n\023REQ_CANCEL_FRAGMENT\020\006\022\031\n\025REQ_RECEI",
- "VER_FINISHED\020\007\022\027\n\023REQ_FRAGMENT_STATUS\020\010\022" +
- "\022\n\016REQ_BIT_STATUS\020\t\022\024\n\020REQ_QUERY_STATUS\020" +
- "\n\022\030\n\024RESP_FRAGMENT_HANDLE\020\013\022\030\n\024RESP_FRAG" +
- "MENT_STATUS\020\014\022\023\n\017RESP_BIT_STATUS\020\r\022\025\n\021RE" +
- "SP_QUERY_STATUS\020\016B+\n\033org.apache.drill.ex" +
- "ec.protoB\nBitControlH\001"
+ "2\030.exec.bit.FragmentHandle\"G\n\023Initialize" +
+ "Fragments\0220\n\010fragment\030\001 \003(\0132\036.exec.bit.c" +
+ "ontrol.PlanFragment\"\275\003\n\014PlanFragment\022(\n\006" +
+ "handle\030\001 \001(\0132\030.exec.bit.FragmentHandle\022\024" +
+ "\n\014network_cost\030\004 \001(\002\022\020\n\010cpu_cost\030\005 \001(\002\022\021" +
+ "\n\tdisk_cost\030\006 \001(\002\022\023\n\013memory_cost\030\007 \001(\002\022\025" +
+ "\n\rfragment_json\030\010 \001(\t\022*\n\nassignment\030\n \001(" +
+ "\0132\026.exec.DrillbitEndpoint\022\025\n\rleaf_fragme" +
+ "nt\030\t \001(\010\022\'\n\007foreman\030\013 \001(\0132\026.exec.Drillbi" +
+ "tEndpoint\022\035\n\013mem_initial\030\014 \001(\003:\01020000000",
+ "\022\033\n\007mem_max\030\r \001(\003:\n2000000000\022\030\n\020query_s" +
+ "tart_time\030\016 \001(\003\0221\n\013credentials\030\017 \001(\0132\034.e" +
+ "xec.shared.UserCredentials\022\021\n\ttime_zone\030" +
+ "\020 \001(\005\022\024\n\014options_json\030\021 \001(\t\"f\n\017WorkQueue" +
+ "Status\022(\n\010endpoint\030\001 \001(\0132\026.exec.Drillbit" +
+ "Endpoint\022\024\n\014queue_length\030\002 \001(\005\022\023\n\013report" +
+ "_time\030\003 \001(\003\"h\n\020FinishedReceiver\022*\n\010recei" +
+ "ver\030\001 \001(\0132\030.exec.bit.FragmentHandle\022(\n\006s" +
+ "ender\030\002 \001(\0132\030.exec.bit.FragmentHandle*\243\002" +
+ "\n\007RpcType\022\r\n\tHANDSHAKE\020\000\022\007\n\003ACK\020\001\022\013\n\007GOO",
+ "DBYE\020\002\022\034\n\030REQ_INIATILIZE_FRAGMENTS\020\003\022\027\n\023" +
+ "REQ_CANCEL_FRAGMENT\020\006\022\031\n\025REQ_RECEIVER_FI" +
+ "NISHED\020\007\022\027\n\023REQ_FRAGMENT_STATUS\020\010\022\022\n\016REQ" +
+ "_BIT_STATUS\020\t\022\024\n\020REQ_QUERY_STATUS\020\n\022\030\n\024R" +
+ "ESP_FRAGMENT_HANDLE\020\013\022\030\n\024RESP_FRAGMENT_S" +
+ "TATUS\020\014\022\023\n\017RESP_BIT_STATUS\020\r\022\025\n\021RESP_QUE" +
+ "RY_STATUS\020\016B+\n\033org.apache.drill.exec.pro" +
+ "toB\nBitControlH\001"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@@ -5988,20 +6669,26 @@ public final class BitControl {
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_exec_bit_control_FragmentStatus_descriptor,
new java.lang.String[] { "Profile", "Handle", });
- internal_static_exec_bit_control_PlanFragment_descriptor =
+ internal_static_exec_bit_control_InitializeFragments_descriptor =
getDescriptor().getMessageTypes().get(3);
+ internal_static_exec_bit_control_InitializeFragments_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_exec_bit_control_InitializeFragments_descriptor,
+ new java.lang.String[] { "Fragment", });
+ internal_static_exec_bit_control_PlanFragment_descriptor =
+ getDescriptor().getMessageTypes().get(4);
internal_static_exec_bit_control_PlanFragment_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_exec_bit_control_PlanFragment_descriptor,
new java.lang.String[] { "Handle", "NetworkCost", "CpuCost", "DiskCost", "MemoryCost", "FragmentJson", "Assignment", "LeafFragment", "Foreman", "MemInitial", "MemMax", "QueryStartTime", "Credentials", "TimeZone", "OptionsJson", });
internal_static_exec_bit_control_WorkQueueStatus_descriptor =
- getDescriptor().getMessageTypes().get(4);
+ getDescriptor().getMessageTypes().get(5);
internal_static_exec_bit_control_WorkQueueStatus_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_exec_bit_control_WorkQueueStatus_descriptor,
new java.lang.String[] { "Endpoint", "QueueLength", "ReportTime", });
internal_static_exec_bit_control_FinishedReceiver_descriptor =
- getDescriptor().getMessageTypes().get(5);
+ getDescriptor().getMessageTypes().get(6);
internal_static_exec_bit_control_FinishedReceiver_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_exec_bit_control_FinishedReceiver_descriptor,
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/protocol/src/main/java/org/apache/drill/exec/proto/GeneralRPCProtos.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/GeneralRPCProtos.java b/protocol/src/main/java/org/apache/drill/exec/proto/GeneralRPCProtos.java
index 5e37123..f47e719 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/GeneralRPCProtos.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/GeneralRPCProtos.java
@@ -1942,867 +1942,6 @@ public final class GeneralRPCProtos {
// @@protoc_insertion_point(class_scope:exec.rpc.CompleteRpcMessage)
}
- public interface RpcFailureOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // optional int64 error_id = 1;
- /**
- * <code>optional int64 error_id = 1;</code>
- *
- * <pre>
- * for server trackback.
- * </pre>
- */
- boolean hasErrorId();
- /**
- * <code>optional int64 error_id = 1;</code>
- *
- * <pre>
- * for server trackback.
- * </pre>
- */
- long getErrorId();
-
- // optional int32 error_code = 2;
- /**
- * <code>optional int32 error_code = 2;</code>
- *
- * <pre>
- * system defined error code.
- * </pre>
- */
- boolean hasErrorCode();
- /**
- * <code>optional int32 error_code = 2;</code>
- *
- * <pre>
- * system defined error code.
- * </pre>
- */
- int getErrorCode();
-
- // optional string short_error = 3;
- /**
- * <code>optional string short_error = 3;</code>
- */
- boolean hasShortError();
- /**
- * <code>optional string short_error = 3;</code>
- */
- java.lang.String getShortError();
- /**
- * <code>optional string short_error = 3;</code>
- */
- com.google.protobuf.ByteString
- getShortErrorBytes();
-
- // optional string long_error = 4;
- /**
- * <code>optional string long_error = 4;</code>
- */
- boolean hasLongError();
- /**
- * <code>optional string long_error = 4;</code>
- */
- java.lang.String getLongError();
- /**
- * <code>optional string long_error = 4;</code>
- */
- com.google.protobuf.ByteString
- getLongErrorBytes();
- }
- /**
- * Protobuf type {@code exec.rpc.RpcFailure}
- *
- * <pre>
- * Class to be used when an unexpected exception occurs while a rpc call is being evaluated.
- * </pre>
- */
- public static final class RpcFailure extends
- com.google.protobuf.GeneratedMessage
- implements RpcFailureOrBuilder {
- // Use RpcFailure.newBuilder() to construct.
- private RpcFailure(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
- private RpcFailure(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
- private static final RpcFailure defaultInstance;
- public static RpcFailure getDefaultInstance() {
- return defaultInstance;
- }
-
- public RpcFailure getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private RpcFailure(
- 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_ |= 0x00000001;
- errorId_ = input.readInt64();
- break;
- }
- case 16: {
- bitField0_ |= 0x00000002;
- errorCode_ = input.readInt32();
- break;
- }
- case 26: {
- bitField0_ |= 0x00000004;
- shortError_ = input.readBytes();
- break;
- }
- case 34: {
- bitField0_ |= 0x00000008;
- longError_ = 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.drill.exec.proto.GeneralRPCProtos.internal_static_exec_rpc_RpcFailure_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.apache.drill.exec.proto.GeneralRPCProtos.internal_static_exec_rpc_RpcFailure_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.class, org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.Builder.class);
- }
-
- public static com.google.protobuf.Parser<RpcFailure> PARSER =
- new com.google.protobuf.AbstractParser<RpcFailure>() {
- public RpcFailure parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new RpcFailure(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<RpcFailure> getParserForType() {
- return PARSER;
- }
-
- private int bitField0_;
- // optional int64 error_id = 1;
- public static final int ERROR_ID_FIELD_NUMBER = 1;
- private long errorId_;
- /**
- * <code>optional int64 error_id = 1;</code>
- *
- * <pre>
- * for server trackback.
- * </pre>
- */
- public boolean hasErrorId() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * <code>optional int64 error_id = 1;</code>
- *
- * <pre>
- * for server trackback.
- * </pre>
- */
- public long getErrorId() {
- return errorId_;
- }
-
- // optional int32 error_code = 2;
- public static final int ERROR_CODE_FIELD_NUMBER = 2;
- private int errorCode_;
- /**
- * <code>optional int32 error_code = 2;</code>
- *
- * <pre>
- * system defined error code.
- * </pre>
- */
- public boolean hasErrorCode() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * <code>optional int32 error_code = 2;</code>
- *
- * <pre>
- * system defined error code.
- * </pre>
- */
- public int getErrorCode() {
- return errorCode_;
- }
-
- // optional string short_error = 3;
- public static final int SHORT_ERROR_FIELD_NUMBER = 3;
- private java.lang.Object shortError_;
- /**
- * <code>optional string short_error = 3;</code>
- */
- public boolean hasShortError() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * <code>optional string short_error = 3;</code>
- */
- public java.lang.String getShortError() {
- java.lang.Object ref = shortError_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- shortError_ = s;
- }
- return s;
- }
- }
- /**
- * <code>optional string short_error = 3;</code>
- */
- public com.google.protobuf.ByteString
- getShortErrorBytes() {
- java.lang.Object ref = shortError_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- shortError_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional string long_error = 4;
- public static final int LONG_ERROR_FIELD_NUMBER = 4;
- private java.lang.Object longError_;
- /**
- * <code>optional string long_error = 4;</code>
- */
- public boolean hasLongError() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- /**
- * <code>optional string long_error = 4;</code>
- */
- public java.lang.String getLongError() {
- java.lang.Object ref = longError_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- longError_ = s;
- }
- return s;
- }
- }
- /**
- * <code>optional string long_error = 4;</code>
- */
- public com.google.protobuf.ByteString
- getLongErrorBytes() {
- java.lang.Object ref = longError_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- longError_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private void initFields() {
- errorId_ = 0L;
- errorCode_ = 0;
- shortError_ = "";
- longError_ = "";
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeInt64(1, errorId_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeInt32(2, errorCode_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeBytes(3, getShortErrorBytes());
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- output.writeBytes(4, getLongErrorBytes());
- }
- 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
- .computeInt64Size(1, errorId_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(2, errorCode_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(3, getShortErrorBytes());
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(4, getLongErrorBytes());
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
- }
- public static org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
- }
- public static org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure 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 exec.rpc.RpcFailure}
- *
- * <pre>
- * Class to be used when an unexpected exception occurs while a rpc call is being evaluated.
- * </pre>
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder>
- implements org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailureOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.apache.drill.exec.proto.GeneralRPCProtos.internal_static_exec_rpc_RpcFailure_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.apache.drill.exec.proto.GeneralRPCProtos.internal_static_exec_rpc_RpcFailure_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.class, org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.Builder.class);
- }
-
- // Construct using org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
- }
- }
- private static Builder create() {
- return new Builder();
- }
-
- public Builder clear() {
- super.clear();
- errorId_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000001);
- errorCode_ = 0;
- bitField0_ = (bitField0_ & ~0x00000002);
- shortError_ = "";
- bitField0_ = (bitField0_ & ~0x00000004);
- longError_ = "";
- bitField0_ = (bitField0_ & ~0x00000008);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.apache.drill.exec.proto.GeneralRPCProtos.internal_static_exec_rpc_RpcFailure_descriptor;
- }
-
- public org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure getDefaultInstanceForType() {
- return org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.getDefaultInstance();
- }
-
- public org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure build() {
- org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure buildPartial() {
- org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure result = new org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.errorId_ = errorId_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000002;
- }
- result.errorCode_ = errorCode_;
- if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
- to_bitField0_ |= 0x00000004;
- }
- result.shortError_ = shortError_;
- if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
- to_bitField0_ |= 0x00000008;
- }
- result.longError_ = longError_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure) {
- return mergeFrom((org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure other) {
- if (other == org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.getDefaultInstance()) return this;
- if (other.hasErrorId()) {
- setErrorId(other.getErrorId());
- }
- if (other.hasErrorCode()) {
- setErrorCode(other.getErrorCode());
- }
- if (other.hasShortError()) {
- bitField0_ |= 0x00000004;
- shortError_ = other.shortError_;
- onChanged();
- }
- if (other.hasLongError()) {
- bitField0_ |= 0x00000008;
- longError_ = other.longError_;
- 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 {
- org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure) e.getUnfinishedMessage();
- throw e;
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- // optional int64 error_id = 1;
- private long errorId_ ;
- /**
- * <code>optional int64 error_id = 1;</code>
- *
- * <pre>
- * for server trackback.
- * </pre>
- */
- public boolean hasErrorId() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * <code>optional int64 error_id = 1;</code>
- *
- * <pre>
- * for server trackback.
- * </pre>
- */
- public long getErrorId() {
- return errorId_;
- }
- /**
- * <code>optional int64 error_id = 1;</code>
- *
- * <pre>
- * for server trackback.
- * </pre>
- */
- public Builder setErrorId(long value) {
- bitField0_ |= 0x00000001;
- errorId_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>optional int64 error_id = 1;</code>
- *
- * <pre>
- * for server trackback.
- * </pre>
- */
- public Builder clearErrorId() {
- bitField0_ = (bitField0_ & ~0x00000001);
- errorId_ = 0L;
- onChanged();
- return this;
- }
-
- // optional int32 error_code = 2;
- private int errorCode_ ;
- /**
- * <code>optional int32 error_code = 2;</code>
- *
- * <pre>
- * system defined error code.
- * </pre>
- */
- public boolean hasErrorCode() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * <code>optional int32 error_code = 2;</code>
- *
- * <pre>
- * system defined error code.
- * </pre>
- */
- public int getErrorCode() {
- return errorCode_;
- }
- /**
- * <code>optional int32 error_code = 2;</code>
- *
- * <pre>
- * system defined error code.
- * </pre>
- */
- public Builder setErrorCode(int value) {
- bitField0_ |= 0x00000002;
- errorCode_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>optional int32 error_code = 2;</code>
- *
- * <pre>
- * system defined error code.
- * </pre>
- */
- public Builder clearErrorCode() {
- bitField0_ = (bitField0_ & ~0x00000002);
- errorCode_ = 0;
- onChanged();
- return this;
- }
-
- // optional string short_error = 3;
- private java.lang.Object shortError_ = "";
- /**
- * <code>optional string short_error = 3;</code>
- */
- public boolean hasShortError() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * <code>optional string short_error = 3;</code>
- */
- public java.lang.String getShortError() {
- java.lang.Object ref = shortError_;
- if (!(ref instanceof java.lang.String)) {
- java.lang.String s = ((com.google.protobuf.ByteString) ref)
- .toStringUtf8();
- shortError_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>optional string short_error = 3;</code>
- */
- public com.google.protobuf.ByteString
- getShortErrorBytes() {
- java.lang.Object ref = shortError_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- shortError_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>optional string short_error = 3;</code>
- */
- public Builder setShortError(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
- shortError_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>optional string short_error = 3;</code>
- */
- public Builder clearShortError() {
- bitField0_ = (bitField0_ & ~0x00000004);
- shortError_ = getDefaultInstance().getShortError();
- onChanged();
- return this;
- }
- /**
- * <code>optional string short_error = 3;</code>
- */
- public Builder setShortErrorBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
- shortError_ = value;
- onChanged();
- return this;
- }
-
- // optional string long_error = 4;
- private java.lang.Object longError_ = "";
- /**
- * <code>optional string long_error = 4;</code>
- */
- public boolean hasLongError() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- /**
- * <code>optional string long_error = 4;</code>
- */
- public java.lang.String getLongError() {
- java.lang.Object ref = longError_;
- if (!(ref instanceof java.lang.String)) {
- java.lang.String s = ((com.google.protobuf.ByteString) ref)
- .toStringUtf8();
- longError_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>optional string long_error = 4;</code>
- */
- public com.google.protobuf.ByteString
- getLongErrorBytes() {
- java.lang.Object ref = longError_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- longError_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>optional string long_error = 4;</code>
- */
- public Builder setLongError(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000008;
- longError_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>optional string long_error = 4;</code>
- */
- public Builder clearLongError() {
- bitField0_ = (bitField0_ & ~0x00000008);
- longError_ = getDefaultInstance().getLongError();
- onChanged();
- return this;
- }
- /**
- * <code>optional string long_error = 4;</code>
- */
- public Builder setLongErrorBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000008;
- longError_ = value;
- onChanged();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:exec.rpc.RpcFailure)
- }
-
- static {
- defaultInstance = new RpcFailure(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:exec.rpc.RpcFailure)
- }
-
private static com.google.protobuf.Descriptors.Descriptor
internal_static_exec_rpc_Ack_descriptor;
private static
@@ -2818,11 +1957,6 @@ public final class GeneralRPCProtos {
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_exec_rpc_CompleteRpcMessage_fieldAccessorTable;
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_exec_rpc_RpcFailure_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_exec_rpc_RpcFailure_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
@@ -2838,12 +1972,10 @@ public final class GeneralRPCProtos {
"rdination_id\030\002 \001(\005\022\020\n\010rpc_type\030\003 \001(\005\"b\n\022" +
"CompleteRpcMessage\022#\n\006header\030\001 \001(\0132\023.exe" +
"c.rpc.RpcHeader\022\025\n\rprotobuf_body\030\002 \001(\014\022\020" +
- "\n\010raw_body\030\003 \001(\014\"[\n\nRpcFailure\022\020\n\010error_" +
- "id\030\001 \001(\003\022\022\n\nerror_code\030\002 \001(\005\022\023\n\013short_er" +
- "ror\030\003 \001(\t\022\022\n\nlong_error\030\004 \001(\t*:\n\007RpcMode" +
- "\022\013\n\007REQUEST\020\000\022\014\n\010RESPONSE\020\001\022\024\n\020RESPONSE_",
- "FAILURE\020\002B1\n\033org.apache.drill.exec.proto" +
- "B\020GeneralRPCProtosH\001"
+ "\n\010raw_body\030\003 \001(\014*:\n\007RpcMode\022\013\n\007REQUEST\020\000" +
+ "\022\014\n\010RESPONSE\020\001\022\024\n\020RESPONSE_FAILURE\020\002B1\n\033" +
+ "org.apache.drill.exec.protoB\020GeneralRPCP" +
+ "rotosH\001"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@@ -2868,12 +2000,6 @@ public final class GeneralRPCProtos {
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_exec_rpc_CompleteRpcMessage_descriptor,
new java.lang.String[] { "Header", "ProtobufBody", "RawBody", });
- internal_static_exec_rpc_RpcFailure_descriptor =
- getDescriptor().getMessageTypes().get(3);
- internal_static_exec_rpc_RpcFailure_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_exec_rpc_RpcFailure_descriptor,
- new java.lang.String[] { "ErrorId", "ErrorCode", "ShortError", "LongError", });
return null;
}
};
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/protocol/src/main/java/org/apache/drill/exec/proto/SchemaBitControl.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/SchemaBitControl.java b/protocol/src/main/java/org/apache/drill/exec/proto/SchemaBitControl.java
index 7b2c4d7..5e7562e 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/SchemaBitControl.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/SchemaBitControl.java
@@ -386,6 +386,119 @@ public final class SchemaBitControl
}
}
+ public static final class InitializeFragments
+ {
+ public static final org.apache.drill.exec.proto.SchemaBitControl.InitializeFragments.MessageSchema WRITE =
+ new org.apache.drill.exec.proto.SchemaBitControl.InitializeFragments.MessageSchema();
+ public static final org.apache.drill.exec.proto.SchemaBitControl.InitializeFragments.BuilderSchema MERGE =
+ new org.apache.drill.exec.proto.SchemaBitControl.InitializeFragments.BuilderSchema();
+
+ public static class MessageSchema implements com.dyuproject.protostuff.Schema<org.apache.drill.exec.proto.BitControl.InitializeFragments>
+ {
+ public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.BitControl.InitializeFragments message) throws java.io.IOException
+ {
+ for(org.apache.drill.exec.proto.BitControl.PlanFragment fragment : message.getFragmentList())
+ output.writeObject(1, fragment, org.apache.drill.exec.proto.SchemaBitControl.PlanFragment.WRITE, true);
+
+ }
+ public boolean isInitialized(org.apache.drill.exec.proto.BitControl.InitializeFragments message)
+ {
+ return message.isInitialized();
+ }
+ public java.lang.String getFieldName(int number)
+ {
+ return org.apache.drill.exec.proto.SchemaBitControl.InitializeFragments.getFieldName(number);
+ }
+ public int getFieldNumber(java.lang.String name)
+ {
+ return org.apache.drill.exec.proto.SchemaBitControl.InitializeFragments.getFieldNumber(name);
+ }
+ public java.lang.Class<org.apache.drill.exec.proto.BitControl.InitializeFragments> typeClass()
+ {
+ return org.apache.drill.exec.proto.BitControl.InitializeFragments.class;
+ }
+ public java.lang.String messageName()
+ {
+ return org.apache.drill.exec.proto.BitControl.InitializeFragments.class.getSimpleName();
+ }
+ public java.lang.String messageFullName()
+ {
+ return org.apache.drill.exec.proto.BitControl.InitializeFragments.class.getName();
+ }
+ //unused
+ public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.exec.proto.BitControl.InitializeFragments message) throws java.io.IOException {}
+ public org.apache.drill.exec.proto.BitControl.InitializeFragments newMessage() { return null; }
+ }
+ public static class BuilderSchema implements com.dyuproject.protostuff.Schema<org.apache.drill.exec.proto.BitControl.InitializeFragments.Builder>
+ {
+ public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.exec.proto.BitControl.InitializeFragments.Builder builder) throws java.io.IOException
+ {
+ for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+ {
+ switch(number)
+ {
+ case 0:
+ return;
+ case 1:
+ builder.addFragment(input.mergeObject(org.apache.drill.exec.proto.BitControl.PlanFragment.newBuilder(), org.apache.drill.exec.proto.SchemaBitControl.PlanFragment.MERGE));
+
+ break;
+ default:
+ input.handleUnknownField(number, this);
+ }
+ }
+ }
+ public boolean isInitialized(org.apache.drill.exec.proto.BitControl.InitializeFragments.Builder builder)
+ {
+ return builder.isInitialized();
+ }
+ public org.apache.drill.exec.proto.BitControl.InitializeFragments.Builder newMessage()
+ {
+ return org.apache.drill.exec.proto.BitControl.InitializeFragments.newBuilder();
+ }
+ public java.lang.String getFieldName(int number)
+ {
+ return org.apache.drill.exec.proto.SchemaBitControl.InitializeFragments.getFieldName(number);
+ }
+ public int getFieldNumber(java.lang.String name)
+ {
+ return org.apache.drill.exec.proto.SchemaBitControl.InitializeFragments.getFieldNumber(name);
+ }
+ public java.lang.Class<org.apache.drill.exec.proto.BitControl.InitializeFragments.Builder> typeClass()
+ {
+ return org.apache.drill.exec.proto.BitControl.InitializeFragments.Builder.class;
+ }
+ public java.lang.String messageName()
+ {
+ return org.apache.drill.exec.proto.BitControl.InitializeFragments.class.getSimpleName();
+ }
+ public java.lang.String messageFullName()
+ {
+ return org.apache.drill.exec.proto.BitControl.InitializeFragments.class.getName();
+ }
+ //unused
+ public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.BitControl.InitializeFragments.Builder builder) throws java.io.IOException {}
+ }
+ public static java.lang.String getFieldName(int number)
+ {
+ switch(number)
+ {
+ case 1: return "fragment";
+ default: return null;
+ }
+ }
+ public static int getFieldNumber(java.lang.String name)
+ {
+ java.lang.Integer number = fieldMap.get(name);
+ return number == null ? 0 : number.intValue();
+ }
+ private static final java.util.HashMap<java.lang.String,java.lang.Integer> fieldMap = new java.util.HashMap<java.lang.String,java.lang.Integer>();
+ static
+ {
+ fieldMap.put("fragment", 1);
+ }
+ }
+
public static final class PlanFragment
{
public static final org.apache.drill.exec.proto.SchemaBitControl.PlanFragment.MessageSchema WRITE =
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/protocol/src/main/java/org/apache/drill/exec/proto/SchemaGeneralRPCProtos.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/SchemaGeneralRPCProtos.java b/protocol/src/main/java/org/apache/drill/exec/proto/SchemaGeneralRPCProtos.java
index 087cc0d..afe607f 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/SchemaGeneralRPCProtos.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/SchemaGeneralRPCProtos.java
@@ -389,136 +389,4 @@ public final class SchemaGeneralRPCProtos
}
}
- public static final class RpcFailure
- {
- public static final org.apache.drill.exec.proto.SchemaGeneralRPCProtos.RpcFailure.MessageSchema WRITE =
- new org.apache.drill.exec.proto.SchemaGeneralRPCProtos.RpcFailure.MessageSchema();
- public static final org.apache.drill.exec.proto.SchemaGeneralRPCProtos.RpcFailure.BuilderSchema MERGE =
- new org.apache.drill.exec.proto.SchemaGeneralRPCProtos.RpcFailure.BuilderSchema();
-
- public static class MessageSchema implements com.dyuproject.protostuff.Schema<org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure>
- {
- public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure message) throws java.io.IOException
- {
- if(message.hasErrorId())
- output.writeInt64(1, message.getErrorId(), false);
- if(message.hasErrorCode())
- output.writeInt32(2, message.getErrorCode(), false);
- if(message.hasShortError())
- output.writeString(3, message.getShortError(), false);
- if(message.hasLongError())
- output.writeString(4, message.getLongError(), false);
- }
- public boolean isInitialized(org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure message)
- {
- return message.isInitialized();
- }
- public java.lang.String getFieldName(int number)
- {
- return org.apache.drill.exec.proto.SchemaGeneralRPCProtos.RpcFailure.getFieldName(number);
- }
- public int getFieldNumber(java.lang.String name)
- {
- return org.apache.drill.exec.proto.SchemaGeneralRPCProtos.RpcFailure.getFieldNumber(name);
- }
- public java.lang.Class<org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure> typeClass()
- {
- return org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.class;
- }
- public java.lang.String messageName()
- {
- return org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.class.getSimpleName();
- }
- public java.lang.String messageFullName()
- {
- return org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.class.getName();
- }
- //unused
- public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure message) throws java.io.IOException {}
- public org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure newMessage() { return null; }
- }
- public static class BuilderSchema implements com.dyuproject.protostuff.Schema<org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.Builder>
- {
- public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.Builder builder) throws java.io.IOException
- {
- for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
- {
- switch(number)
- {
- case 0:
- return;
- case 1:
- builder.setErrorId(input.readInt64());
- break;
- case 2:
- builder.setErrorCode(input.readInt32());
- break;
- case 3:
- builder.setShortError(input.readString());
- break;
- case 4:
- builder.setLongError(input.readString());
- break;
- default:
- input.handleUnknownField(number, this);
- }
- }
- }
- public boolean isInitialized(org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.Builder builder)
- {
- return builder.isInitialized();
- }
- public org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.Builder newMessage()
- {
- return org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.newBuilder();
- }
- public java.lang.String getFieldName(int number)
- {
- return org.apache.drill.exec.proto.SchemaGeneralRPCProtos.RpcFailure.getFieldName(number);
- }
- public int getFieldNumber(java.lang.String name)
- {
- return org.apache.drill.exec.proto.SchemaGeneralRPCProtos.RpcFailure.getFieldNumber(name);
- }
- public java.lang.Class<org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.Builder> typeClass()
- {
- return org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.Builder.class;
- }
- public java.lang.String messageName()
- {
- return org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.class.getSimpleName();
- }
- public java.lang.String messageFullName()
- {
- return org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.class.getName();
- }
- //unused
- public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure.Builder builder) throws java.io.IOException {}
- }
- public static java.lang.String getFieldName(int number)
- {
- switch(number)
- {
- case 1: return "errorId";
- case 2: return "errorCode";
- case 3: return "shortError";
- case 4: return "longError";
- default: return null;
- }
- }
- public static int getFieldNumber(java.lang.String name)
- {
- java.lang.Integer number = fieldMap.get(name);
- return number == null ? 0 : number.intValue();
- }
- private static final java.util.HashMap<java.lang.String,java.lang.Integer> fieldMap = new java.util.HashMap<java.lang.String,java.lang.Integer>();
- static
- {
- fieldMap.put("errorId", 1);
- fieldMap.put("errorCode", 2);
- fieldMap.put("shortError", 3);
- fieldMap.put("longError", 4);
- }
- }
-
}
[6/6] git commit: DRILL-1436: Remove use of UDP based cache for
purposes of intermediate PlanFragment distribution
Posted by ja...@apache.org.
DRILL-1436: Remove use of UDP based cache for purposes of intermediate PlanFragment distribution
Includes:
- Remove dependency on Infinispan
- Update initialize fragments to send in batches.
- Update RPC layer to capture UserRpcExceptions and propagate back.
- Send full stack trace in DrillPBError and let foreman node decide on formatting.
- Increment control rpc version
- Update systables to report current drillbit and version
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/451dd608
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/451dd608
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/451dd608
Branch: refs/heads/master
Commit: 451dd608a62c08dde26a2da2f085ab11a218ee72
Parents: 6dca24a
Author: Jacques Nadeau <ja...@apache.org>
Authored: Sun Oct 19 10:46:25 2014 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Sun Oct 26 21:54:38 2014 -0700
----------------------------------------------------------------------
exec/java-exec/pom.xml | 15 -
.../drill/exec/cache/infinispan/ICache.java | 339 --
.../infinispan/JacksonAdvancedExternalizer.java | 71 -
.../ProtobufAdvancedExternalizer.java | 66 -
.../infinispan/VAAdvancedExternalizer.java | 71 -
.../cache/infinispan/ZookeeperCacheStore.java | 66 -
.../drill/exec/cache/local/LocalCache.java | 407 ---
.../drill/exec/compile/ClassTransformer.java | 5 +-
.../apache/drill/exec/compile/CodeCompiler.java | 10 +-
.../apache/drill/exec/ops/FragmentContext.java | 4 +-
.../apache/drill/exec/ops/FragmentStats.java | 9 +-
.../org/apache/drill/exec/ops/QueryContext.java | 6 -
.../drill/exec/physical/impl/ScreenCreator.java | 4 +-
.../BroadcastSenderRootExec.java | 4 +-
.../OrderedPartitionRecordBatch.java | 2 +-
.../impl/partitionsender/StatusHandler.java | 5 +-
.../drill/exec/rpc/BaseRpcOutcomeListener.java | 2 +
.../drill/exec/rpc/CoordinationQueue.java | 4 +-
.../drill/exec/rpc/OutboundRpcMessage.java | 9 +-
.../drill/exec/rpc/RemoteRpcException.java | 17 +-
.../java/org/apache/drill/exec/rpc/RpcBus.java | 51 +-
.../org/apache/drill/exec/rpc/RpcEncoder.java | 1 +
.../org/apache/drill/exec/rpc/RpcException.java | 8 +
.../apache/drill/exec/rpc/UserRpcException.java | 49 +
.../exec/rpc/control/ControlRpcConfig.java | 6 +-
.../drill/exec/rpc/control/ControlTunnel.java | 15 +-
.../drill/exec/rpc/control/WorkEventBus.java | 102 +-
.../apache/drill/exec/rpc/data/DataServer.java | 2 +-
.../org/apache/drill/exec/server/Drillbit.java | 13 +-
.../drill/exec/server/DrillbitContext.java | 11 +-
.../drill/exec/server/RemoteServiceSet.java | 23 +-
.../server/options/SystemOptionManager.java | 7 -
.../drill/exec/store/sys/DrillbitIterator.java | 4 +
.../drill/exec/store/sys/SystemTable.java | 3 +-
.../drill/exec/store/sys/SystemTablePlugin.java | 2 +
.../drill/exec/store/sys/VersionIterator.java | 78 +
.../org/apache/drill/exec/work/ErrorHelper.java | 215 +-
.../org/apache/drill/exec/work/WorkManager.java | 5 +-
.../exec/work/batch/ControlHandlerImpl.java | 50 +-
.../exec/work/batch/ControlMessageHandler.java | 5 +-
.../apache/drill/exec/work/foreman/Foreman.java | 50 +-
.../drill/exec/work/foreman/FragmentData.java | 6 +-
.../drill/exec/work/foreman/QueryManager.java | 49 +-
.../work/fragment/AbstractStatusReporter.java | 3 +-
.../java/org/apache/drill/PlanningBase.java | 8 -
.../java/org/apache/drill/TestBugFixes.java | 9 +
.../exec/cache/TestCacheSerialization.java | 150 -
.../exec/compile/TestClassTransformation.java | 3 +-
.../exec/physical/impl/TestOptiqPlans.java | 17 +-
.../TestOrderedPartitionExchange.java | 2 +
.../apache/drill/exec/server/TestBitRpc.java | 2 +-
.../vector/complex/writer/TestJsonReader.java | 4 +-
.../java/org/apache/drill/jdbc/DrillCursor.java | 2 +-
.../org/apache/drill/exec/proto/BitControl.java | 755 ++++-
.../drill/exec/proto/GeneralRPCProtos.java | 882 +-----
.../drill/exec/proto/SchemaBitControl.java | 113 +
.../exec/proto/SchemaGeneralRPCProtos.java | 132 -
.../drill/exec/proto/SchemaUserBitShared.java | 290 +-
.../apache/drill/exec/proto/UserBitShared.java | 2982 ++++++++++++++++--
.../drill/exec/proto/beans/DrillPBError.java | 30 +-
.../exec/proto/beans/ExceptionWrapper.java | 243 ++
.../exec/proto/beans/InitializeFragments.java | 175 +
.../proto/beans/StackTraceElementWrapper.java | 251 ++
protocol/src/main/protobuf/BitControl.proto | 6 +-
protocol/src/main/protobuf/GeneralRPC.proto | 8 +-
protocol/src/main/protobuf/UserBitShared.proto | 19 +-
66 files changed, 5045 insertions(+), 2912 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/pom.xml
----------------------------------------------------------------------
diff --git a/exec/java-exec/pom.xml b/exec/java-exec/pom.xml
index d05e4c6..e75f572 100644
--- a/exec/java-exec/pom.xml
+++ b/exec/java-exec/pom.xml
@@ -306,21 +306,6 @@
<version>2.5.0</version>
</dependency>
<dependency>
- <groupId>com.hazelcast</groupId>
- <artifactId>hazelcast</artifactId>
- <version>3.1.4</version>
- </dependency>
- <dependency>
- <groupId>org.infinispan</groupId>
- <artifactId>infinispan-core</artifactId>
- <version>6.0.2.Final</version>
- </dependency>
- <dependency>
- <groupId>org.infinispan</groupId>
- <artifactId>infinispan-tree</artifactId>
- <version>6.0.2.Final</version>
- </dependency>
- <dependency>
<groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
<version>2.7.4</version>
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/ICache.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/ICache.java b/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/ICache.java
deleted file mode 100644
index 6627a89..0000000
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/ICache.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.drill.exec.cache.infinispan;
-
-import java.io.IOException;
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-import org.apache.drill.common.config.DrillConfig;
-import org.apache.drill.exec.ExecConstants;
-import org.apache.drill.exec.cache.Counter;
-import org.apache.drill.exec.cache.DistributedCache;
-import org.apache.drill.exec.cache.DistributedMap;
-import org.apache.drill.exec.cache.DistributedMultiMap;
-import org.apache.drill.exec.cache.SerializationDefinition;
-import org.apache.drill.exec.cache.local.LocalCache.LocalCounterImpl;
-import org.apache.drill.exec.exception.DrillbitStartupException;
-import org.apache.drill.exec.memory.BufferAllocator;
-import org.apache.drill.exec.proto.BitControl.FragmentStatus;
-import org.apache.drill.exec.proto.BitControl.PlanFragment;
-import org.apache.drill.exec.proto.ExecProtos.FragmentHandle;
-import org.infinispan.Cache;
-import org.infinispan.atomic.Delta;
-import org.infinispan.atomic.DeltaAware;
-import org.infinispan.configuration.cache.CacheMode;
-import org.infinispan.configuration.cache.Configuration;
-import org.infinispan.configuration.cache.ConfigurationBuilder;
-import org.infinispan.configuration.global.GlobalConfigurationBuilder;
-import org.infinispan.manager.DefaultCacheManager;
-import org.infinispan.manager.EmbeddedCacheManager;
-import org.infinispan.remoting.transport.jgroups.JGroupsTransport;
-import org.jgroups.blocks.atomic.CounterService;
-import org.jgroups.fork.ForkChannel;
-import org.jgroups.protocols.COUNTER;
-import org.jgroups.protocols.FRAG2;
-import org.jgroups.stack.ProtocolStack;
-
-import com.google.common.collect.Maps;
-
-
-public class ICache implements DistributedCache{
- static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ICache.class);
-
- private EmbeddedCacheManager manager;
- private ForkChannel cacheChannel;
- private final CounterService counters;
- private final boolean local;
- private volatile ConcurrentMap<String, Counter> localCounters;
-
- public ICache(DrillConfig config, BufferAllocator allocator, boolean local) throws Exception {
- String clusterName = config.getString(ExecConstants.SERVICE_NAME);
- this.local = local;
-
- final CacheMode mode = local ? CacheMode.LOCAL : CacheMode.DIST_SYNC;
- GlobalConfigurationBuilder gcb = new GlobalConfigurationBuilder();
-
- if(!local){
- gcb.transport() //
- .defaultTransport() //
- .clusterName(clusterName);
- }
-
- gcb.serialization() //
- .addAdvancedExternalizer(new VAAdvancedExternalizer(allocator)) //
- .addAdvancedExternalizer(new JacksonAdvancedExternalizer<>(SerializationDefinition.OPTION, config.getMapper())) //
- .addAdvancedExternalizer(new JacksonAdvancedExternalizer<>(SerializationDefinition.STORAGE_PLUGINS, config.getMapper())) //
- .addAdvancedExternalizer(new ProtobufAdvancedExternalizer<>(SerializationDefinition.FRAGMENT_STATUS, FragmentStatus.PARSER)) //
- .addAdvancedExternalizer(new ProtobufAdvancedExternalizer<>(SerializationDefinition.FRAGMENT_HANDLE, FragmentHandle.PARSER)) //
- .addAdvancedExternalizer(new ProtobufAdvancedExternalizer<>(SerializationDefinition.PLAN_FRAGMENT, PlanFragment.PARSER)) //
- .build();
-
- Configuration c = new ConfigurationBuilder() //
- .clustering() //
-
- .cacheMode(mode) //
- .storeAsBinary().enable() //
- .build();
- this.manager = new DefaultCacheManager(gcb.build(), c);
-
- if(!local){
- JGroupsTransport transport = (JGroupsTransport) manager.getCache("first").getAdvancedCache().getRpcManager().getTransport();
- this.cacheChannel = new ForkChannel(transport.getChannel(), "drill-stack", "drill-hijacker", true, ProtocolStack.ABOVE, FRAG2.class, new COUNTER());
- this.counters = new CounterService(this.cacheChannel);
- }else{
- this.cacheChannel = null;
- this.counters = null;
- }
- }
-
-
-// @Override
-// public <K, V> Map<K, V> getSmallAtomicMap(CacheConfig<K, V> config) {
-// Cache<String, ?> cache = manager.getCache("atomic-maps");
-// return AtomicMapLookup.getAtomicMap(cache, config.getName());
-// }
-
-
- @Override
- public void close() throws IOException {
- manager.stop();
- }
-
- @Override
- public void run() throws DrillbitStartupException {
- try {
- if(local){
- localCounters = Maps.newConcurrentMap();
- manager.start();
- }else{
- cacheChannel.connect("c1");
- }
-
- } catch (Exception e) {
- throw new DrillbitStartupException("Failure while trying to set up JGroups.");
- }
- }
-
- @Override
- public <K, V> DistributedMultiMap<K, V> getMultiMap(CacheConfig<K, V> config) {
- Cache<K, DeltaList<V>> cache = manager.getCache(config.getName());
- return new IMulti<K, V>(cache, config);
- }
-
- @Override
- public <K, V> DistributedMap<K, V> getMap(CacheConfig<K, V> config) {
- Cache<K, V> c = manager.getCache(config.getName());
- return new IMap<K, V>(c, config);
- }
-
- @Override
- public Counter getCounter(String name) {
- if(local){
- Counter c = localCounters.get(name);
- if (c == null) {
- localCounters.putIfAbsent(name, new LocalCounterImpl());
- return localCounters.get(name);
- } else {
- return c;
- }
-
- }else{
- return new JGroupsCounter(counters.getOrCreateCounter(name, 0));
- }
-
- }
-
- private class JGroupsCounter implements Counter{
- final org.jgroups.blocks.atomic.Counter inner;
-
- public JGroupsCounter(org.jgroups.blocks.atomic.Counter inner) {
- super();
- this.inner = inner;
- }
-
- @Override
- public long get() {
- return inner.get();
- }
-
- @Override
- public long incrementAndGet() {
- return inner.incrementAndGet();
- }
-
- @Override
- public long decrementAndGet() {
- return inner.decrementAndGet();
- }
-
- }
-
- private class IMap<K, V> implements DistributedMap<K, V>{
-
- private Cache<K, V> cache;
- private CacheConfig<K, V> config;
-
- public IMap(Cache<K, V> cache, CacheConfig<K, V> config) {
- super();
- this.cache = cache;
- this.config = config;
- }
-
- @Override
- public Iterable<Entry<K, V>> getLocalEntries() {
- return cache.entrySet();
- }
-
- @Override
- public V get(K key) {
- return cache.get(key);
- }
-
- @Override
- public Future<V> delete(K key) {
- return cache.removeAsync(key);
- }
-
- @Override
- public Future<V> put(K key, V value) {
- return cache.putAsync(key, value);
- }
-
- @Override
- public Future<V> putIfAbsent(K key, V value) {
- return cache.putIfAbsentAsync(key, value);
- }
-
- @Override
- public Future<V> putIfAbsent(K key, V value, long ttl, TimeUnit timeUnit) {
- return cache.putIfAbsentAsync(key, value, ttl, timeUnit);
- }
-
- }
-
- private class IMulti<K, V> implements DistributedMultiMap<K, V>{
-
- private Cache<K, DeltaList<V>> cache;
- private CacheConfig<K, V> config;
-
- public IMulti(Cache<K, DeltaList<V>> cache, CacheConfig<K, V> config) {
- super();
- this.cache = cache;
- this.config = config;
- }
-
- @Override
- public Collection<V> get(K key) {
- return cache.get(key);
- }
-
- @Override
- public Future<Boolean> put(K key, V value) {
- return new ICacheFuture(cache.putAsync(key, new DeltaList(value)));
- }
-
- }
-
- public static class ICacheFuture implements Future<Boolean> {
-
- Future future;
-
- public ICacheFuture(Future future) {
- this.future = future;
- }
-
- @Override
- public boolean cancel(boolean mayInterruptIfRunning) {
- return future.cancel(mayInterruptIfRunning);
- }
-
- @Override
- public boolean isCancelled() {
- return future.isCancelled();
- }
-
- @Override
- public boolean isDone() {
- return future.isDone();
- }
-
- @Override
- public Boolean get() throws InterruptedException, ExecutionException {
- future.get();
- return true;
- }
-
- @Override
- public Boolean get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
- future.get(timeout, unit);
- return true;
- }
- }
-
-
-
-
- private static class DeltaList<V> extends LinkedList<V> implements DeltaAware, Delta, List<V> {
-
- /** The serialVersionUID */
- private static final long serialVersionUID = 2176345973026460708L;
-
- public DeltaList(Collection<? extends V> c) {
- super(c);
- }
-
- public DeltaList(V obj) {
- super();
- add(obj);
- }
-
- @Override
- public Delta delta() {
- return new DeltaList<V>(this);
- }
-
- @Override
- public void commit() {
- this.clear();
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public DeltaAware merge(DeltaAware d) {
- List<V> other = null;
- if (d != null && d instanceof DeltaList) {
- other = (List<V>) d;
- for (V e : this) {
- other.add(e);
- }
- return (DeltaAware) other;
- } else {
- return this;
- }
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/JacksonAdvancedExternalizer.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/JacksonAdvancedExternalizer.java b/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/JacksonAdvancedExternalizer.java
deleted file mode 100644
index 55633ab..0000000
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/JacksonAdvancedExternalizer.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.drill.exec.cache.infinispan;
-
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.util.Collections;
-import java.util.Set;
-
-import org.apache.drill.exec.cache.SerializationDefinition;
-import org.infinispan.commons.marshall.AdvancedExternalizer;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-public class JacksonAdvancedExternalizer<T> implements AdvancedExternalizer<T> {
- static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(JacksonAdvancedExternalizer.class);
-
- private final Class<?> clazz;
- private final ObjectMapper mapper;
- private final int id;
-
- public JacksonAdvancedExternalizer(SerializationDefinition def, ObjectMapper mapper){
- this.clazz = def.clazz;
- this.mapper = mapper;
- this.id = def.id;
- }
-
- @Override
- public T readObject(ObjectInput in) throws IOException, ClassNotFoundException {
- byte[] bytes = new byte[in.readInt()];
- in.readFully(bytes);
- return (T) mapper.readValue(bytes, clazz);
- }
-
- @Override
- public void writeObject(ObjectOutput out, T object) throws IOException {
- byte[] bytes = mapper.writeValueAsBytes(object);
- out.writeInt(bytes.length);
- out.write(bytes);
- }
-
- @Override
- public Integer getId() {
- return id;
- }
-
- @Override
- public Set<Class<? extends T>> getTypeClasses() {
- return (Set<Class<? extends T>>) (Object) Collections.singleton(clazz);
- }
-
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/ProtobufAdvancedExternalizer.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/ProtobufAdvancedExternalizer.java b/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/ProtobufAdvancedExternalizer.java
deleted file mode 100644
index 7b638ee..0000000
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/ProtobufAdvancedExternalizer.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.drill.exec.cache.infinispan;
-
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.util.Collections;
-import java.util.Set;
-
-import org.apache.drill.common.util.DataInputInputStream;
-import org.apache.drill.exec.cache.SerializationDefinition;
-import org.infinispan.commons.marshall.AdvancedExternalizer;
-
-import com.google.protobuf.Message;
-import com.google.protobuf.Parser;
-
-public class ProtobufAdvancedExternalizer<T extends Message> implements AdvancedExternalizer<T> {
- static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ProtobufAdvancedExternalizer.class);
-
- private final Class<?> clazz;
- private final int id;
- private final Parser<T> parser;
-
- public ProtobufAdvancedExternalizer(SerializationDefinition def, Parser<T> parser){
- this.clazz = def.clazz;
- this.parser = parser;
- this.id = def.id;
- }
-
- @Override
- public T readObject(ObjectInput in) throws IOException, ClassNotFoundException {
- return parser.parseFrom(DataInputInputStream.constructInputStream(in));
- }
-
- @Override
- public void writeObject(ObjectOutput out, T object) throws IOException {
- out.write(object.toByteArray());
- }
-
- @Override
- public Integer getId() {
- return id;
- }
-
- @Override
- public Set<Class<? extends T>> getTypeClasses() {
- return (Set<Class<? extends T>>) (Object) Collections.singleton(clazz);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/VAAdvancedExternalizer.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/VAAdvancedExternalizer.java b/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/VAAdvancedExternalizer.java
deleted file mode 100644
index f072628..0000000
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/VAAdvancedExternalizer.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.drill.exec.cache.infinispan;
-
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.util.Set;
-
-import org.apache.drill.exec.cache.CachedVectorContainer;
-import org.apache.drill.exec.memory.BufferAllocator;
-import org.infinispan.commons.marshall.AdvancedExternalizer;
-
-import com.google.common.collect.ImmutableSet;
-
-public class VAAdvancedExternalizer implements AdvancedExternalizer<CachedVectorContainer> {
- static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(VAAdvancedExternalizer.class);
-
- private BufferAllocator allocator;
-
-
- public VAAdvancedExternalizer(BufferAllocator allocator) {
- super();
- this.allocator = allocator;
- }
-
- static final Set<Class<? extends CachedVectorContainer>> CLASSES = //
- (Set<Class<? extends CachedVectorContainer>>) //
- (Object) ImmutableSet.of(CachedVectorContainer.class);
-
- @Override
- public CachedVectorContainer readObject(ObjectInput in) throws IOException, ClassNotFoundException {
- int length = in.readInt();
- byte[] b = new byte[length];
- in.read(b);
- CachedVectorContainer va = new CachedVectorContainer(b, allocator);
- return va;
- }
-
- @Override
- public void writeObject(ObjectOutput out, CachedVectorContainer va) throws IOException {
- out.writeInt(va.getData().length);
- out.write(va.getData());
- }
-
- @Override
- public Integer getId() {
- // magic number for this class, assume drill uses 3001-3100.
- return 3001;
- }
-
- @Override
- public Set<Class<? extends CachedVectorContainer>> getTypeClasses() {
- return CLASSES;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/ZookeeperCacheStore.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/ZookeeperCacheStore.java b/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/ZookeeperCacheStore.java
deleted file mode 100644
index 46d4eca..0000000
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/cache/infinispan/ZookeeperCacheStore.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.drill.exec.cache.infinispan;
-
-import org.infinispan.marshall.core.MarshalledEntry;
-import org.infinispan.persistence.spi.ExternalStore;
-import org.infinispan.persistence.spi.InitializationContext;
-
-/**
- * Stores the cached objects in zookeeper. Objects are stored in /start/cache_name/key_name = data
- * @param <K>
- * @param <V>
- */
-public class ZookeeperCacheStore<K, V> implements ExternalStore<K, V>{
- static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ZookeeperCacheStore.class);
-
- private String cacheName;
-
- @Override
- public void init(InitializationContext ctx) {
- ctx.getConfiguration();
-
- }
-
- @Override
- public MarshalledEntry<K, V> load(K key) {
- return null;
- }
-
- @Override
- public boolean contains(K key) {
- return false;
- }
-
- @Override
- public void start() {
- }
-
- @Override
- public void stop() {
- }
-
- @Override
- public void write(MarshalledEntry<K, V> entry) {
- }
-
- @Override
- public boolean delete(K key) {
- return false;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/cache/local/LocalCache.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/cache/local/LocalCache.java b/exec/java-exec/src/main/java/org/apache/drill/exec/cache/local/LocalCache.java
deleted file mode 100644
index 99ead1c..0000000
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/cache/local/LocalCache.java
+++ /dev/null
@@ -1,407 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.drill.exec.cache.local;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.drill.common.config.DrillConfig;
-import org.apache.drill.common.util.DataOutputOutputStream;
-import org.apache.drill.exec.cache.Counter;
-import org.apache.drill.exec.cache.DistributedCache;
-import org.apache.drill.exec.cache.DistributedMap;
-import org.apache.drill.exec.cache.DistributedMultiMap;
-import org.apache.drill.exec.cache.DrillSerializable;
-import org.apache.drill.exec.exception.DrillbitStartupException;
-import org.apache.drill.exec.memory.BufferAllocator;
-import org.apache.drill.exec.memory.TopLevelAllocator;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.base.Charsets;
-import com.google.common.collect.ArrayListMultimap;
-import com.google.common.collect.ListMultimap;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Multimaps;
-import com.google.common.io.ByteArrayDataOutput;
-import com.google.common.io.ByteStreams;
-import com.google.protobuf.Message;
-import com.google.protobuf.Parser;
-
-public class LocalCache implements DistributedCache {
- static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(LocalCache.class);
-
- private volatile ConcurrentMap<CacheConfig<?, ?>, DistributedMap<?, ?>> maps;
- private volatile ConcurrentMap<CacheConfig<?, ?>, DistributedMultiMap<?, ?>> multiMaps;
- private volatile ConcurrentMap<String, Counter> counters;
- private static final BufferAllocator allocator = new TopLevelAllocator(DrillConfig.create());
-
- private static final ObjectMapper mapper = DrillConfig.create().getMapper();
-
- @Override
- public void close() throws IOException {
-
- }
-
- @Override
- public void run() throws DrillbitStartupException {
- maps = Maps.newConcurrentMap();
- multiMaps = Maps.newConcurrentMap();
- counters = Maps.newConcurrentMap();
- }
-
- @Override
- public <K, V> DistributedMultiMap<K, V> getMultiMap(CacheConfig<K, V> config) {
- DistributedMultiMap<K, V> mmap = (DistributedMultiMap<K, V>) multiMaps.get(config);
- if (mmap == null) {
- multiMaps.putIfAbsent(config, new LocalDistributedMultiMapImpl<K, V>(config));
- return (DistributedMultiMap<K, V>) multiMaps.get(config);
- } else {
- return mmap;
- }
- }
-
- @Override
- public <K, V> DistributedMap<K, V> getMap(CacheConfig<K, V> config) {
- DistributedMap<K, V> m = (DistributedMap<K, V>) maps.get(config);
- if (m == null) {
- maps.putIfAbsent(config, new LocalDistributedMapImpl<K, V>(config));
- return (DistributedMap<K, V>) maps.get(config);
- } else {
- return m;
- }
- }
-
- @Override
- public Counter getCounter(String name) {
- Counter c = counters.get(name);
- if (c == null) {
- counters.putIfAbsent(name, new LocalCounterImpl());
- return counters.get(name);
- } else {
- return c;
- }
- }
-
- private static BytesHolder serialize(Object obj, SerializationMode mode) {
- if (obj instanceof String) {
- return new BytesHolder( ((String)obj).getBytes(Charsets.UTF_8));
- }
- try{
- switch (mode) {
- case DRILL_SERIALIZIABLE: {
- ByteArrayDataOutput out = ByteStreams.newDataOutput();
- OutputStream outputStream = DataOutputOutputStream.constructOutputStream(out);
- ((DrillSerializable)obj).writeToStream(outputStream);
- outputStream.flush();
- return new BytesHolder(out.toByteArray());
- }
-
- case JACKSON: {
- ByteArrayDataOutput out = ByteStreams.newDataOutput();
- out.write(mapper.writeValueAsBytes(obj));
- return new BytesHolder(out.toByteArray());
- }
-
- case PROTOBUF:
- return new BytesHolder(( (Message) obj).toByteArray());
-
- }
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
-
- throw new UnsupportedOperationException();
- }
-
- private static <V> V deserialize(BytesHolder b, SerializationMode mode, Class<V> clazz) {
- byte[] bytes = b.bytes;
- try {
-
- if (clazz == String.class) {
- return (V) new String(bytes, Charsets.UTF_8);
- }
-
- switch (mode) {
- case DRILL_SERIALIZIABLE: {
- InputStream inputStream = new ByteArrayInputStream(bytes);
- V obj = clazz.getConstructor(BufferAllocator.class).newInstance(allocator);
- ((DrillSerializable) obj).readFromStream(inputStream);
- return obj;
- }
-
- case JACKSON: {
- return (V) mapper.readValue(bytes, clazz);
- }
-
- case PROTOBUF: {
- Parser<V> parser = null;
- for (Field f : clazz.getFields()) {
- if (f.getName().equals("PARSER") && Modifier.isStatic(f.getModifiers())) {
- parser = (Parser<V>) f.get(null);
- }
- }
- if (parser == null) {
- throw new UnsupportedOperationException(String.format("Unable to find parser for class %s.", clazz.getName()));
- }
- InputStream inputStream = new ByteArrayInputStream(bytes);
- return parser.parseFrom(inputStream);
- }
-
- }
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
-
- throw new UnsupportedOperationException();
- }
-
- private static class BytesHolder {
- final byte[] bytes;
- public BytesHolder(byte[] bytes) {
- this.bytes = bytes;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + Arrays.hashCode(bytes);
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- BytesHolder other = (BytesHolder) obj;
- if (!Arrays.equals(bytes, other.bytes)) {
- return false;
- }
- return true;
- }
-
- }
-
- static class LocalDistributedMultiMapImpl<K, V> implements DistributedMultiMap<K, V> {
- private ListMultimap<BytesHolder, BytesHolder> mmap;
- private CacheConfig<K, V> config;
-
- public LocalDistributedMultiMapImpl(CacheConfig<K, V> config) {
- ListMultimap<BytesHolder, BytesHolder> innerMap = ArrayListMultimap.create();
- mmap = Multimaps.synchronizedListMultimap(innerMap);
- this.config = config;
- }
-
- @Override
- public Collection<V> get(K key) {
- List<V> list = Lists.newArrayList();
- for (BytesHolder o : mmap.get(serialize(key, config.getMode()))) {
- list.add(deserialize(o, config.getMode(), config.getValueClass()));
- }
- return list;
- }
-
- @Override
- public Future<Boolean> put(K key, V value) {
- mmap.put(serialize(key, config.getMode()), serialize(value, config.getMode()));
- return new LocalCacheFuture(true);
- }
- }
-
- public static class LocalCacheFuture<V> implements Future<V> {
-
- V value;
-
- public LocalCacheFuture(V value) {
- this.value = value;
- }
-
- @Override
- public boolean cancel(boolean mayInterruptIfRunning) {
- return false;
- }
-
- @Override
- public boolean isCancelled() {
- return false;
- }
-
- @Override
- public boolean isDone() {
- return true;
- }
-
- @Override
- public V get() throws InterruptedException, ExecutionException {
- return value;
- }
-
- @Override
- public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
- return value;
- }
- }
-
- public static class LocalDistributedMapImpl<K, V> implements DistributedMap<K, V> {
- protected ConcurrentMap<BytesHolder, BytesHolder> m;
- protected CacheConfig<K, V> config;
-
- public LocalDistributedMapImpl(CacheConfig<K, V> config) {
- m = Maps.newConcurrentMap();
- this.config = config;
- }
-
- @Override
- public V get(K key) {
- BytesHolder b = m.get(serialize(key, config.getMode()));
- if (b == null) {
- return null;
- }
- return (V) deserialize(b, config.getMode(), config.getValueClass());
- }
-
- @Override
- public Iterable<Entry<K, V>> getLocalEntries() {
- return new Iterable<Entry<K, V>>() {
- @Override
- public Iterator<Entry<K, V>> iterator() {
- return new DeserializingTransformer(m.entrySet().iterator());
- }
- };
-
- }
-
- @Override
- public Future<V> put(K key, V value) {
- m.put(serialize(key, config.getMode()), serialize(value, config.getMode()));
- return new LocalCacheFuture(value);
- }
-
-
- @Override
- public Future<V> putIfAbsent(K key, V value) {
- m.putIfAbsent(serialize(key, config.getMode()), serialize(value, config.getMode()));
- return new LocalCacheFuture(value);
- }
-
- @Override
- public Future<V> delete(K key) {
- V value = get(key);
- m.remove(serialize(key, config.getMode()));
- return new LocalCacheFuture(value);
- }
-
- @Override
- public Future<V> putIfAbsent(K key, V value, long ttl, TimeUnit timeUnit) {
- m.putIfAbsent(serialize(key, config.getMode()), serialize(value, config.getMode()));
- logger.warn("Expiration not implemented in local map cache");
- return new LocalCacheFuture<V>(value);
- }
-
- private class DeserializingTransformer implements Iterator<Map.Entry<K, V>> {
- private Iterator<Map.Entry<BytesHolder, BytesHolder>> inner;
-
- public DeserializingTransformer(Iterator<Entry<BytesHolder, BytesHolder>> inner) {
- super();
- this.inner = inner;
- }
-
- @Override
- public boolean hasNext() {
- return inner.hasNext();
- }
-
- @Override
- public Entry<K, V> next() {
- return newEntry(inner.next());
- }
-
- @Override
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- public Entry<K, V> newEntry(final Entry<BytesHolder, BytesHolder> input) {
- return new Map.Entry<K, V>() {
-
- @Override
- public K getKey() {
- return deserialize(input.getKey(), config.getMode(), config.getKeyClass());
- }
-
- @Override
- public V getValue() {
- return deserialize(input.getValue(), config.getMode(), config.getValueClass());
- }
-
- @Override
- public V setValue(V value) {
- throw new UnsupportedOperationException();
- }
-
- };
- }
-
- }
-
- }
-
- public static class LocalCounterImpl implements Counter {
- private AtomicLong al = new AtomicLong();
-
- @Override
- public long get() {
- return al.get();
- }
-
- @Override
- public long incrementAndGet() {
- return al.incrementAndGet();
- }
-
- @Override
- public long decrementAndGet() {
- return al.decrementAndGet();
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java
index 2d69ca3..52d9e34 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/ClassTransformer.java
@@ -24,7 +24,6 @@ import java.util.Set;
import org.apache.drill.common.util.DrillStringUtils;
import org.apache.drill.common.util.FileUtils;
-import org.apache.drill.exec.cache.DistributedCache;
import org.apache.drill.exec.compile.MergeAdapter.MergedClassResult;
import org.apache.drill.exec.exception.ClassTransformationException;
import org.codehaus.commons.compiler.CompileException;
@@ -40,10 +39,8 @@ public class ClassTransformer {
static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ClassTransformer.class);
private final ByteCodeLoader byteCodeLoader = new ByteCodeLoader();
- private final DistributedCache cache;
- public ClassTransformer(DistributedCache cache) {
- this.cache = cache;
+ public ClassTransformer() {
}
public static class ClassSet{
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/compile/CodeCompiler.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/CodeCompiler.java b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/CodeCompiler.java
index a9b0c61..5628ea3 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/compile/CodeCompiler.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/compile/CodeCompiler.java
@@ -21,8 +21,6 @@ import java.io.IOException;
import java.util.concurrent.ExecutionException;
import org.apache.drill.common.config.DrillConfig;
-import org.apache.drill.exec.cache.DistributedCache;
-import org.apache.drill.exec.cache.local.LocalCache;
import org.apache.drill.exec.exception.ClassTransformationException;
import org.apache.drill.exec.expr.CodeGenerator;
import org.apache.drill.exec.server.options.OptionManager;
@@ -37,14 +35,12 @@ public class CodeCompiler {
static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(CodeCompiler.class);
private final ClassTransformer transformer;
- private final DistributedCache distributedCache;
private final LoadingCache<CodeGenerator<?>, GeneratedClassEntry> cache;
private final DrillConfig config;
private final OptionManager systemOptionManager;
- public CodeCompiler(DrillConfig config, DistributedCache distributedCache, OptionManager systemOptionManager){
- this.transformer = new ClassTransformer(distributedCache);
- this.distributedCache = distributedCache;
+ public CodeCompiler(DrillConfig config, OptionManager systemOptionManager){
+ this.transformer = new ClassTransformer();
this.cache = CacheBuilder //
.newBuilder() //
.maximumSize(1000) //
@@ -87,6 +83,6 @@ public class CodeCompiler {
}
public static CodeCompiler getTestCompiler(DrillConfig c) throws IOException{
- return new CodeCompiler(c, new LocalCache(), new SystemOptionManager(c, new LocalPStoreProvider(c)).init());
+ return new CodeCompiler(c, new SystemOptionManager(c, new LocalPStoreProvider(c)).init());
}
}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentContext.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentContext.java b/exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentContext.java
index 0564c1a..9b78c1d 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentContext.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentContext.java
@@ -68,7 +68,6 @@ public class FragmentContext implements Closeable {
private final FragmentStats stats;
private final FunctionImplementationRegistry funcRegistry;
private final QueryClassLoader loader;
- private final ClassTransformer transformer;
private final BufferAllocator allocator;
private final PlanFragment fragment;
private List<Thread> daemonThreads = Lists.newLinkedList();
@@ -85,8 +84,7 @@ public class FragmentContext implements Closeable {
public FragmentContext(DrillbitContext dbContext, PlanFragment fragment, UserClientConnection connection,
FunctionImplementationRegistry funcRegistry) throws OutOfMemoryException, ExecutionSetupException {
- this.transformer = new ClassTransformer(dbContext.getCache());
- this.stats = new FragmentStats(dbContext.getMetrics());
+ this.stats = new FragmentStats(dbContext.getMetrics(), fragment.getAssignment());
this.context = dbContext;
this.connection = connection;
this.fragment = fragment;
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentStats.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentStats.java b/exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentStats.java
index 22872f9..4431235 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentStats.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentStats.java
@@ -20,6 +20,7 @@ package org.apache.drill.exec.ops;
import java.util.List;
import org.apache.drill.exec.memory.BufferAllocator;
+import org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint;
import org.apache.drill.exec.proto.UserBitShared.MinorFragmentProfile;
import com.codahale.metrics.MetricRegistry;
@@ -28,19 +29,19 @@ import com.google.common.collect.Lists;
public class FragmentStats {
static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(FragmentStats.class);
-
private List<OperatorStats> operators = Lists.newArrayList();
private final long startTime;
+ private final DrillbitEndpoint endpoint;
- public FragmentStats(MetricRegistry metrics) {
+ public FragmentStats(MetricRegistry metrics, DrillbitEndpoint endpoint) {
this.startTime = System.currentTimeMillis();
+ this.endpoint = endpoint;
}
public void addMetricsToStatus(MinorFragmentProfile.Builder prfB) {
-
prfB.setStartTime(startTime);
prfB.setEndTime(System.currentTimeMillis());
-
+ prfB.setEndpoint(endpoint);
for(OperatorStats o : operators){
prfB.addOperatorProfile(o.getProfile());
}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/ops/QueryContext.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/ops/QueryContext.java b/exec/java-exec/src/main/java/org/apache/drill/exec/ops/QueryContext.java
index 1ad144d..4b290a5 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/ops/QueryContext.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/ops/QueryContext.java
@@ -23,7 +23,6 @@ import net.hydromatic.optiq.SchemaPlus;
import net.hydromatic.optiq.jdbc.SimpleOptiqSchema;
import org.apache.drill.common.config.DrillConfig;
-import org.apache.drill.exec.cache.DistributedCache;
import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
import org.apache.drill.exec.planner.PhysicalPlanReader;
import org.apache.drill.exec.planner.physical.PlannerSettings;
@@ -112,11 +111,6 @@ public class QueryContext{
return drillbitContext.getStorage();
}
-
- public DistributedCache getCache(){
- return drillbitContext.getCache();
- }
-
public Collection<DrillbitEndpoint> getActiveEndpoints(){
return drillbitContext.getBits();
}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScreenCreator.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScreenCreator.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScreenCreator.java
index bd15ac9..868eb6e 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScreenCreator.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScreenCreator.java
@@ -104,7 +104,7 @@ public class ScreenCreator implements RootCreator<Screen>{
.setQueryId(context.getHandle().getQueryId()) //
.setRowCount(0) //
.setQueryState(QueryState.FAILED)
- .addError(ErrorHelper.logAndConvertError(context.getIdentity(), "Screen received stop request sent.",
+ .addError(ErrorHelper.logAndConvertMessageError(context.getIdentity(), "Query stopeed.",
context.getFailureCause(), logger, verbose))
.setDef(RecordBatchDef.getDefaultInstance()) //
.setIsLastChunk(true) //
@@ -203,7 +203,7 @@ public class ScreenCreator implements RootCreator<Screen>{
sendCount.decrement();
logger.error("Failure while sending data to user.", ex);
boolean verbose = context.getOptions().getOption(ExecConstants.ENABLE_VERBOSE_ERRORS_KEY).bool_val;
- ErrorHelper.logAndConvertError(context.getIdentity(), "Failure while sending fragment to client.", ex, logger,
+ ErrorHelper.logAndConvertMessageError(context.getIdentity(), "Failure while sending fragment to client.", ex, logger,
verbose);
ok = false;
this.ex = ex;
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/broadcastsender/BroadcastSenderRootExec.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/broadcastsender/BroadcastSenderRootExec.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/broadcastsender/BroadcastSenderRootExec.java
index c594e70..3c8e551 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/broadcastsender/BroadcastSenderRootExec.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/broadcastsender/BroadcastSenderRootExec.java
@@ -185,9 +185,7 @@ public class BroadcastSenderRootExec extends BaseRootExec {
public void failed(RpcException ex) {
sendCount.decrement();
logger.error("Failure while sending data to user.", ex);
- boolean verbose = context.getOptions().getOption(ExecConstants.ENABLE_VERBOSE_ERRORS_KEY).bool_val;
- ErrorHelper.logAndConvertError(context.getIdentity(), "Failure while sending fragment to client.", ex, logger,
- verbose);
+ ErrorHelper.logAndConvertError(context.getIdentity(), "Failure while sending fragment to client.", ex, logger);
ok = false;
this.ex = ex;
}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/orderedpartitioner/OrderedPartitionRecordBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/orderedpartitioner/OrderedPartitionRecordBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/orderedpartitioner/OrderedPartitionRecordBatch.java
index aecf363..a062074 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/orderedpartitioner/OrderedPartitionRecordBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/orderedpartitioner/OrderedPartitionRecordBatch.java
@@ -141,7 +141,7 @@ public class OrderedPartitionRecordBatch extends AbstractRecordBatch<OrderedPart
this.samplingFactor = pop.getSamplingFactor();
this.completionFactor = pop.getCompletionFactor();
- DistributedCache cache = context.getDrillbitContext().getCache();
+ DistributedCache cache = null;
this.mmap = cache.getMultiMap(MULTI_CACHE_CONFIG);
this.tableMap = cache.getMap(SINGLE_CACHE_CONFIG);
Preconditions.checkNotNull(tableMap);
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/StatusHandler.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/StatusHandler.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/StatusHandler.java
index 469140c..5e21878 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/StatusHandler.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/StatusHandler.java
@@ -20,7 +20,6 @@ package org.apache.drill.exec.physical.impl.partitionsender;
import io.netty.buffer.ByteBuf;
-import org.apache.drill.exec.ExecConstants;
import org.apache.drill.exec.ops.FragmentContext;
import org.apache.drill.exec.physical.impl.SendingAccountor;
import org.apache.drill.exec.proto.GeneralRPCProtos.Ack;
@@ -50,9 +49,7 @@ public class StatusHandler extends BaseRpcOutcomeListener<Ack> {
public void failed(RpcException ex) {
sendCount.decrement();
logger.error("Failure while sending data to user.", ex);
- boolean verbose = context.getOptions().getOption(ExecConstants.ENABLE_VERBOSE_ERRORS_KEY).bool_val;
- ErrorHelper.logAndConvertError(context.getIdentity(), "Failure while sending fragment to client.", ex, logger,
- verbose);
+ ErrorHelper.logAndConvertError(context.getIdentity(), "Failure while sending fragment to client.", ex, logger);
ok = false;
this.ex = ex;
}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/BaseRpcOutcomeListener.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/BaseRpcOutcomeListener.java b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/BaseRpcOutcomeListener.java
index 10ae6e3..9b071ad 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/BaseRpcOutcomeListener.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/BaseRpcOutcomeListener.java
@@ -19,6 +19,8 @@ package org.apache.drill.exec.rpc;
import io.netty.buffer.ByteBuf;
+import org.apache.drill.exec.proto.UserBitShared.DrillPBError;
+
public class BaseRpcOutcomeListener<T> implements RpcOutcomeListener<T> {
static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(BaseRpcOutcomeListener.class);
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/CoordinationQueue.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/CoordinationQueue.java b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/CoordinationQueue.java
index 8f43b06..0016d6a 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/CoordinationQueue.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/CoordinationQueue.java
@@ -23,7 +23,7 @@ import io.netty.channel.ChannelFuture;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure;
+import org.apache.drill.exec.proto.UserBitShared.DrillPBError;
/**
* Manages the creation of rpc futures for a particular socket.
@@ -146,7 +146,7 @@ public class CoordinationQueue {
return crpc;
}
- public void updateFailedFuture(int coordinationId, RpcFailure failure) {
+ public void updateFailedFuture(int coordinationId, DrillPBError failure) {
// logger.debug("Updating failed future.");
try {
RpcOutcome<?> rpc = removeFromMap(coordinationId);
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/OutboundRpcMessage.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/OutboundRpcMessage.java b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/OutboundRpcMessage.java
index edad63e..5eda350 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/OutboundRpcMessage.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/OutboundRpcMessage.java
@@ -34,8 +34,15 @@ public class OutboundRpcMessage extends RpcMessage {
final MessageLite pBody;
public ByteBuf[] dBodies;
+
+
public OutboundRpcMessage(RpcMode mode, EnumLite rpcType, int coordinationId, MessageLite pBody, ByteBuf... dBodies) {
- super(mode, rpcType.getNumber(), coordinationId);
+ this(mode, rpcType.getNumber(), coordinationId, pBody, dBodies);
+ }
+
+
+ OutboundRpcMessage(RpcMode mode, int rpcTypeNumber, int coordinationId, MessageLite pBody, ByteBuf... dBodies) {
+ super(mode, rpcTypeNumber, coordinationId);
this.pBody = pBody;
// Netty doesn't traditionally release the reference on an unreadable buffer. However, we need to so that if we send a empty or unwritable buffer, we still release. otherwise we get weird memory leaks when sending empty vectors.
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RemoteRpcException.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RemoteRpcException.java b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RemoteRpcException.java
index d75e902..14ea873 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RemoteRpcException.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RemoteRpcException.java
@@ -17,22 +17,27 @@
*/
package org.apache.drill.exec.rpc;
-import org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure;
+import org.apache.drill.exec.proto.UserBitShared.DrillPBError;
+import org.apache.drill.exec.work.ErrorHelper;
public class RemoteRpcException extends RpcException{
static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(RemoteRpcException.class);
- private final RpcFailure failure;
+ private final DrillPBError failure;
- public RemoteRpcException(RpcFailure failure) {
- super(String.format("Failure while executing rpc. Remote failure message: [%s]. Error Code: [%d]. Remote Error Id: [%d]", failure.getShortError(), failure.getErrorId(), failure.getErrorCode()));
+ public RemoteRpcException(DrillPBError failure) {
+ super(ErrorHelper.getErrorMessage(failure, false));
this.failure = failure;
}
- public RpcFailure getFailure() {
+ @Override
+ public DrillPBError getRemoteError() {
return failure;
}
-
+ @Override
+ public boolean isRemote() {
+ return true;
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcBus.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcBus.java b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcBus.java
index 918ca0b..96c9911 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcBus.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcBus.java
@@ -30,8 +30,10 @@ import java.io.Closeable;
import java.util.Arrays;
import java.util.List;
-import org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure;
+import org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint;
import org.apache.drill.exec.proto.GeneralRPCProtos.RpcMode;
+import org.apache.drill.exec.proto.UserBitShared.DrillPBError;
+import org.apache.drill.exec.work.ErrorHelper;
import com.google.common.base.Preconditions;
import com.google.protobuf.Internal.EnumLite;
@@ -188,7 +190,16 @@ public abstract class RpcBus<T extends EnumLite, C extends RemoteConnection> imp
case REQUEST: {
// handle message and ack.
ResponseSender sender = new ResponseSenderImpl(connection, msg.coordinationId);
- handle(connection, msg.rpcType, msg.pBody, msg.dBody, sender);
+ try {
+ handle(connection, msg.rpcType, msg.pBody, msg.dBody, sender);
+ } catch(UserRpcException e){
+ DrillPBError error = ErrorHelper.logAndConvertError(e.getEndpoint(), e.getUserMessage(), e, logger);
+ OutboundRpcMessage outMessage = new OutboundRpcMessage(RpcMode.RESPONSE_FAILURE, 0, msg.coordinationId, error);
+ if (RpcConstants.EXTRA_DEBUGGING) {
+ logger.debug("Adding message to outbound buffer. {}", outMessage);
+ }
+ connection.getChannel().writeAndFlush(outMessage);
+ }
msg.release(); // we release our ownership. Handle could have taken over ownership.
break;
}
@@ -212,7 +223,7 @@ public abstract class RpcBus<T extends EnumLite, C extends RemoteConnection> imp
break;
case RESPONSE_FAILURE:
- RpcFailure failure = RpcFailure.parseFrom(new ByteBufInputStream(msg.pBody, msg.pBody.readableBytes()));
+ DrillPBError failure = DrillPBError.parseFrom(new ByteBufInputStream(msg.pBody, msg.pBody.readableBytes()));
queue.updateFailedFuture(msg.coordinationId, failure);
msg.release();
if (RpcConstants.EXTRA_DEBUGGING) {
@@ -227,40 +238,6 @@ public abstract class RpcBus<T extends EnumLite, C extends RemoteConnection> imp
}
-// private class Listener implements GenericFutureListener<ChannelFuture> {
-//
-// private int coordinationId;
-// private Class<?> clazz;
-//
-// public Listener(int coordinationId, Class<?> clazz) {
-// this.coordinationId = coordinationId;
-// this.clazz = clazz;
-// }
-//
-// @Override
-// public void operationComplete(ChannelFuture channelFuture) throws Exception {
-// // logger.debug("Completed channel write.");
-//
-// if (channelFuture.isCancelled()) {
-// RpcOutcome<?> rpcFuture = queue.getFuture(-1, coordinationId, clazz);
-// rpcFuture.setException(new CancellationException("Socket operation was canceled."));
-// } else if (!channelFuture.isSuccess()) {
-// try {
-// channelFuture.get();
-// throw new IllegalStateException("Future was described as completed and not succesful but did not throw an exception.");
-// } catch (Exception e) {
-// logger.error("Error occurred during Rpc", e);
-// RpcOutcome<?> rpcFuture = queue.getFuture(-1, coordinationId, clazz);
-// rpcFuture.setException(e);
-// }
-// } else {
-// // send was successful. No need to modify DrillRpcFuture.
-// return;
-// }
-// }
-//
-// }
-
public static <T> T get(ByteBuf pBody, Parser<T> parser) throws RpcException{
try {
ByteBufInputStream is = new ByteBufInputStream(pBody);
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcEncoder.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcEncoder.java b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcEncoder.java
index 34256f3..f9da6f1 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcEncoder.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcEncoder.java
@@ -58,6 +58,7 @@ class RpcEncoder extends MessageToMessageEncoder<OutboundRpcMessage>{
if (!ctx.channel().isOpen()) {
//output.add(ctx.alloc().buffer(0));
logger.debug("Channel closed, skipping encode.");
+ msg.release();
return;
}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcException.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcException.java b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcException.java
index eb870b3..a6d0e8e 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcException.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcException.java
@@ -21,6 +21,7 @@ import java.util.concurrent.ExecutionException;
import org.apache.drill.common.exceptions.DrillIOException;
import org.apache.drill.common.util.DrillStringUtils;
+import org.apache.drill.exec.proto.UserBitShared.DrillPBError;
/**
* Parent class for all rpc exceptions.
@@ -66,4 +67,11 @@ public class RpcException extends DrillIOException{
return new RpcException(message, t);
}
+ public boolean isRemote(){
+ return false;
+ }
+
+ public DrillPBError getRemoteError(){
+ throw new UnsupportedOperationException();
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/UserRpcException.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/UserRpcException.java b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/UserRpcException.java
new file mode 100644
index 0000000..1d2cc1a
--- /dev/null
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/UserRpcException.java
@@ -0,0 +1,49 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill.exec.rpc;
+
+import org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint;
+
+public class UserRpcException extends RpcException {
+ static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(UserRpcException.class);
+
+ private final String message;
+ private final DrillbitEndpoint endpoint;
+ private final Throwable t;
+
+ public UserRpcException(DrillbitEndpoint endpoint, String message, Throwable t) {
+ super(t);
+ this.message = message;
+ this.endpoint = endpoint;
+ this.t = t;
+ }
+
+ public String getUserMessage() {
+ return message;
+ }
+
+ public DrillbitEndpoint getEndpoint() {
+ return endpoint;
+ }
+
+ public Throwable getUserException() {
+ return t;
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/ControlRpcConfig.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/ControlRpcConfig.java b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/ControlRpcConfig.java
index 31fbe7b..1308c37 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/ControlRpcConfig.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/ControlRpcConfig.java
@@ -21,7 +21,7 @@ package org.apache.drill.exec.rpc.control;
import org.apache.drill.exec.proto.BitControl.BitControlHandshake;
import org.apache.drill.exec.proto.BitControl.FinishedReceiver;
import org.apache.drill.exec.proto.BitControl.FragmentStatus;
-import org.apache.drill.exec.proto.BitControl.PlanFragment;
+import org.apache.drill.exec.proto.BitControl.InitializeFragments;
import org.apache.drill.exec.proto.BitControl.RpcType;
import org.apache.drill.exec.proto.ExecProtos.FragmentHandle;
import org.apache.drill.exec.proto.GeneralRPCProtos.Ack;
@@ -36,14 +36,14 @@ public class ControlRpcConfig {
public static RpcConfig MAPPING = RpcConfig.newBuilder("BIT-CONTROL-RPC-MAPPING") //
.add(RpcType.HANDSHAKE, BitControlHandshake.class, RpcType.HANDSHAKE, BitControlHandshake.class)
- .add(RpcType.REQ_INIATILIZE_FRAGMENT, PlanFragment.class, RpcType.ACK, Ack.class)
+ .add(RpcType.REQ_INIATILIZE_FRAGMENTS, InitializeFragments.class, RpcType.ACK, Ack.class)
.add(RpcType.REQ_CANCEL_FRAGMENT, FragmentHandle.class, RpcType.ACK, Ack.class)
.add(RpcType.REQ_RECEIVER_FINISHED, FinishedReceiver.class, RpcType.ACK, Ack.class)
.add(RpcType.REQ_FRAGMENT_STATUS, FragmentStatus.class, RpcType.ACK, Ack.class)
.add(RpcType.REQ_QUERY_STATUS, QueryId.class, RpcType.RESP_QUERY_STATUS, QueryProfile.class)
.build();
- public static int RPC_VERSION = 2;
+ public static int RPC_VERSION = 3;
public static final Response OK = new Response(RpcType.ACK, Acks.OK);
}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/ControlTunnel.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/ControlTunnel.java b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/ControlTunnel.java
index d035c10..461cd8a 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/ControlTunnel.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/ControlTunnel.java
@@ -17,8 +17,11 @@
*/
package org.apache.drill.exec.rpc.control;
+import java.util.Collection;
+
import org.apache.drill.exec.proto.BitControl.FinishedReceiver;
import org.apache.drill.exec.proto.BitControl.FragmentStatus;
+import org.apache.drill.exec.proto.BitControl.InitializeFragments;
import org.apache.drill.exec.proto.BitControl.PlanFragment;
import org.apache.drill.exec.proto.BitControl.RpcType;
import org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint;
@@ -47,8 +50,8 @@ public class ControlTunnel {
return manager.getEndpoint();
}
- public void sendFragment(RpcOutcomeListener<Ack> outcomeListener, PlanFragment fragment){
- SendFragment b = new SendFragment(outcomeListener, fragment);
+ public void sendFragments(RpcOutcomeListener<Ack> outcomeListener, InitializeFragments fragments){
+ SendFragment b = new SendFragment(outcomeListener, fragments);
manager.runCommand(b);
}
@@ -121,16 +124,16 @@ public class ControlTunnel {
}
public static class SendFragment extends ListeningCommand<Ack, ControlConnection> {
- final PlanFragment fragment;
+ final InitializeFragments fragments;
- public SendFragment(RpcOutcomeListener<Ack> listener, PlanFragment fragment) {
+ public SendFragment(RpcOutcomeListener<Ack> listener, InitializeFragments fragments) {
super(listener);
- this.fragment = fragment;
+ this.fragments = fragments;
}
@Override
public void doRpcCall(RpcOutcomeListener<Ack> outcomeListener, ControlConnection connection) {
- connection.send(outcomeListener, RpcType.REQ_INIATILIZE_FRAGMENT, fragment, Ack.class);
+ connection.send(outcomeListener, RpcType.REQ_INIATILIZE_FRAGMENTS, fragments, Ack.class);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/WorkEventBus.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/WorkEventBus.java b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/WorkEventBus.java
index 45acd13..23380ff 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/WorkEventBus.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/WorkEventBus.java
@@ -28,6 +28,7 @@ import org.apache.drill.exec.proto.BitControl.FragmentStatus;
import org.apache.drill.exec.proto.BitControl.PlanFragment;
import org.apache.drill.exec.proto.ExecProtos.FragmentHandle;
import org.apache.drill.exec.proto.UserBitShared.QueryId;
+import org.apache.drill.exec.proto.helper.QueryIdHelper;
import org.apache.drill.exec.rpc.RpcException;
import org.apache.drill.exec.work.WorkManager.WorkerBee;
import org.apache.drill.exec.work.foreman.Foreman;
@@ -82,78 +83,73 @@ public class WorkEventBus {
}
}
- public void setRootFragmentManager(RootFragmentManager fragmentManager) {
- FragmentManager old = managers.putIfAbsent(fragmentManager.getHandle(), fragmentManager);
- if (old != null) {
- throw new IllegalStateException(
- "Tried to set fragment manager when has already been set for the provided fragment handle.");
+ public void setFragmentManager(FragmentManager fragmentManager) {
+ logger.debug("Manager created: {}", QueryIdHelper.getQueryIdentifier(fragmentManager.getHandle()));
+
+ synchronized (managers) {
+ FragmentManager old = managers.putIfAbsent(fragmentManager.getHandle(), fragmentManager);
+ managers.notifyAll();
+ if (old != null) {
+ throw new IllegalStateException(
+ "Tried to set fragment manager when has already been set for the provided fragment handle.");
+ }
}
}
- public FragmentManager getFragmentManager(FragmentHandle handle) {
+ public FragmentManager getFragmentManagerIfExists(FragmentHandle handle){
return managers.get(handle);
- }
- public void cancelFragment(FragmentHandle handle) {
- cancelledFragments.put(handle, null);
- removeFragmentManager(handle);
}
- public FragmentManager getOrCreateFragmentManager(FragmentHandle handle) throws FragmentSetupException{
+ public FragmentManager getFragmentManager(FragmentHandle handle) throws FragmentSetupException {
+
+ // check if this was a recently canceled fragment. If so, throw away message.
if (cancelledFragments.asMap().containsKey(handle)) {
logger.debug("Fragment: {} was cancelled. Ignoring fragment handle", handle);
return null;
}
- // We need to synchronize this part. Without that, multiple bit servers will be creating a Fragment manager and the
- // corresponding FragmentContext object. Each FragmentContext object registers with the TopLevelAllocator so that
- // the allocator can manage fragment resources across all fragments. So we need to make sure only one
- // FragmentManager is actually created and used for a given FragmentHandle.
- FragmentManager newManager;
- FragmentManager manager;
-
- manager = managers.get(handle);
- if (manager != null) {
- return manager;
+
+ // chm manages concurrency better then everyone fighting for the same lock so we'll do a double check.
+ FragmentManager m = managers.get(handle);
+ if(m != null){
+ return m;
}
- if (logger.isDebugEnabled()) {
- String fragHandles = "Looking for Fragment handle: " + handle.toString() + "(Hash Code:" + handle.hashCode()
- + ")\n Fragment Handles in Fragment manager: ";
- for (FragmentHandle h : managers.keySet()) {
- fragHandles += h.toString() + "\n";
- fragHandles += "[Hash Code: " + h.hashCode() + "]\n";
+
+ logger.debug("Fragment was requested but no manager exists. Waiting for manager for fragment: {}", QueryIdHelper.getQueryIdentifier(handle));
+ try{
+ // We need to handle the race condition between the fragments being sent to leaf nodes and intermediate nodes. It is possible that a leaf node would send a data batch to a intermediate node before the intermediate node received the associated plan. As such, we will wait here for a bit to see if the appropriate fragment shows up.
+ long expire = System.currentTimeMillis() + 30*1000;
+ synchronized(managers){
+
+ // we loop because we may be woken up by some other, unrelated manager insertion.
+ while(true){
+ m = managers.get(handle);
+ if(m != null) {
+ return m;
+ }
+ long timeToWait = expire - System.currentTimeMillis();
+ if(timeToWait <= 0){
+ break;
+ }
+
+ managers.wait(timeToWait);
}
- logger.debug(fragHandles);
- }
- DistributedMap<FragmentHandle, PlanFragment> planCache = bee.getContext().getCache().getMap(Foreman.FRAGMENT_CACHE);
-// for (Map.Entry<FragmentHandle, PlanFragment> e : planCache.getLocalEntries()) {
-// logger.debug("Key: {}", e.getKey());
-// logger.debug("Value: {}", e.getValue());
-// }
- PlanFragment fragment = bee.getContext().getCache().getMap(Foreman.FRAGMENT_CACHE).get(handle);
-
- if (fragment == null) {
- throw new FragmentSetupException("Received batch where fragment was not in cache.");
+
+ throw new FragmentSetupException("Failed to receive plan fragment that was required for id: " + QueryIdHelper.getQueryIdentifier(handle));
}
- logger.debug("Allocating new non root fragment manager: " + handle.toString());
- newManager = new NonRootFragmentManager(fragment, bee);
- logger.debug("Allocated new non root fragment manager: " + handle.toString());
-
- manager = managers.putIfAbsent(fragment.getHandle(), newManager);
- if (manager == null) {
- // we added a handler, inform the bee that we did so. This way, the foreman can track status.
- bee.addFragmentPendingRemote(newManager);
- manager = newManager;
- }else{
- // prevent a leak of the initial allocation.
- // Also the fragment context is registered with the top level allocator.
- // This will unregister the unused fragment context as well.
- newManager.getFragmentContext().close();
+ }catch(InterruptedException e){
+ throw new FragmentSetupException("Interrupted while waiting to receive plan fragment..");
}
+ }
- return manager;
+ public void cancelFragment(FragmentHandle handle) {
+ logger.debug("Fragment canceled: {}", QueryIdHelper.getQueryIdentifier(handle));
+ cancelledFragments.put(handle, null);
+ removeFragmentManager(handle);
}
public void removeFragmentManager(FragmentHandle handle) {
+ logger.debug("Removing fragment manager: {}", QueryIdHelper.getQueryIdentifier(handle));
managers.remove(handle);
}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/data/DataServer.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/data/DataServer.java b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/data/DataServer.java
index 2c6e02c..1f261bc 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/data/DataServer.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/data/DataServer.java
@@ -108,7 +108,7 @@ public class DataServer extends BasicServer<RpcType, BitServerConnection> {
FragmentHandle handle = fragmentBatch.getHandle();
try {
- FragmentManager manager = workBus.getOrCreateFragmentManager(fragmentBatch.getHandle());
+ FragmentManager manager = workBus.getFragmentManager(fragmentBatch.getHandle());
if (manager == null) {
if (body != null) {
body.release();
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java b/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java
index 2125166..e8f175b 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java
@@ -21,8 +21,6 @@ import java.io.Closeable;
import org.apache.drill.common.config.DrillConfig;
import org.apache.drill.exec.ExecConstants;
-import org.apache.drill.exec.cache.DistributedCache;
-import org.apache.drill.exec.cache.infinispan.ICache;
import org.apache.drill.exec.coord.ClusterCoordinator;
import org.apache.drill.exec.coord.ClusterCoordinator.RegistrationHandle;
import org.apache.drill.exec.coord.zk.ZKClusterCoordinator;
@@ -84,7 +82,6 @@ public class Drillbit implements Closeable{
final ClusterCoordinator coord;
final ServiceEngine engine;
- final DistributedCache cache;
final PStoreProvider storeProvider;
final WorkManager manager;
final BootStrapContext context;
@@ -107,13 +104,11 @@ public class Drillbit implements Closeable{
if(serviceSet != null) {
this.coord = serviceSet.getCoordinator();
- this.cache = serviceSet.getCache();
this.storeProvider = new LocalPStoreProvider(config);
} else {
Runtime.getRuntime().addShutdownHook(new ShutdownThread(config));
this.coord = new ZKClusterCoordinator(config);
this.storeProvider = new PStoreRegistry(this.coord, config).newPStoreProvider();
- this.cache = new ICache(config, context.getAllocator(), false);
}
}
@@ -148,8 +143,7 @@ public class Drillbit implements Closeable{
coord.start(10000);
storeProvider.start();
DrillbitEndpoint md = engine.start();
- manager.start(md, cache, engine.getController(), engine.getDataConnectionCreator(), coord, storeProvider);
- cache.run();
+ manager.start(md, engine.getController(), engine.getDataConnectionCreator(), coord, storeProvider);
manager.getContext().getStorage().init();
manager.getContext().getOptionManager().init();
handle = coord.register(md);
@@ -173,11 +167,6 @@ public class Drillbit implements Closeable{
} catch (Exception e) {
logger.warn("Failure while shutting down embedded jetty server.");
}
- try {
- cache.close();
- } catch (Exception e) {
- e.printStackTrace();
- }
Closeables.closeQuietly(engine);
Closeables.closeQuietly(storeProvider);
Closeables.closeQuietly(coord);
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/server/DrillbitContext.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/server/DrillbitContext.java b/exec/java-exec/src/main/java/org/apache/drill/exec/server/DrillbitContext.java
index 7d48711..165d5f3 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/server/DrillbitContext.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/server/DrillbitContext.java
@@ -22,7 +22,6 @@ import io.netty.channel.EventLoopGroup;
import java.util.Collection;
import org.apache.drill.common.config.DrillConfig;
-import org.apache.drill.exec.cache.DistributedCache;
import org.apache.drill.exec.compile.CodeCompiler;
import org.apache.drill.exec.coord.ClusterCoordinator;
import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
@@ -49,7 +48,6 @@ public class DrillbitContext {
private PhysicalPlanReader reader;
private final ClusterCoordinator coord;
private final DataConnectionCreator connectionsPool;
- private final DistributedCache cache;
private final DrillbitEndpoint endpoint;
private final StoragePluginRegistry storagePlugins;
private final OperatorCreatorRegistry operatorCreatorRegistry;
@@ -60,7 +58,7 @@ public class DrillbitContext {
private final PStoreProvider provider;
private final CodeCompiler compiler;
- public DrillbitContext(DrillbitEndpoint endpoint, BootStrapContext context, ClusterCoordinator coord, Controller controller, DataConnectionCreator connectionsPool, DistributedCache cache, WorkEventBus workBus, PStoreProvider provider) {
+ public DrillbitContext(DrillbitEndpoint endpoint, BootStrapContext context, ClusterCoordinator coord, Controller controller, DataConnectionCreator connectionsPool, WorkEventBus workBus, PStoreProvider provider) {
super();
Preconditions.checkNotNull(endpoint);
Preconditions.checkNotNull(context);
@@ -71,7 +69,6 @@ public class DrillbitContext {
this.context = context;
this.coord = coord;
this.connectionsPool = connectionsPool;
- this.cache = cache;
this.endpoint = endpoint;
this.provider = provider;
this.storagePlugins = new StoragePluginRegistry(this);
@@ -79,7 +76,7 @@ public class DrillbitContext {
this.operatorCreatorRegistry = new OperatorCreatorRegistry(context.getConfig());
this.functionRegistry = new FunctionImplementationRegistry(context.getConfig());
this.systemOptions = new SystemOptionManager(context.getConfig(), provider);
- this.compiler = new CodeCompiler(context.getConfig(), cache, systemOptions);
+ this.compiler = new CodeCompiler(context.getConfig(), systemOptions);
}
public FunctionImplementationRegistry getFunctionImplementationRegistry() {
@@ -134,10 +131,6 @@ public class DrillbitContext {
return context.getMetrics();
}
- public DistributedCache getCache(){
- return cache;
- }
-
public PhysicalPlanReader getPlanReader(){
return reader;
}
[2/6] DRILL-1436: Remove use of UDP based cache for purposes of
intermediate PlanFragment distribution
Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java b/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java
index 4f01053..37d0eda 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java
@@ -1721,9 +1721,23 @@ public final class UserBitShared {
com.google.protobuf.ByteString
getMessageBytes();
- // repeated .exec.shared.ParsingError parsing_error = 5;
+ // optional .exec.shared.ExceptionWrapper exception = 5;
/**
- * <code>repeated .exec.shared.ParsingError parsing_error = 5;</code>
+ * <code>optional .exec.shared.ExceptionWrapper exception = 5;</code>
+ */
+ boolean hasException();
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper exception = 5;</code>
+ */
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper getException();
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper exception = 5;</code>
+ */
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapperOrBuilder getExceptionOrBuilder();
+
+ // repeated .exec.shared.ParsingError parsing_error = 6;
+ /**
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
*
* <pre>
*optional, used when providing location of error within a piece of text.
@@ -1732,7 +1746,7 @@ public final class UserBitShared {
java.util.List<org.apache.drill.exec.proto.UserBitShared.ParsingError>
getParsingErrorList();
/**
- * <code>repeated .exec.shared.ParsingError parsing_error = 5;</code>
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
*
* <pre>
*optional, used when providing location of error within a piece of text.
@@ -1740,7 +1754,7 @@ public final class UserBitShared {
*/
org.apache.drill.exec.proto.UserBitShared.ParsingError getParsingError(int index);
/**
- * <code>repeated .exec.shared.ParsingError parsing_error = 5;</code>
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
*
* <pre>
*optional, used when providing location of error within a piece of text.
@@ -1748,7 +1762,7 @@ public final class UserBitShared {
*/
int getParsingErrorCount();
/**
- * <code>repeated .exec.shared.ParsingError parsing_error = 5;</code>
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
*
* <pre>
*optional, used when providing location of error within a piece of text.
@@ -1757,7 +1771,7 @@ public final class UserBitShared {
java.util.List<? extends org.apache.drill.exec.proto.UserBitShared.ParsingErrorOrBuilder>
getParsingErrorOrBuilderList();
/**
- * <code>repeated .exec.shared.ParsingError parsing_error = 5;</code>
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
*
* <pre>
*optional, used when providing location of error within a piece of text.
@@ -1846,9 +1860,22 @@ public final class UserBitShared {
break;
}
case 42: {
- if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ subBuilder = exception_.toBuilder();
+ }
+ exception_ = input.readMessage(org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(exception_);
+ exception_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000010;
+ break;
+ }
+ case 50: {
+ if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
parsingError_ = new java.util.ArrayList<org.apache.drill.exec.proto.UserBitShared.ParsingError>();
- mutable_bitField0_ |= 0x00000010;
+ mutable_bitField0_ |= 0x00000020;
}
parsingError_.add(input.readMessage(org.apache.drill.exec.proto.UserBitShared.ParsingError.PARSER, extensionRegistry));
break;
@@ -1861,7 +1888,7 @@ public final class UserBitShared {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
- if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+ if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
parsingError_ = java.util.Collections.unmodifiableList(parsingError_);
}
this.unknownFields = unknownFields.build();
@@ -2032,11 +2059,33 @@ public final class UserBitShared {
}
}
- // repeated .exec.shared.ParsingError parsing_error = 5;
- public static final int PARSING_ERROR_FIELD_NUMBER = 5;
+ // optional .exec.shared.ExceptionWrapper exception = 5;
+ public static final int EXCEPTION_FIELD_NUMBER = 5;
+ private org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper exception_;
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper exception = 5;</code>
+ */
+ public boolean hasException() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper exception = 5;</code>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper getException() {
+ return exception_;
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper exception = 5;</code>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.ExceptionWrapperOrBuilder getExceptionOrBuilder() {
+ return exception_;
+ }
+
+ // repeated .exec.shared.ParsingError parsing_error = 6;
+ public static final int PARSING_ERROR_FIELD_NUMBER = 6;
private java.util.List<org.apache.drill.exec.proto.UserBitShared.ParsingError> parsingError_;
/**
- * <code>repeated .exec.shared.ParsingError parsing_error = 5;</code>
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
*
* <pre>
*optional, used when providing location of error within a piece of text.
@@ -2046,7 +2095,7 @@ public final class UserBitShared {
return parsingError_;
}
/**
- * <code>repeated .exec.shared.ParsingError parsing_error = 5;</code>
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
*
* <pre>
*optional, used when providing location of error within a piece of text.
@@ -2057,7 +2106,7 @@ public final class UserBitShared {
return parsingError_;
}
/**
- * <code>repeated .exec.shared.ParsingError parsing_error = 5;</code>
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
*
* <pre>
*optional, used when providing location of error within a piece of text.
@@ -2067,7 +2116,7 @@ public final class UserBitShared {
return parsingError_.size();
}
/**
- * <code>repeated .exec.shared.ParsingError parsing_error = 5;</code>
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
*
* <pre>
*optional, used when providing location of error within a piece of text.
@@ -2077,7 +2126,7 @@ public final class UserBitShared {
return parsingError_.get(index);
}
/**
- * <code>repeated .exec.shared.ParsingError parsing_error = 5;</code>
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
*
* <pre>
*optional, used when providing location of error within a piece of text.
@@ -2093,6 +2142,7 @@ public final class UserBitShared {
endpoint_ = org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.getDefaultInstance();
errorType_ = 0;
message_ = "";
+ exception_ = org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.getDefaultInstance();
parsingError_ = java.util.Collections.emptyList();
}
private byte memoizedIsInitialized = -1;
@@ -2119,8 +2169,11 @@ public final class UserBitShared {
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeBytes(4, getMessageBytes());
}
+ if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ output.writeMessage(5, exception_);
+ }
for (int i = 0; i < parsingError_.size(); i++) {
- output.writeMessage(5, parsingError_.get(i));
+ output.writeMessage(6, parsingError_.get(i));
}
getUnknownFields().writeTo(output);
}
@@ -2147,9 +2200,13 @@ public final class UserBitShared {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, getMessageBytes());
}
+ if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(5, exception_);
+ }
for (int i = 0; i < parsingError_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(5, parsingError_.get(i));
+ .computeMessageSize(6, parsingError_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
@@ -2260,6 +2317,7 @@ public final class UserBitShared {
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getEndpointFieldBuilder();
+ getExceptionFieldBuilder();
getParsingErrorFieldBuilder();
}
}
@@ -2281,9 +2339,15 @@ public final class UserBitShared {
bitField0_ = (bitField0_ & ~0x00000004);
message_ = "";
bitField0_ = (bitField0_ & ~0x00000008);
+ if (exceptionBuilder_ == null) {
+ exception_ = org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.getDefaultInstance();
+ } else {
+ exceptionBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000010);
if (parsingErrorBuilder_ == null) {
parsingError_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000010);
+ bitField0_ = (bitField0_ & ~0x00000020);
} else {
parsingErrorBuilder_.clear();
}
@@ -2335,10 +2399,18 @@ public final class UserBitShared {
to_bitField0_ |= 0x00000008;
}
result.message_ = message_;
+ if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
+ to_bitField0_ |= 0x00000010;
+ }
+ if (exceptionBuilder_ == null) {
+ result.exception_ = exception_;
+ } else {
+ result.exception_ = exceptionBuilder_.build();
+ }
if (parsingErrorBuilder_ == null) {
- if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ if (((bitField0_ & 0x00000020) == 0x00000020)) {
parsingError_ = java.util.Collections.unmodifiableList(parsingError_);
- bitField0_ = (bitField0_ & ~0x00000010);
+ bitField0_ = (bitField0_ & ~0x00000020);
}
result.parsingError_ = parsingError_;
} else {
@@ -2376,11 +2448,14 @@ public final class UserBitShared {
message_ = other.message_;
onChanged();
}
+ if (other.hasException()) {
+ mergeException(other.getException());
+ }
if (parsingErrorBuilder_ == null) {
if (!other.parsingError_.isEmpty()) {
if (parsingError_.isEmpty()) {
parsingError_ = other.parsingError_;
- bitField0_ = (bitField0_ & ~0x00000010);
+ bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureParsingErrorIsMutable();
parsingError_.addAll(other.parsingError_);
@@ -2393,7 +2468,7 @@ public final class UserBitShared {
parsingErrorBuilder_.dispose();
parsingErrorBuilder_ = null;
parsingError_ = other.parsingError_;
- bitField0_ = (bitField0_ & ~0x00000010);
+ bitField0_ = (bitField0_ & ~0x00000020);
parsingErrorBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getParsingErrorFieldBuilder() : null;
@@ -2751,13 +2826,130 @@ public final class UserBitShared {
return this;
}
- // repeated .exec.shared.ParsingError parsing_error = 5;
+ // optional .exec.shared.ExceptionWrapper exception = 5;
+ private org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper exception_ = org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.getDefaultInstance();
+ private com.google.protobuf.SingleFieldBuilder<
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapperOrBuilder> exceptionBuilder_;
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper exception = 5;</code>
+ */
+ public boolean hasException() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper exception = 5;</code>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper getException() {
+ if (exceptionBuilder_ == null) {
+ return exception_;
+ } else {
+ return exceptionBuilder_.getMessage();
+ }
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper exception = 5;</code>
+ */
+ public Builder setException(org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper value) {
+ if (exceptionBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ exception_ = value;
+ onChanged();
+ } else {
+ exceptionBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000010;
+ return this;
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper exception = 5;</code>
+ */
+ public Builder setException(
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder builderForValue) {
+ if (exceptionBuilder_ == null) {
+ exception_ = builderForValue.build();
+ onChanged();
+ } else {
+ exceptionBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000010;
+ return this;
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper exception = 5;</code>
+ */
+ public Builder mergeException(org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper value) {
+ if (exceptionBuilder_ == null) {
+ if (((bitField0_ & 0x00000010) == 0x00000010) &&
+ exception_ != org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.getDefaultInstance()) {
+ exception_ =
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.newBuilder(exception_).mergeFrom(value).buildPartial();
+ } else {
+ exception_ = value;
+ }
+ onChanged();
+ } else {
+ exceptionBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000010;
+ return this;
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper exception = 5;</code>
+ */
+ public Builder clearException() {
+ if (exceptionBuilder_ == null) {
+ exception_ = org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.getDefaultInstance();
+ onChanged();
+ } else {
+ exceptionBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000010);
+ return this;
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper exception = 5;</code>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder getExceptionBuilder() {
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return getExceptionFieldBuilder().getBuilder();
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper exception = 5;</code>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.ExceptionWrapperOrBuilder getExceptionOrBuilder() {
+ if (exceptionBuilder_ != null) {
+ return exceptionBuilder_.getMessageOrBuilder();
+ } else {
+ return exception_;
+ }
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper exception = 5;</code>
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapperOrBuilder>
+ getExceptionFieldBuilder() {
+ if (exceptionBuilder_ == null) {
+ exceptionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapperOrBuilder>(
+ exception_,
+ getParentForChildren(),
+ isClean());
+ exception_ = null;
+ }
+ return exceptionBuilder_;
+ }
+
+ // repeated .exec.shared.ParsingError parsing_error = 6;
private java.util.List<org.apache.drill.exec.proto.UserBitShared.ParsingError> parsingError_ =
java.util.Collections.emptyList();
private void ensureParsingErrorIsMutable() {
- if (!((bitField0_ & 0x00000010) == 0x00000010)) {
+ if (!((bitField0_ & 0x00000020) == 0x00000020)) {
parsingError_ = new java.util.ArrayList<org.apache.drill.exec.proto.UserBitShared.ParsingError>(parsingError_);
- bitField0_ |= 0x00000010;
+ bitField0_ |= 0x00000020;
}
}
@@ -2765,7 +2957,7 @@ public final class UserBitShared {
org.apache.drill.exec.proto.UserBitShared.ParsingError, org.apache.drill.exec.proto.UserBitShared.ParsingError.Builder, org.apache.drill.exec.proto.UserBitShared.ParsingErrorOrBuilder> parsingErrorBuilder_;
/**
- * <code>repeated .exec.shared.ParsingError parsing_error = 5;</code>
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
*
* <pre>
*optional, used when providing location of error within a piece of text.
@@ -2779,7 +2971,7 @@ public final class UserBitShared {
}
}
/**
- * <code>repeated .exec.shared.ParsingError parsing_error = 5;</code>
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
*
* <pre>
*optional, used when providing location of error within a piece of text.
@@ -2793,7 +2985,7 @@ public final class UserBitShared {
}
}
/**
- * <code>repeated .exec.shared.ParsingError parsing_error = 5;</code>
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
*
* <pre>
*optional, used when providing location of error within a piece of text.
@@ -2807,7 +2999,7 @@ public final class UserBitShared {
}
}
/**
- * <code>repeated .exec.shared.ParsingError parsing_error = 5;</code>
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
*
* <pre>
*optional, used when providing location of error within a piece of text.
@@ -2828,250 +3020,2376 @@ public final class UserBitShared {
return this;
}
/**
- * <code>repeated .exec.shared.ParsingError parsing_error = 5;</code>
- *
- * <pre>
- *optional, used when providing location of error within a piece of text.
- * </pre>
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
+ *
+ * <pre>
+ *optional, used when providing location of error within a piece of text.
+ * </pre>
+ */
+ public Builder setParsingError(
+ int index, org.apache.drill.exec.proto.UserBitShared.ParsingError.Builder builderForValue) {
+ if (parsingErrorBuilder_ == null) {
+ ensureParsingErrorIsMutable();
+ parsingError_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ parsingErrorBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
+ *
+ * <pre>
+ *optional, used when providing location of error within a piece of text.
+ * </pre>
+ */
+ public Builder addParsingError(org.apache.drill.exec.proto.UserBitShared.ParsingError value) {
+ if (parsingErrorBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureParsingErrorIsMutable();
+ parsingError_.add(value);
+ onChanged();
+ } else {
+ parsingErrorBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
+ *
+ * <pre>
+ *optional, used when providing location of error within a piece of text.
+ * </pre>
+ */
+ public Builder addParsingError(
+ int index, org.apache.drill.exec.proto.UserBitShared.ParsingError value) {
+ if (parsingErrorBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureParsingErrorIsMutable();
+ parsingError_.add(index, value);
+ onChanged();
+ } else {
+ parsingErrorBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
+ *
+ * <pre>
+ *optional, used when providing location of error within a piece of text.
+ * </pre>
+ */
+ public Builder addParsingError(
+ org.apache.drill.exec.proto.UserBitShared.ParsingError.Builder builderForValue) {
+ if (parsingErrorBuilder_ == null) {
+ ensureParsingErrorIsMutable();
+ parsingError_.add(builderForValue.build());
+ onChanged();
+ } else {
+ parsingErrorBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
+ *
+ * <pre>
+ *optional, used when providing location of error within a piece of text.
+ * </pre>
+ */
+ public Builder addParsingError(
+ int index, org.apache.drill.exec.proto.UserBitShared.ParsingError.Builder builderForValue) {
+ if (parsingErrorBuilder_ == null) {
+ ensureParsingErrorIsMutable();
+ parsingError_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ parsingErrorBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
+ *
+ * <pre>
+ *optional, used when providing location of error within a piece of text.
+ * </pre>
+ */
+ public Builder addAllParsingError(
+ java.lang.Iterable<? extends org.apache.drill.exec.proto.UserBitShared.ParsingError> values) {
+ if (parsingErrorBuilder_ == null) {
+ ensureParsingErrorIsMutable();
+ super.addAll(values, parsingError_);
+ onChanged();
+ } else {
+ parsingErrorBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
+ *
+ * <pre>
+ *optional, used when providing location of error within a piece of text.
+ * </pre>
+ */
+ public Builder clearParsingError() {
+ if (parsingErrorBuilder_ == null) {
+ parsingError_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000020);
+ onChanged();
+ } else {
+ parsingErrorBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
+ *
+ * <pre>
+ *optional, used when providing location of error within a piece of text.
+ * </pre>
+ */
+ public Builder removeParsingError(int index) {
+ if (parsingErrorBuilder_ == null) {
+ ensureParsingErrorIsMutable();
+ parsingError_.remove(index);
+ onChanged();
+ } else {
+ parsingErrorBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
+ *
+ * <pre>
+ *optional, used when providing location of error within a piece of text.
+ * </pre>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.ParsingError.Builder getParsingErrorBuilder(
+ int index) {
+ return getParsingErrorFieldBuilder().getBuilder(index);
+ }
+ /**
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
+ *
+ * <pre>
+ *optional, used when providing location of error within a piece of text.
+ * </pre>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.ParsingErrorOrBuilder getParsingErrorOrBuilder(
+ int index) {
+ if (parsingErrorBuilder_ == null) {
+ return parsingError_.get(index); } else {
+ return parsingErrorBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
+ *
+ * <pre>
+ *optional, used when providing location of error within a piece of text.
+ * </pre>
+ */
+ public java.util.List<? extends org.apache.drill.exec.proto.UserBitShared.ParsingErrorOrBuilder>
+ getParsingErrorOrBuilderList() {
+ if (parsingErrorBuilder_ != null) {
+ return parsingErrorBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(parsingError_);
+ }
+ }
+ /**
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
+ *
+ * <pre>
+ *optional, used when providing location of error within a piece of text.
+ * </pre>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.ParsingError.Builder addParsingErrorBuilder() {
+ return getParsingErrorFieldBuilder().addBuilder(
+ org.apache.drill.exec.proto.UserBitShared.ParsingError.getDefaultInstance());
+ }
+ /**
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
+ *
+ * <pre>
+ *optional, used when providing location of error within a piece of text.
+ * </pre>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.ParsingError.Builder addParsingErrorBuilder(
+ int index) {
+ return getParsingErrorFieldBuilder().addBuilder(
+ index, org.apache.drill.exec.proto.UserBitShared.ParsingError.getDefaultInstance());
+ }
+ /**
+ * <code>repeated .exec.shared.ParsingError parsing_error = 6;</code>
+ *
+ * <pre>
+ *optional, used when providing location of error within a piece of text.
+ * </pre>
+ */
+ public java.util.List<org.apache.drill.exec.proto.UserBitShared.ParsingError.Builder>
+ getParsingErrorBuilderList() {
+ return getParsingErrorFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilder<
+ org.apache.drill.exec.proto.UserBitShared.ParsingError, org.apache.drill.exec.proto.UserBitShared.ParsingError.Builder, org.apache.drill.exec.proto.UserBitShared.ParsingErrorOrBuilder>
+ getParsingErrorFieldBuilder() {
+ if (parsingErrorBuilder_ == null) {
+ parsingErrorBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+ org.apache.drill.exec.proto.UserBitShared.ParsingError, org.apache.drill.exec.proto.UserBitShared.ParsingError.Builder, org.apache.drill.exec.proto.UserBitShared.ParsingErrorOrBuilder>(
+ parsingError_,
+ ((bitField0_ & 0x00000020) == 0x00000020),
+ getParentForChildren(),
+ isClean());
+ parsingError_ = null;
+ }
+ return parsingErrorBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:exec.shared.DrillPBError)
+ }
+
+ static {
+ defaultInstance = new DrillPBError(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:exec.shared.DrillPBError)
+ }
+
+ public interface ExceptionWrapperOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional string exception_class = 1;
+ /**
+ * <code>optional string exception_class = 1;</code>
+ */
+ boolean hasExceptionClass();
+ /**
+ * <code>optional string exception_class = 1;</code>
+ */
+ java.lang.String getExceptionClass();
+ /**
+ * <code>optional string exception_class = 1;</code>
+ */
+ com.google.protobuf.ByteString
+ getExceptionClassBytes();
+
+ // optional string message = 2;
+ /**
+ * <code>optional string message = 2;</code>
+ */
+ boolean hasMessage();
+ /**
+ * <code>optional string message = 2;</code>
+ */
+ java.lang.String getMessage();
+ /**
+ * <code>optional string message = 2;</code>
+ */
+ com.google.protobuf.ByteString
+ getMessageBytes();
+
+ // repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ java.util.List<org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper>
+ getStackTraceList();
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper getStackTrace(int index);
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ int getStackTraceCount();
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ java.util.List<? extends org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapperOrBuilder>
+ getStackTraceOrBuilderList();
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapperOrBuilder getStackTraceOrBuilder(
+ int index);
+
+ // optional .exec.shared.ExceptionWrapper cause = 4;
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper cause = 4;</code>
+ */
+ boolean hasCause();
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper cause = 4;</code>
+ */
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper getCause();
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper cause = 4;</code>
+ */
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapperOrBuilder getCauseOrBuilder();
+ }
+ /**
+ * Protobuf type {@code exec.shared.ExceptionWrapper}
+ */
+ public static final class ExceptionWrapper extends
+ com.google.protobuf.GeneratedMessage
+ implements ExceptionWrapperOrBuilder {
+ // Use ExceptionWrapper.newBuilder() to construct.
+ private ExceptionWrapper(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private ExceptionWrapper(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final ExceptionWrapper defaultInstance;
+ public static ExceptionWrapper getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public ExceptionWrapper getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private ExceptionWrapper(
+ 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;
+ exceptionClass_ = input.readBytes();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ message_ = input.readBytes();
+ break;
+ }
+ case 26: {
+ if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+ stackTrace_ = new java.util.ArrayList<org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper>();
+ mutable_bitField0_ |= 0x00000004;
+ }
+ stackTrace_.add(input.readMessage(org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.PARSER, extensionRegistry));
+ break;
+ }
+ case 34: {
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ subBuilder = cause_.toBuilder();
+ }
+ cause_ = input.readMessage(org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(cause_);
+ cause_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000004;
+ 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 {
+ if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+ stackTrace_ = java.util.Collections.unmodifiableList(stackTrace_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.apache.drill.exec.proto.UserBitShared.internal_static_exec_shared_ExceptionWrapper_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.apache.drill.exec.proto.UserBitShared.internal_static_exec_shared_ExceptionWrapper_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.class, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<ExceptionWrapper> PARSER =
+ new com.google.protobuf.AbstractParser<ExceptionWrapper>() {
+ public ExceptionWrapper parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new ExceptionWrapper(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<ExceptionWrapper> getParserForType() {
+ return PARSER;
+ }
+
+ private int bitField0_;
+ // optional string exception_class = 1;
+ public static final int EXCEPTION_CLASS_FIELD_NUMBER = 1;
+ private java.lang.Object exceptionClass_;
+ /**
+ * <code>optional string exception_class = 1;</code>
+ */
+ public boolean hasExceptionClass() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>optional string exception_class = 1;</code>
+ */
+ public java.lang.String getExceptionClass() {
+ java.lang.Object ref = exceptionClass_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ exceptionClass_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>optional string exception_class = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getExceptionClassBytes() {
+ java.lang.Object ref = exceptionClass_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ exceptionClass_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ // optional string message = 2;
+ public static final int MESSAGE_FIELD_NUMBER = 2;
+ private java.lang.Object message_;
+ /**
+ * <code>optional string message = 2;</code>
+ */
+ public boolean hasMessage() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>optional string message = 2;</code>
+ */
+ public java.lang.String getMessage() {
+ java.lang.Object ref = message_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ message_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>optional string message = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getMessageBytes() {
+ java.lang.Object ref = message_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ message_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ // repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;
+ public static final int STACK_TRACE_FIELD_NUMBER = 3;
+ private java.util.List<org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper> stackTrace_;
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public java.util.List<org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper> getStackTraceList() {
+ return stackTrace_;
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public java.util.List<? extends org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapperOrBuilder>
+ getStackTraceOrBuilderList() {
+ return stackTrace_;
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public int getStackTraceCount() {
+ return stackTrace_.size();
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper getStackTrace(int index) {
+ return stackTrace_.get(index);
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapperOrBuilder getStackTraceOrBuilder(
+ int index) {
+ return stackTrace_.get(index);
+ }
+
+ // optional .exec.shared.ExceptionWrapper cause = 4;
+ public static final int CAUSE_FIELD_NUMBER = 4;
+ private org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper cause_;
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper cause = 4;</code>
+ */
+ public boolean hasCause() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper cause = 4;</code>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper getCause() {
+ return cause_;
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper cause = 4;</code>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.ExceptionWrapperOrBuilder getCauseOrBuilder() {
+ return cause_;
+ }
+
+ private void initFields() {
+ exceptionClass_ = "";
+ message_ = "";
+ stackTrace_ = java.util.Collections.emptyList();
+ cause_ = org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.getDefaultInstance();
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeBytes(1, getExceptionClassBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, getMessageBytes());
+ }
+ for (int i = 0; i < stackTrace_.size(); i++) {
+ output.writeMessage(3, stackTrace_.get(i));
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeMessage(4, cause_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(1, getExceptionClassBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, getMessageBytes());
+ }
+ for (int i = 0; i < stackTrace_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, stackTrace_.get(i));
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, cause_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ protected java.lang.Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper 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 exec.shared.ExceptionWrapper}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder>
+ implements org.apache.drill.exec.proto.UserBitShared.ExceptionWrapperOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.apache.drill.exec.proto.UserBitShared.internal_static_exec_shared_ExceptionWrapper_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.apache.drill.exec.proto.UserBitShared.internal_static_exec_shared_ExceptionWrapper_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.class, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder.class);
+ }
+
+ // Construct using org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ getStackTraceFieldBuilder();
+ getCauseFieldBuilder();
+ }
+ }
+ private static Builder create() {
+ return new Builder();
+ }
+
+ public Builder clear() {
+ super.clear();
+ exceptionClass_ = "";
+ bitField0_ = (bitField0_ & ~0x00000001);
+ message_ = "";
+ bitField0_ = (bitField0_ & ~0x00000002);
+ if (stackTraceBuilder_ == null) {
+ stackTrace_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ } else {
+ stackTraceBuilder_.clear();
+ }
+ if (causeBuilder_ == null) {
+ cause_ = org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.getDefaultInstance();
+ } else {
+ causeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000008);
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.apache.drill.exec.proto.UserBitShared.internal_static_exec_shared_ExceptionWrapper_descriptor;
+ }
+
+ public org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper getDefaultInstanceForType() {
+ return org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.getDefaultInstance();
+ }
+
+ public org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper build() {
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper buildPartial() {
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper result = new org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.exceptionClass_ = exceptionClass_;
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.message_ = message_;
+ if (stackTraceBuilder_ == null) {
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ stackTrace_ = java.util.Collections.unmodifiableList(stackTrace_);
+ bitField0_ = (bitField0_ & ~0x00000004);
+ }
+ result.stackTrace_ = stackTrace_;
+ } else {
+ result.stackTrace_ = stackTraceBuilder_.build();
+ }
+ if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
+ to_bitField0_ |= 0x00000004;
+ }
+ if (causeBuilder_ == null) {
+ result.cause_ = cause_;
+ } else {
+ result.cause_ = causeBuilder_.build();
+ }
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper) {
+ return mergeFrom((org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper other) {
+ if (other == org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.getDefaultInstance()) return this;
+ if (other.hasExceptionClass()) {
+ bitField0_ |= 0x00000001;
+ exceptionClass_ = other.exceptionClass_;
+ onChanged();
+ }
+ if (other.hasMessage()) {
+ bitField0_ |= 0x00000002;
+ message_ = other.message_;
+ onChanged();
+ }
+ if (stackTraceBuilder_ == null) {
+ if (!other.stackTrace_.isEmpty()) {
+ if (stackTrace_.isEmpty()) {
+ stackTrace_ = other.stackTrace_;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ } else {
+ ensureStackTraceIsMutable();
+ stackTrace_.addAll(other.stackTrace_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.stackTrace_.isEmpty()) {
+ if (stackTraceBuilder_.isEmpty()) {
+ stackTraceBuilder_.dispose();
+ stackTraceBuilder_ = null;
+ stackTrace_ = other.stackTrace_;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ stackTraceBuilder_ =
+ com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+ getStackTraceFieldBuilder() : null;
+ } else {
+ stackTraceBuilder_.addAllMessages(other.stackTrace_);
+ }
+ }
+ }
+ if (other.hasCause()) {
+ mergeCause(other.getCause());
+ }
+ 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 {
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ // optional string exception_class = 1;
+ private java.lang.Object exceptionClass_ = "";
+ /**
+ * <code>optional string exception_class = 1;</code>
+ */
+ public boolean hasExceptionClass() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>optional string exception_class = 1;</code>
+ */
+ public java.lang.String getExceptionClass() {
+ java.lang.Object ref = exceptionClass_;
+ if (!(ref instanceof java.lang.String)) {
+ java.lang.String s = ((com.google.protobuf.ByteString) ref)
+ .toStringUtf8();
+ exceptionClass_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * <code>optional string exception_class = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getExceptionClassBytes() {
+ java.lang.Object ref = exceptionClass_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ exceptionClass_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>optional string exception_class = 1;</code>
+ */
+ public Builder setExceptionClass(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ exceptionClass_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string exception_class = 1;</code>
+ */
+ public Builder clearExceptionClass() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ exceptionClass_ = getDefaultInstance().getExceptionClass();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string exception_class = 1;</code>
+ */
+ public Builder setExceptionClassBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ exceptionClass_ = value;
+ onChanged();
+ return this;
+ }
+
+ // optional string message = 2;
+ private java.lang.Object message_ = "";
+ /**
+ * <code>optional string message = 2;</code>
+ */
+ public boolean hasMessage() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>optional string message = 2;</code>
+ */
+ public java.lang.String getMessage() {
+ java.lang.Object ref = message_;
+ if (!(ref instanceof java.lang.String)) {
+ java.lang.String s = ((com.google.protobuf.ByteString) ref)
+ .toStringUtf8();
+ message_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * <code>optional string message = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getMessageBytes() {
+ java.lang.Object ref = message_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ message_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>optional string message = 2;</code>
+ */
+ public Builder setMessage(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ message_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string message = 2;</code>
+ */
+ public Builder clearMessage() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ message_ = getDefaultInstance().getMessage();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string message = 2;</code>
+ */
+ public Builder setMessageBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ message_ = value;
+ onChanged();
+ return this;
+ }
+
+ // repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;
+ private java.util.List<org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper> stackTrace_ =
+ java.util.Collections.emptyList();
+ private void ensureStackTraceIsMutable() {
+ if (!((bitField0_ & 0x00000004) == 0x00000004)) {
+ stackTrace_ = new java.util.ArrayList<org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper>(stackTrace_);
+ bitField0_ |= 0x00000004;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilder<
+ org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper, org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder, org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapperOrBuilder> stackTraceBuilder_;
+
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public java.util.List<org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper> getStackTraceList() {
+ if (stackTraceBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(stackTrace_);
+ } else {
+ return stackTraceBuilder_.getMessageList();
+ }
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public int getStackTraceCount() {
+ if (stackTraceBuilder_ == null) {
+ return stackTrace_.size();
+ } else {
+ return stackTraceBuilder_.getCount();
+ }
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper getStackTrace(int index) {
+ if (stackTraceBuilder_ == null) {
+ return stackTrace_.get(index);
+ } else {
+ return stackTraceBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public Builder setStackTrace(
+ int index, org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper value) {
+ if (stackTraceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureStackTraceIsMutable();
+ stackTrace_.set(index, value);
+ onChanged();
+ } else {
+ stackTraceBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public Builder setStackTrace(
+ int index, org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder builderForValue) {
+ if (stackTraceBuilder_ == null) {
+ ensureStackTraceIsMutable();
+ stackTrace_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ stackTraceBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public Builder addStackTrace(org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper value) {
+ if (stackTraceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureStackTraceIsMutable();
+ stackTrace_.add(value);
+ onChanged();
+ } else {
+ stackTraceBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public Builder addStackTrace(
+ int index, org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper value) {
+ if (stackTraceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureStackTraceIsMutable();
+ stackTrace_.add(index, value);
+ onChanged();
+ } else {
+ stackTraceBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public Builder addStackTrace(
+ org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder builderForValue) {
+ if (stackTraceBuilder_ == null) {
+ ensureStackTraceIsMutable();
+ stackTrace_.add(builderForValue.build());
+ onChanged();
+ } else {
+ stackTraceBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public Builder addStackTrace(
+ int index, org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder builderForValue) {
+ if (stackTraceBuilder_ == null) {
+ ensureStackTraceIsMutable();
+ stackTrace_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ stackTraceBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public Builder addAllStackTrace(
+ java.lang.Iterable<? extends org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper> values) {
+ if (stackTraceBuilder_ == null) {
+ ensureStackTraceIsMutable();
+ super.addAll(values, stackTrace_);
+ onChanged();
+ } else {
+ stackTraceBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public Builder clearStackTrace() {
+ if (stackTraceBuilder_ == null) {
+ stackTrace_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ } else {
+ stackTraceBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public Builder removeStackTrace(int index) {
+ if (stackTraceBuilder_ == null) {
+ ensureStackTraceIsMutable();
+ stackTrace_.remove(index);
+ onChanged();
+ } else {
+ stackTraceBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder getStackTraceBuilder(
+ int index) {
+ return getStackTraceFieldBuilder().getBuilder(index);
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapperOrBuilder getStackTraceOrBuilder(
+ int index) {
+ if (stackTraceBuilder_ == null) {
+ return stackTrace_.get(index); } else {
+ return stackTraceBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public java.util.List<? extends org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapperOrBuilder>
+ getStackTraceOrBuilderList() {
+ if (stackTraceBuilder_ != null) {
+ return stackTraceBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(stackTrace_);
+ }
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder addStackTraceBuilder() {
+ return getStackTraceFieldBuilder().addBuilder(
+ org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.getDefaultInstance());
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder addStackTraceBuilder(
+ int index) {
+ return getStackTraceFieldBuilder().addBuilder(
+ index, org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.getDefaultInstance());
+ }
+ /**
+ * <code>repeated .exec.shared.StackTraceElementWrapper stack_trace = 3;</code>
+ */
+ public java.util.List<org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder>
+ getStackTraceBuilderList() {
+ return getStackTraceFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilder<
+ org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper, org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder, org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapperOrBuilder>
+ getStackTraceFieldBuilder() {
+ if (stackTraceBuilder_ == null) {
+ stackTraceBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+ org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper, org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder, org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapperOrBuilder>(
+ stackTrace_,
+ ((bitField0_ & 0x00000004) == 0x00000004),
+ getParentForChildren(),
+ isClean());
+ stackTrace_ = null;
+ }
+ return stackTraceBuilder_;
+ }
+
+ // optional .exec.shared.ExceptionWrapper cause = 4;
+ private org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper cause_ = org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.getDefaultInstance();
+ private com.google.protobuf.SingleFieldBuilder<
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapperOrBuilder> causeBuilder_;
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper cause = 4;</code>
+ */
+ public boolean hasCause() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper cause = 4;</code>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper getCause() {
+ if (causeBuilder_ == null) {
+ return cause_;
+ } else {
+ return causeBuilder_.getMessage();
+ }
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper cause = 4;</code>
+ */
+ public Builder setCause(org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper value) {
+ if (causeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ cause_ = value;
+ onChanged();
+ } else {
+ causeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000008;
+ return this;
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper cause = 4;</code>
+ */
+ public Builder setCause(
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder builderForValue) {
+ if (causeBuilder_ == null) {
+ cause_ = builderForValue.build();
+ onChanged();
+ } else {
+ causeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000008;
+ return this;
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper cause = 4;</code>
+ */
+ public Builder mergeCause(org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper value) {
+ if (causeBuilder_ == null) {
+ if (((bitField0_ & 0x00000008) == 0x00000008) &&
+ cause_ != org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.getDefaultInstance()) {
+ cause_ =
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.newBuilder(cause_).mergeFrom(value).buildPartial();
+ } else {
+ cause_ = value;
+ }
+ onChanged();
+ } else {
+ causeBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000008;
+ return this;
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper cause = 4;</code>
+ */
+ public Builder clearCause() {
+ if (causeBuilder_ == null) {
+ cause_ = org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.getDefaultInstance();
+ onChanged();
+ } else {
+ causeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000008);
+ return this;
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper cause = 4;</code>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder getCauseBuilder() {
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return getCauseFieldBuilder().getBuilder();
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper cause = 4;</code>
+ */
+ public org.apache.drill.exec.proto.UserBitShared.ExceptionWrapperOrBuilder getCauseOrBuilder() {
+ if (causeBuilder_ != null) {
+ return causeBuilder_.getMessageOrBuilder();
+ } else {
+ return cause_;
+ }
+ }
+ /**
+ * <code>optional .exec.shared.ExceptionWrapper cause = 4;</code>
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapperOrBuilder>
+ getCauseFieldBuilder() {
+ if (causeBuilder_ == null) {
+ causeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper.Builder, org.apache.drill.exec.proto.UserBitShared.ExceptionWrapperOrBuilder>(
+ cause_,
+ getParentForChildren(),
+ isClean());
+ cause_ = null;
+ }
+ return causeBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:exec.shared.ExceptionWrapper)
+ }
+
+ static {
+ defaultInstance = new ExceptionWrapper(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:exec.shared.ExceptionWrapper)
+ }
+
+ public interface StackTraceElementWrapperOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional string class_name = 1;
+ /**
+ * <code>optional string class_name = 1;</code>
+ */
+ boolean hasClassName();
+ /**
+ * <code>optional string class_name = 1;</code>
+ */
+ java.lang.String getClassName();
+ /**
+ * <code>optional string class_name = 1;</code>
+ */
+ com.google.protobuf.ByteString
+ getClassNameBytes();
+
+ // optional string file_name = 2;
+ /**
+ * <code>optional string file_name = 2;</code>
+ */
+ boolean hasFileName();
+ /**
+ * <code>optional string file_name = 2;</code>
+ */
+ java.lang.String getFileName();
+ /**
+ * <code>optional string file_name = 2;</code>
+ */
+ com.google.protobuf.ByteString
+ getFileNameBytes();
+
+ // optional int32 line_number = 3;
+ /**
+ * <code>optional int32 line_number = 3;</code>
+ */
+ boolean hasLineNumber();
+ /**
+ * <code>optional int32 line_number = 3;</code>
+ */
+ int getLineNumber();
+
+ // optional string method_name = 4;
+ /**
+ * <code>optional string method_name = 4;</code>
+ */
+ boolean hasMethodName();
+ /**
+ * <code>optional string method_name = 4;</code>
+ */
+ java.lang.String getMethodName();
+ /**
+ * <code>optional string method_name = 4;</code>
+ */
+ com.google.protobuf.ByteString
+ getMethodNameBytes();
+
+ // optional bool is_native_method = 5;
+ /**
+ * <code>optional bool is_native_method = 5;</code>
+ */
+ boolean hasIsNativeMethod();
+ /**
+ * <code>optional bool is_native_method = 5;</code>
+ */
+ boolean getIsNativeMethod();
+ }
+ /**
+ * Protobuf type {@code exec.shared.StackTraceElementWrapper}
+ */
+ public static final class StackTraceElementWrapper extends
+ com.google.protobuf.GeneratedMessage
+ implements StackTraceElementWrapperOrBuilder {
+ // Use StackTraceElementWrapper.newBuilder() to construct.
+ private StackTraceElementWrapper(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private StackTraceElementWrapper(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final StackTraceElementWrapper defaultInstance;
+ public static StackTraceElementWrapper getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public StackTraceElementWrapper getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private StackTraceElementWrapper(
+ 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;
+ className_ = input.readBytes();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ fileName_ = input.readBytes();
+ break;
+ }
+ case 24: {
+ bitField0_ |= 0x00000004;
+ lineNumber_ = input.readInt32();
+ break;
+ }
+ case 34: {
+ bitField0_ |= 0x00000008;
+ methodName_ = input.readBytes();
+ break;
+ }
+ case 40: {
+ bitField0_ |= 0x00000010;
+ isNativeMethod_ = input.readBool();
+ 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.drill.exec.proto.UserBitShared.internal_static_exec_shared_StackTraceElementWrapper_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.apache.drill.exec.proto.UserBitShared.internal_static_exec_shared_StackTraceElementWrapper_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.class, org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper.Builder.class);
+ }
+
+ public static com.google.protobuf.Parser<StackTraceElementWrapper> PARSER =
+ new com.google.protobuf.AbstractParser<StackTraceElementWrapper>() {
+ public StackTraceElementWrapper parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new StackTraceElementWrapper(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<StackTraceElementWrapper> getParserForType() {
+ return PARSER;
+ }
+
+ private int bitField0_;
+ // optional string class_name = 1;
+ public static final int CLASS_NAME_FIELD_NUMBER = 1;
+ private java.lang.Object className_;
+ /**
+ * <code>optional string class_name = 1;</code>
+ */
+ public boolean hasClassName() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>optional string class_name = 1;</code>
+ */
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ className_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>optional string class_name = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ // optional string file_name = 2;
+ public static final int FILE_NAME_FIELD_NUMBER = 2;
+ private java.lang.Object fileName_;
+ /**
+ * <code>optional string file_name = 2;</code>
+ */
+ public boolean hasFileName() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>optional string file_name = 2;</code>
+ */
+ public java.lang.String getFileName() {
+ java.lang.Object ref = fileName_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ fileName_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>optional string file_name = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getFileNameBytes() {
+ java.lang.Object ref = fileName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ fileName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ // optional int32 line_number = 3;
+ public static final int LINE_NUMBER_FIELD_NUMBER = 3;
+ private int lineNumber_;
+ /**
+ * <code>optional int32 line_number = 3;</code>
+ */
+ public boolean hasLineNumber() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * <code>optional int32 line_number = 3;</code>
+ */
+ public int getLineNumber() {
+ return lineNumber_;
+ }
+
+ // optional string method_name = 4;
+ public static final int METHOD_NAME_FIELD_NUMBER = 4;
+ private java.lang.Object methodName_;
+ /**
+ * <code>optional string method_name = 4;</code>
+ */
+ public boolean hasMethodName() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * <code>optional string method_name = 4;</code>
+ */
+ public java.lang.String getMethodName() {
+ java.lang.Object ref = methodName_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ methodName_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>optional string method_name = 4;</code>
+ */
+ public com.google.protobuf.ByteString
+ getMethodNameBytes() {
+ java.lang.Object ref = methodName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ methodName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ // optional bool is_native_method = 5;
+ public static final int IS_NATIVE_METHOD_FIELD_NUMBER = 5;
+ private boolean isNativeMethod_;
+ /**
+ * <code>optional bool is_native_method = 5;</code>
+ */
+ public boolean hasIsNativeMethod() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * <code>optional bool is_native_method = 5;</code>
+ */
+ public boolean getIsNativeMethod() {
+ return isNativeMethod_;
+ }
+
+ private void initFields() {
+ className_ = "";
+ fileName_ = "";
+ lineNumber_ = 0;
+ methodName_ = "";
+ isNativeMethod_ = false;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeBytes(1, getClassNameBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, getFileNameBytes());
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeInt32(3, lineNumber_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ output.writeBytes(4, getMethodNameBytes());
+ }
+ if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ output.writeBool(5, isNativeMethod_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(1, getClassNameBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, getFileNameBytes());
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(3, lineNumber_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(4, getMethodNameBytes());
+ }
+ if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(5, isNativeMethod_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ protected java.lang.Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobu
<TRUNCATED>
[5/6] DRILL-1436: Remove use of UDP based cache for purposes of
intermediate PlanFragment distribution
Posted by ja...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/server/RemoteServiceSet.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/server/RemoteServiceSet.java b/exec/java-exec/src/main/java/org/apache/drill/exec/server/RemoteServiceSet.java
index 96e9d8e..72eb306 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/server/RemoteServiceSet.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/server/RemoteServiceSet.java
@@ -21,9 +21,6 @@ import java.io.Closeable;
import java.io.IOException;
import org.apache.drill.common.config.DrillConfig;
-import org.apache.drill.exec.cache.DistributedCache;
-import org.apache.drill.exec.cache.infinispan.ICache;
-import org.apache.drill.exec.cache.local.LocalCache;
import org.apache.drill.exec.coord.ClusterCoordinator;
import org.apache.drill.exec.coord.local.LocalClusterCoordinator;
import org.apache.drill.exec.memory.BufferAllocator;
@@ -31,18 +28,13 @@ import org.apache.drill.exec.memory.BufferAllocator;
public class RemoteServiceSet implements Closeable {
static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(RemoteServiceSet.class);
- private final DistributedCache cache;
private final ClusterCoordinator coordinator;
- public RemoteServiceSet(DistributedCache cache, ClusterCoordinator coordinator) {
+ public RemoteServiceSet(ClusterCoordinator coordinator) {
super();
- this.cache = cache;
this.coordinator = coordinator;
}
- public DistributedCache getCache() {
- return cache;
- }
public ClusterCoordinator getCoordinator() {
return coordinator;
@@ -50,24 +42,15 @@ public class RemoteServiceSet implements Closeable {
@Override
public void close() throws IOException {
- try {
- cache.close();
- } catch(Exception e) {
- if (e instanceof IOException) {
- throw (IOException) e;
- }
- throw new IOException("Failure while closing cache", e);
- }
coordinator.close();
}
public static RemoteServiceSet getLocalServiceSet() {
- return new RemoteServiceSet(new LocalCache(), new LocalClusterCoordinator());
+ return new RemoteServiceSet(new LocalClusterCoordinator());
}
public static RemoteServiceSet getServiceSetWithFullCache(DrillConfig config, BufferAllocator allocator) throws Exception{
- ICache c = new ICache(config, allocator, true);
- return new RemoteServiceSet(c, new LocalClusterCoordinator());
+ return new RemoteServiceSet(new LocalClusterCoordinator());
}
}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/server/options/SystemOptionManager.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/server/options/SystemOptionManager.java b/exec/java-exec/src/main/java/org/apache/drill/exec/server/options/SystemOptionManager.java
index 86b0a23..e802b44 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/server/options/SystemOptionManager.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/server/options/SystemOptionManager.java
@@ -25,7 +25,6 @@ import java.util.concurrent.ConcurrentMap;
import org.apache.commons.collections.IteratorUtils;
import org.apache.drill.common.config.DrillConfig;
import org.apache.drill.exec.ExecConstants;
-import org.apache.drill.exec.cache.DistributedCache.CacheConfig;
import org.apache.drill.exec.compile.QueryClassLoader;
import org.apache.drill.exec.planner.physical.PlannerSettings;
import org.apache.drill.exec.server.options.OptionValue.OptionType;
@@ -40,12 +39,6 @@ public class SystemOptionManager implements OptionManager {
static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SystemOptionManager.class);
- public static final CacheConfig<String, OptionValue> OPTION_CACHE = CacheConfig //
- .newBuilder(OptionValue.class) //
- .name("sys.options") //
- .jackson()
- .build();
-
private final OptionValidator[] VALIDATORS = {
PlannerSettings.EXCHANGE,
PlannerSettings.HASHAGG,
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/DrillbitIterator.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/DrillbitIterator.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/DrillbitIterator.java
index 844fd68..67d7cf9 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/DrillbitIterator.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/DrillbitIterator.java
@@ -26,9 +26,11 @@ public class DrillbitIterator implements Iterator<Object> {
static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DrillbitIterator.class);
private Iterator<DrillbitEndpoint> endpoints;
+ private DrillbitEndpoint current;
public DrillbitIterator(FragmentContext c) {
this.endpoints = c.getDrillbitContext().getBits().iterator();
+ this.current = c.getIdentity();
}
public static class DrillbitInstance {
@@ -36,6 +38,7 @@ public class DrillbitIterator implements Iterator<Object> {
public int user_port;
public int control_port;
public int data_port;
+ public boolean current;
}
@Override
@@ -47,6 +50,7 @@ public class DrillbitIterator implements Iterator<Object> {
public Object next() {
DrillbitEndpoint ep = endpoints.next();
DrillbitInstance i = new DrillbitInstance();
+ i.current = ep.equals(current);
i.host = ep.getAddress();
i.user_port = ep.getUserPort();
i.control_port = ep.getControlPort();
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTable.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTable.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTable.java
index 4301f12..0bf2156 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTable.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTable.java
@@ -24,7 +24,8 @@ import org.eigenbase.reltype.RelDataTypeFactory;
public enum SystemTable {
OPTION("options", OptionValue.class),
- DRILLBITS("drillbits", DrillbitIterator.DrillbitInstance.class)
+ DRILLBITS("drillbits", DrillbitIterator.DrillbitInstance.class),
+ VERSION("version", VersionIterator.VersionInfo.class)
;
private final PojoDataType type;
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTablePlugin.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTablePlugin.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTablePlugin.java
index 743ab53..5a25724 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTablePlugin.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTablePlugin.java
@@ -66,6 +66,8 @@ public class SystemTablePlugin extends AbstractStoragePlugin{
public Iterator<Object> getRecordIterator(FragmentContext context, SystemTable table){
switch(table){
+ case VERSION:
+ return new VersionIterator();
case DRILLBITS:
return new DrillbitIterator(context);
case OPTION:
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/VersionIterator.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/VersionIterator.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/VersionIterator.java
new file mode 100644
index 0000000..ffc740a
--- /dev/null
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/VersionIterator.java
@@ -0,0 +1,78 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill.exec.store.sys;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.Properties;
+
+import com.google.common.io.Resources;
+
+public class VersionIterator implements Iterator<Object>{
+ static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(VersionIterator.class);
+
+ public boolean beforeFirst = true;
+
+ public static class VersionInfo {
+ public String commit_id = "Unknown";
+ public String commit_message = "";
+ public String commit_time = "";
+ public String build_email = "Unknown";
+ public String build_time = "";
+
+ public VersionInfo(){
+ URL u = Resources.getResource("git.properties");
+ if(u != null){
+ try {
+ Properties p = new Properties();
+ p.load(Resources.newInputStreamSupplier(u).getInput());
+ commit_id = p.getProperty("git.commit.id");
+ build_email = p.getProperty("git.build.user.email");
+ commit_time = p.getProperty("git.commit.time");
+ build_time = p.getProperty("git.build.time");
+ commit_message = p.getProperty("git.commit.message.short");
+
+ } catch (IOException e) {
+ logger.warn("Failure while trying to load \"git.properties\" file.", e);
+ }
+ }
+
+ }
+ }
+ @Override
+ public boolean hasNext() {
+ return beforeFirst;
+ }
+
+ @Override
+ public Object next() {
+ if(!beforeFirst){
+ throw new IllegalStateException();
+ }
+ beforeFirst = false;
+ return new VersionInfo();
+ }
+
+ @Override
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java
index 51b4e32..6a9cab5 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java
@@ -17,68 +17,207 @@
*/
package org.apache.drill.exec.work;
-import java.io.PrintWriter;
-import java.io.StringWriter;
import java.util.UUID;
+import java.util.regex.Pattern;
-import org.apache.drill.exec.planner.sql.parser.impl.ParseException;
import org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint;
import org.apache.drill.exec.proto.UserBitShared.DrillPBError;
-import org.eigenbase.sql.parser.SqlParseException;
+import org.apache.drill.exec.proto.UserBitShared.ExceptionWrapper;
+import org.apache.drill.exec.proto.UserBitShared.StackTraceElementWrapper;
+import org.apache.drill.exec.rpc.RemoteRpcException;
import org.slf4j.Logger;
public class ErrorHelper {
+ static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ErrorHelper.class);
-// public static DrillPBError logAndConvertError(DrillbitEndpoint endpoint, String message, Throwable t, Logger logger) {
-// return logAndConvertError(endpoint, message, t, logger, true);
-// }
+ final static Pattern IGNORE= Pattern.compile("^(sun|com\\.sun|java).*");
- public static DrillPBError logAndConvertError(DrillbitEndpoint endpoint, String message, Throwable t, Logger logger,
- boolean verbose) {
+ /**
+ * Manages message conversion before returning to user. If the exception is a remote rpc exception, will simply return user friendly message. Otherwise, will log and return.
+ * TODO: this should really be done client side but we don't currently have any way to maintain session state on the client.
+ *
+ * @param endpoint
+ * @param message
+ * @param t
+ * @param logger
+ * @param verbose
+ * @return
+ */
+ public static DrillPBError logAndConvertMessageError(DrillbitEndpoint endpoint, String message, Throwable t, Logger logger, boolean verbose) {
+
+ DrillPBError baseError = t instanceof RemoteRpcException ? ((RemoteRpcException) t).getRemoteError() : logAndConvertError(endpoint, message, t, logger);
+ String userMessage = getErrorMessage(baseError, verbose);
+ return DrillPBError.newBuilder() //
+ .setEndpoint(baseError.getEndpoint()) //
+ .setErrorId(baseError.getErrorId()) //
+ .setMessage(userMessage) //
+ .build();
+ }
+
+ public static DrillPBError logAndConvertError(DrillbitEndpoint endpoint, String message, Throwable t, Logger logger) {
String id = UUID.randomUUID().toString();
DrillPBError.Builder builder = DrillPBError.newBuilder();
builder.setEndpoint(endpoint);
builder.setErrorId(id);
- StringBuilder sb = new StringBuilder();
- if (message != null) {
- sb.append(message).append(" ");
+ builder.setMessage(message);
+ builder.setException(getWrapper(t));
+
+ // record the error to the log for later reference.
+ logger.error("Error {}: {}", id, message, t);
+
+ return builder.build();
+ }
+
+ public static ExceptionWrapper getWrapper(Throwable ex){
+ return getWrapperBuilder(ex).build();
+ }
+
+ public static ExceptionWrapper.Builder getWrapperBuilder(Throwable ex){
+ return getWrapperBuilder(ex, false);
+ }
+
+ public static ExceptionWrapper.Builder getWrapperBuilder(Throwable ex, boolean includeAllStack){
+
+
+
+ ExceptionWrapper.Builder ew = ExceptionWrapper.newBuilder();
+ if(ex.getMessage() != null) {
+ ew.setMessage(ex.getMessage());
+ }
+ ew.setExceptionClass(ex.getClass().getCanonicalName());
+ boolean isHidden = false;
+ StackTraceElementWrapper[] wrappers = new StackTraceElementWrapper[ex.getStackTrace().length];
+ for(int i = 0; i < wrappers.length; i++){
+ StackTraceElement ele = ex.getStackTrace()[i];
+ if(include(ele, includeAllStack)){
+ if(isHidden){
+ isHidden = false;
+ }
+ ew.addStackTrace(getSTWrapper(ele));
+ }else{
+ if(!isHidden){
+ isHidden = true;
+ ew.addStackTrace(getEmptyST());
+ }
+ }
+
+ }
+
+ if(ex.getCause() != null && ex.getCause() != ex){
+ ew.setCause(getWrapper(ex.getCause()));
+ }
+ return ew;
+ }
+
+ private static boolean include(StackTraceElement ele, boolean includeAllStack){
+ if(includeAllStack) {
+ return true;
}
- sb.append("%s ").append("[").append(id).append("]");
- if (verbose) {
- sb.append("\n")
- .append("Node details: ")
- .append(endpoint.getAddress())
- .append(":").append(endpoint.getControlPort())
- .append("/").append(endpoint.getDataPort());
+ return !(IGNORE.matcher(ele.getClassName()).matches());
+ }
+
+ private static StackTraceElementWrapper.Builder getEmptyST(){
+ StackTraceElementWrapper.Builder w = StackTraceElementWrapper.newBuilder();
+ w.setClassName("...");
+ w.setIsNativeMethod(false);
+ w.setLineNumber(0);
+ w.setMethodName("...");
+ return w;
+ }
+ public static StackTraceElementWrapper.Builder getSTWrapper(StackTraceElement ele){
+ StackTraceElementWrapper.Builder w = StackTraceElementWrapper.newBuilder();
+ w.setClassName(ele.getClassName());
+ if(ele.getFileName() != null) {
+ w.setFileName(ele.getFileName());
}
+ w.setIsNativeMethod(ele.isNativeMethod());
+ w.setLineNumber(ele.getLineNumber());
+ w.setMethodName(ele.getMethodName());
+ return w;
+ }
+
+
+ public static String getErrorMessage(final DrillPBError error, final boolean verbose) {
+
+ String finalMessage = null;
+ ExceptionWrapper ex = error.getException();
+ StringBuilder sb = new StringBuilder();
+
+
+
+ sb //
+ .append("[ ") //
+ .append(error.getErrorId()) //
+ .append(" on ")
+ .append(error.getEndpoint().getAddress())
+ .append(":").append(error.getEndpoint().getUserPort())
+ .append(" ]\n");
+
+ boolean cause = false;
+ while(ex != null){
+
+ if(ex.hasMessage()){
+ finalMessage = ex.getMessage();
+ }
+
+ if(verbose){
+ sb.append(" ");
+
+ if(cause){
+ sb.append("Caused By ");
+ }
+
+ sb.append("(");
+ sb.append(ex.getExceptionClass());
+ sb.append(") ");
+ sb.append(ex.getMessage());
+ sb.append("\n");
+ for(int i = 0; i < ex.getStackTraceCount(); i++){
+ StackTraceElementWrapper st = ex.getStackTrace(i);
+ sb.append(" ");
+ sb.append(st.getClassName());
+ sb.append('.');
+ sb.append(st.getMethodName());
+ sb.append("():");
+ sb.append(st.getLineNumber());
+ sb.append("\n");
+ }
+ cause = true;
+ }
+
+ ex = ex.hasCause() ? ex.getCause() : null;
+
- if (verbose) {
- StringWriter errors = new StringWriter();
- errors.write("\n");
- t.printStackTrace(new PrintWriter(errors));
- sb.append(errors);
}
- Throwable original = t;
- Throwable rootCause = null;
- while (true) {
- rootCause = t;
- if (t.getCause() == null || t.getCause() == t
- || (t instanceof SqlParseException && t.getCause() instanceof ParseException)) {
- break;
+ StringBuilder msg = new StringBuilder();
+
+ if (error.hasMessage()){
+ msg.append(error.getMessage());
+ if(finalMessage != null){
+ msg.append(", ");
+ msg.append(finalMessage);
+ msg.append(' ');
}
- t = t.getCause();
+ }else if(finalMessage != null){
+ msg.append(finalMessage);
+ msg.append(' ');
+ }else{
+ msg.append("Error ");
}
- String finalMsg = rootCause.getMessage() == null ? original.getMessage() : rootCause.getMessage();
- builder.setMessage(String.format(sb.toString(), finalMsg));
- builder.setErrorType(0);
+ msg.append(sb);
- // record the error to the log for later reference.
- logger.error("Error {}: {}", id, message, t);
+ return msg.toString();
+ }
+
+ public static void main(String[] args ){
+ DrillPBError e = logAndConvertError(DrillbitEndpoint.newBuilder().setAddress("host1").setControlPort(1234).build(), "RpcFailure", new Exception("Excep 1", new Exception("excep2")), logger);
+ System.out.println(getErrorMessage(e, false));
+ System.out.println("\n\n\n");
+ System.out.println(getErrorMessage(e, true));
- return builder.build();
}
}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/work/WorkManager.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/WorkManager.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/WorkManager.java
index 0407361..d85abd5 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/WorkManager.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/WorkManager.java
@@ -28,7 +28,6 @@ import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
-import org.apache.drill.exec.cache.DistributedCache;
import org.apache.drill.exec.coord.ClusterCoordinator;
import org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint;
import org.apache.drill.exec.proto.ExecProtos.FragmentHandle;
@@ -91,9 +90,9 @@ public class WorkManager implements Closeable {
this.dataHandler = new DataResponseHandlerImpl(bee);
}
- public void start(DrillbitEndpoint endpoint, DistributedCache cache, Controller controller,
+ public void start(DrillbitEndpoint endpoint, Controller controller,
DataConnectionCreator data, ClusterCoordinator coord, PStoreProvider provider) {
- this.dContext = new DrillbitContext(endpoint, bContext, coord, controller, data, cache, workBus, provider);
+ this.dContext = new DrillbitContext(endpoint, bContext, coord, controller, data, workBus, provider);
// executor = Executors.newFixedThreadPool(dContext.getConfig().getInt(ExecConstants.EXECUTOR_THREADS)
executor = Executors.newCachedThreadPool(new NamedThreadFactory("WorkManager-"));
eventThread.start();
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/ControlHandlerImpl.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/ControlHandlerImpl.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/ControlHandlerImpl.java
index 0ac606c..63d8c71 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/ControlHandlerImpl.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/ControlHandlerImpl.java
@@ -22,11 +22,11 @@ import io.netty.buffer.ByteBuf;
import java.io.IOException;
-import org.apache.drill.common.exceptions.ExecutionSetupException;
import org.apache.drill.exec.ops.FragmentContext;
import org.apache.drill.exec.physical.base.FragmentRoot;
import org.apache.drill.exec.proto.BitControl.FinishedReceiver;
import org.apache.drill.exec.proto.BitControl.FragmentStatus;
+import org.apache.drill.exec.proto.BitControl.InitializeFragments;
import org.apache.drill.exec.proto.BitControl.PlanFragment;
import org.apache.drill.exec.proto.BitControl.RpcType;
import org.apache.drill.exec.proto.ExecProtos.FragmentHandle;
@@ -38,6 +38,7 @@ import org.apache.drill.exec.rpc.Acks;
import org.apache.drill.exec.rpc.Response;
import org.apache.drill.exec.rpc.RpcConstants;
import org.apache.drill.exec.rpc.RpcException;
+import org.apache.drill.exec.rpc.UserRpcException;
import org.apache.drill.exec.rpc.control.ControlConnection;
import org.apache.drill.exec.rpc.control.ControlTunnel;
import org.apache.drill.exec.rpc.data.DataRpcConfig;
@@ -46,6 +47,7 @@ import org.apache.drill.exec.work.foreman.Foreman;
import org.apache.drill.exec.work.foreman.QueryStatus;
import org.apache.drill.exec.work.fragment.FragmentExecutor;
import org.apache.drill.exec.work.fragment.FragmentManager;
+import org.apache.drill.exec.work.fragment.NonRootFragmentManager;
import org.apache.drill.exec.work.fragment.NonRootStatusReporter;
public class ControlHandlerImpl implements ControlMessageHandler {
@@ -81,16 +83,12 @@ public class ControlHandlerImpl implements ControlMessageHandler {
// TODO: Support a type of message that has no response.
return DataRpcConfig.OK;
- case RpcType.REQ_INIATILIZE_FRAGMENT_VALUE:
- PlanFragment fragment = get(pBody, PlanFragment.PARSER);
- try {
- startNewRemoteFragment(fragment);
- return DataRpcConfig.OK;
-
- } catch (ExecutionSetupException e) {
- logger.error("Failure while attempting to start remote fragment.", fragment);
- return new Response(RpcType.ACK, Acks.FAIL);
+ case RpcType.REQ_INIATILIZE_FRAGMENTS_VALUE:
+ InitializeFragments fragments = get(pBody, InitializeFragments.PARSER);
+ for(int i =0; i < fragments.getFragmentCount(); i++){
+ startNewRemoteFragment(fragments.getFragment(i));
}
+ return DataRpcConfig.OK;
case RpcType.REQ_QUERY_STATUS_VALUE:
QueryId queryId = get(pBody, QueryId.PARSER);
@@ -113,25 +111,29 @@ public class ControlHandlerImpl implements ControlMessageHandler {
}
- /* (non-Javadoc)
- * @see org.apache.drill.exec.work.batch.BitComHandler#startNewRemoteFragment(org.apache.drill.exec.proto.ExecProtos.PlanFragment)
- */
@Override
- public void startNewRemoteFragment(PlanFragment fragment) throws ExecutionSetupException{
+ public void startNewRemoteFragment(PlanFragment fragment) throws UserRpcException {
logger.debug("Received remote fragment start instruction", fragment);
- FragmentContext context = new FragmentContext(bee.getContext(), fragment, null, bee.getContext().getFunctionImplementationRegistry());
- ControlTunnel tunnel = bee.getContext().getController().getTunnel(fragment.getForeman());
- NonRootStatusReporter listener = new NonRootStatusReporter(context, tunnel);
try {
- FragmentRoot rootOperator = bee.getContext().getPlanReader().readFragmentOperator(fragment.getFragmentJson());
- FragmentExecutor fr = new FragmentExecutor(context, bee, rootOperator, listener);
- bee.addFragmentRunner(fr);
+ // we either need to start the fragment if it is a leaf fragment, or set up a fragment manager if it is non leaf.
+ if(fragment.getLeafFragment()){
+ FragmentContext context = new FragmentContext(bee.getContext(), fragment, null, bee.getContext().getFunctionImplementationRegistry());
+ ControlTunnel tunnel = bee.getContext().getController().getTunnel(fragment.getForeman());
+ NonRootStatusReporter listener = new NonRootStatusReporter(context, tunnel);
+ FragmentRoot rootOperator = bee.getContext().getPlanReader().readFragmentOperator(fragment.getFragmentJson());
+ FragmentExecutor fr = new FragmentExecutor(context, bee, rootOperator, listener);
+ bee.addFragmentRunner(fr);
+ }else{ // isIntermediate, store for incoming data.
+ NonRootFragmentManager manager = new NonRootFragmentManager(fragment, bee);
+ bee.getContext().getWorkBus().setFragmentManager(manager);
+ }
+
} catch (Exception e) {
- listener.fail(fragment.getHandle(), "Failure due to uncaught exception", e);
+ throw new UserRpcException(bee.getContext().getEndpoint(), "Failure while trying to start remote fragment", e);
} catch (OutOfMemoryError t) {
if (t.getMessage().startsWith("Direct buffer")) {
- listener.fail(fragment.getHandle(), "Failure due to error", t);
+ throw new UserRpcException(bee.getContext().getEndpoint(), "Out of direct memory while trying to start remote fragment", t);
} else {
throw t;
}
@@ -144,7 +146,7 @@ public class ControlHandlerImpl implements ControlMessageHandler {
*/
@Override
public Ack cancelFragment(FragmentHandle handle) {
- FragmentManager manager = bee.getContext().getWorkBus().getFragmentManager(handle);
+ FragmentManager manager = bee.getContext().getWorkBus().getFragmentManagerIfExists(handle);
if (manager != null) {
// try remote fragment cancel.
manager.cancel();
@@ -160,7 +162,7 @@ public class ControlHandlerImpl implements ControlMessageHandler {
}
public Ack receivingFragmentFinished(FinishedReceiver finishedReceiver) {
- FragmentManager manager = bee.getContext().getWorkBus().getFragmentManager(finishedReceiver.getSender());
+ FragmentManager manager = bee.getContext().getWorkBus().getFragmentManagerIfExists(finishedReceiver.getSender());
FragmentExecutor executor;
if (manager != null) {
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/ControlMessageHandler.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/ControlMessageHandler.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/ControlMessageHandler.java
index d00478b..c5d78cc 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/ControlMessageHandler.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/ControlMessageHandler.java
@@ -19,13 +19,12 @@ package org.apache.drill.exec.work.batch;
import io.netty.buffer.ByteBuf;
-import org.apache.drill.common.exceptions.ExecutionSetupException;
-import org.apache.drill.exec.memory.OutOfMemoryException;
import org.apache.drill.exec.proto.BitControl.PlanFragment;
import org.apache.drill.exec.proto.ExecProtos.FragmentHandle;
import org.apache.drill.exec.proto.GeneralRPCProtos.Ack;
import org.apache.drill.exec.rpc.Response;
import org.apache.drill.exec.rpc.RpcException;
+import org.apache.drill.exec.rpc.UserRpcException;
import org.apache.drill.exec.rpc.control.ControlConnection;
public interface ControlMessageHandler {
@@ -33,7 +32,7 @@ public interface ControlMessageHandler {
public abstract Response handle(ControlConnection connection, int rpcType, ByteBuf pBody, ByteBuf dBody)
throws RpcException;
- public abstract void startNewRemoteFragment(PlanFragment fragment) throws OutOfMemoryException, ExecutionSetupException;
+ public abstract void startNewRemoteFragment(PlanFragment fragment) throws UserRpcException;
public abstract Ack cancelFragment(FragmentHandle handle);
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
index 0a34a22..2e4f43d 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
@@ -21,20 +21,12 @@ import io.netty.buffer.ByteBuf;
import java.io.Closeable;
import java.io.IOException;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
import org.apache.drill.common.config.DrillConfig;
-import org.apache.drill.common.exceptions.ExecutionSetupException;
import org.apache.drill.common.logical.LogicalPlan;
import org.apache.drill.common.logical.PlanProperties.Generator.ResultMode;
import org.apache.drill.exec.ExecConstants;
-import org.apache.drill.exec.cache.DistributedCache.CacheConfig;
-import org.apache.drill.exec.cache.DistributedCache.SerializationMode;
import org.apache.drill.exec.coord.DistributedSemaphore;
import org.apache.drill.exec.coord.DistributedSemaphore.DistributedLease;
import org.apache.drill.exec.exception.FragmentSetupException;
@@ -53,8 +45,6 @@ import org.apache.drill.exec.planner.fragment.SimpleParallelizer;
import org.apache.drill.exec.planner.fragment.StatsCollector;
import org.apache.drill.exec.planner.sql.DirectPlan;
import org.apache.drill.exec.planner.sql.DrillSqlWorker;
-import org.apache.drill.exec.proto.BitControl.PlanFragment;
-import org.apache.drill.exec.proto.ExecProtos.FragmentHandle;
import org.apache.drill.exec.proto.GeneralRPCProtos.Ack;
import org.apache.drill.exec.proto.UserBitShared.DrillPBError;
import org.apache.drill.exec.proto.UserBitShared.QueryId;
@@ -74,20 +64,12 @@ import org.apache.drill.exec.work.ErrorHelper;
import org.apache.drill.exec.work.QueryWorkUnit;
import org.apache.drill.exec.work.WorkManager.WorkerBee;
-import com.google.common.collect.Lists;
-
/**
* Foreman manages all queries where this is the driving/root node.
*/
public class Foreman implements Runnable, Closeable, Comparable<Object>{
static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(Foreman.class);
-
- public static final CacheConfig<FragmentHandle, PlanFragment> FRAGMENT_CACHE = CacheConfig //
- .newBuilder(FragmentHandle.class, PlanFragment.class) //
- .mode(SerializationMode.PROTOBUF) //
- .build();
-
private QueryId queryId;
private RunQuery queryRequest;
private QueryContext context;
@@ -159,8 +141,7 @@ public class Foreman implements Runnable, Closeable, Comparable<Object>{
}
}
- boolean verbose = getContext().getOptions().getOption(ExecConstants.ENABLE_VERBOSE_ERRORS_KEY).bool_val;
- DrillPBError error = ErrorHelper.logAndConvertError(context.getCurrentEndpoint(), message, t, logger, verbose);
+ DrillPBError error = ErrorHelper.logAndConvertError(context.getCurrentEndpoint(), message, t, logger);
QueryResult result = QueryResult //
.newBuilder() //
.addError(error) //
@@ -376,38 +357,13 @@ public class Foreman implements Runnable, Closeable, Comparable<Object>{
queryId, context.getActiveEndpoints(), context.getPlanReader(), rootFragment, planningSet, initiatingClient.getSession());
this.context.getWorkBus().setFragmentStatusListener(work.getRootFragment().getHandle().getQueryId(), fragmentManager);
- List<PlanFragment> leafFragments = Lists.newArrayList();
- List<PlanFragment> intermediateFragments = Lists.newArrayList();
-
- // store fragments in distributed grid.
- logger.debug("Storing fragments");
- List<Future<PlanFragment>> queue = new LinkedList<>();
- for (PlanFragment f : work.getFragments()) {
- // store all fragments in grid since they are part of handshake.
-
- queue.add(context.getCache().getMap(FRAGMENT_CACHE).put(f.getHandle(), f));
- if (f.getLeafFragment()) {
- leafFragments.add(f);
- } else {
- intermediateFragments.add(f);
- }
- }
-
- for (Future<PlanFragment> f : queue) {
- try {
- f.get(10, TimeUnit.SECONDS);
- } catch (InterruptedException | ExecutionException | TimeoutException e) {
- throw new ExecutionSetupException("failure while storing plan fragments", e);
- }
- }
- int totalFragments = 1 + intermediateFragments.size() + leafFragments.size();
+ int totalFragments = 1 + work.getFragments().size();;
fragmentManager.getStatus().setTotalFragments(totalFragments);
fragmentManager.getStatus().updateCache();
- logger.debug("Fragments stored.");
logger.debug("Submitting fragments to run.");
- fragmentManager.runFragments(bee, work.getRootFragment(), work.getRootOperator(), initiatingClient, leafFragments, intermediateFragments);
+ fragmentManager.runFragments(bee, work.getRootFragment(), work.getRootOperator(), initiatingClient, work.getFragments());
logger.debug("Fragments running.");
state.updateState(QueryState.PENDING, QueryState.RUNNING);
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/FragmentData.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/FragmentData.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/FragmentData.java
index b9b3de0..52fd0a9 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/FragmentData.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/FragmentData.java
@@ -31,7 +31,11 @@ public class FragmentData {
public FragmentData(FragmentHandle handle, DrillbitEndpoint endpoint, boolean isLocal) {
super();
- MinorFragmentProfile f = MinorFragmentProfile.newBuilder().setState(FragmentState.SENDING).setMinorFragmentId(handle.getMinorFragmentId()).build();
+ MinorFragmentProfile f = MinorFragmentProfile.newBuilder() //
+ .setState(FragmentState.SENDING) //
+ .setMinorFragmentId(handle.getMinorFragmentId()) //
+ .setEndpoint(endpoint) //
+ .build();
this.status = FragmentStatus.newBuilder().setHandle(handle).setProfile(f).build();
this.endpoint = endpoint;
this.isLocal = isLocal;
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
index a01a5f6..61f3d82 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
@@ -19,6 +19,7 @@ package org.apache.drill.exec.work.foreman;
import io.netty.buffer.ByteBuf;
+import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
@@ -28,6 +29,7 @@ import org.apache.drill.common.exceptions.ExecutionSetupException;
import org.apache.drill.exec.ops.FragmentContext;
import org.apache.drill.exec.physical.base.FragmentRoot;
import org.apache.drill.exec.proto.BitControl.FragmentStatus;
+import org.apache.drill.exec.proto.BitControl.InitializeFragments;
import org.apache.drill.exec.proto.BitControl.PlanFragment;
import org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint;
import org.apache.drill.exec.proto.ExecProtos.FragmentHandle;
@@ -50,6 +52,9 @@ import org.apache.drill.exec.work.fragment.AbstractStatusReporter;
import org.apache.drill.exec.work.fragment.FragmentExecutor;
import org.apache.drill.exec.work.fragment.RootFragmentManager;
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.Multimap;
+
/**
* Each Foreman holds its own fragment manager. This manages the events associated with execution of a particular query across all fragments.
*/
@@ -87,10 +92,9 @@ public class QueryManager implements FragmentStatusListener{
}
public void runFragments(WorkerBee bee, PlanFragment rootFragment, FragmentRoot rootOperator,
- UserClientConnection rootClient, List<PlanFragment> leafFragments,
- List<PlanFragment> intermediateFragments) throws ExecutionSetupException{
+ UserClientConnection rootClient, List<PlanFragment> nonRootFragments) throws ExecutionSetupException{
logger.debug("Setting up fragment runs.");
- remainingFragmentCount.set(intermediateFragments.size() + leafFragments.size() + 1);
+ remainingFragmentCount.set(nonRootFragments.size() + 1);
assert queryId == rootFragment.getHandle().getQueryId();
workBus = bee.getContext().getWorkBus();
@@ -103,7 +107,7 @@ public class QueryManager implements FragmentStatusListener{
logger.debug("Setting buffers on root context.");
rootContext.setBuffers(buffers);
// add fragment to local node.
- status.add(new FragmentData(rootFragment.getHandle(), null, true));
+ status.add(new FragmentData(rootFragment.getHandle(), rootFragment.getAssignment(), true));
logger.debug("Fragment added to local node.");
rootRunner = new FragmentExecutor(rootContext, bee, rootOperator, new RootStatusHandler(rootContext, rootFragment));
RootFragmentManager fragmentManager = new RootFragmentManager(rootFragment.getHandle(), buffers, rootRunner);
@@ -113,19 +117,24 @@ public class QueryManager implements FragmentStatusListener{
bee.addFragmentRunner(fragmentManager.getRunnable());
}else{
// if we do, record the fragment manager in the workBus.
- workBus.setRootFragmentManager(fragmentManager);
+ workBus.setFragmentManager(fragmentManager);
}
}
- // keep track of intermediate fragments (not root or leaf)
- for (PlanFragment f : intermediateFragments) {
+ Multimap<DrillbitEndpoint, PlanFragment> fragmentMap = ArrayListMultimap.create();
+
+ // record all fragments for status purposes.
+ for (PlanFragment f : nonRootFragments) {
logger.debug("Tracking intermediate remote node {} with data {}", f.getAssignment(), f.getFragmentJson());
status.add(new FragmentData(f.getHandle(), f.getAssignment(), false));
+ fragmentMap.put(f.getAssignment(), f);
}
+
+
// send remote (leaf) fragments.
- for (PlanFragment f : leafFragments) {
- sendRemoteFragment(f);
+ for (DrillbitEndpoint ep : fragmentMap.keySet()) {
+ sendRemoteFragments(ep, fragmentMap.get(ep));
}
bee.getContext().getAllocator().resetFragmentLimits();
@@ -137,11 +146,16 @@ public class QueryManager implements FragmentStatusListener{
}
}
- private void sendRemoteFragment(PlanFragment fragment){
- logger.debug("Sending remote fragment to node {} with data {}", fragment.getAssignment(), fragment.getFragmentJson());
- status.add(new FragmentData(fragment.getHandle(), fragment.getAssignment(), false));
- FragmentSubmitListener listener = new FragmentSubmitListener(fragment.getAssignment(), fragment);
- controller.getTunnel(fragment.getAssignment()).sendFragment(listener, fragment);
+ private void sendRemoteFragments(DrillbitEndpoint assignment, Collection<PlanFragment> fragments){
+ InitializeFragments.Builder fb = InitializeFragments.newBuilder();
+ for(PlanFragment f : fragments){
+ fb.addFragment(f);
+ }
+ InitializeFragments initFrags = fb.build();
+
+ logger.debug("Sending remote fragments to node {} with data {}", assignment, initFrags);
+ FragmentSubmitListener listener = new FragmentSubmitListener(assignment, initFrags);
+ controller.getTunnel(assignment).sendFragments(listener, initFrags);
}
@@ -255,16 +269,17 @@ public class QueryManager implements FragmentStatusListener{
}
- public RpcOutcomeListener<Ack> getSubmitListener(DrillbitEndpoint endpoint, PlanFragment value){
+ public RpcOutcomeListener<Ack> getSubmitListener(DrillbitEndpoint endpoint, InitializeFragments value){
return new FragmentSubmitListener(endpoint, value);
}
- private class FragmentSubmitListener extends EndpointListener<Ack, PlanFragment>{
+ private class FragmentSubmitListener extends EndpointListener<Ack, InitializeFragments>{
- public FragmentSubmitListener(DrillbitEndpoint endpoint, PlanFragment value) {
+ public FragmentSubmitListener(DrillbitEndpoint endpoint, InitializeFragments value) {
super(endpoint, value);
}
+
@Override
public void failed(RpcException ex) {
logger.debug("Failure while sending fragment. Stopping query.", ex);
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/AbstractStatusReporter.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/AbstractStatusReporter.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/AbstractStatusReporter.java
index 1983ebb..422ebed 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/AbstractStatusReporter.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/AbstractStatusReporter.java
@@ -45,8 +45,7 @@ public abstract class AbstractStatusReporter implements StatusReporter{
context.getStats().addMetricsToStatus(b);
b.setState(state);
if(t != null){
- boolean verbose = context.getOptions().getOption(ExecConstants.ENABLE_VERBOSE_ERRORS_KEY).bool_val;
- b.setError(ErrorHelper.logAndConvertError(context.getIdentity(), message, t, logger, verbose));
+ b.setError(ErrorHelper.logAndConvertError(context.getIdentity(), message, t, logger));
}
status.setHandle(context.getHandle());
b.setMemoryUsed(context.getAllocator().getAllocatedMemory());
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/test/java/org/apache/drill/PlanningBase.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/PlanningBase.java b/exec/java-exec/src/test/java/org/apache/drill/PlanningBase.java
index 7fc7d6b..3a195e8 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/PlanningBase.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/PlanningBase.java
@@ -28,8 +28,6 @@ import net.hydromatic.optiq.jdbc.SimpleOptiqSchema;
import org.apache.drill.common.config.DrillConfig;
import org.apache.drill.common.util.TestTools;
import org.apache.drill.exec.ExecTest;
-import org.apache.drill.exec.cache.DistributedCache;
-import org.apache.drill.exec.cache.local.LocalCache;
import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
import org.apache.drill.exec.memory.TopLevelAllocator;
import org.apache.drill.exec.ops.QueryContext;
@@ -70,8 +68,6 @@ public class PlanningBase extends ExecTest{
protected void testSqlPlan(String sqlCommands) throws Exception {
String[] sqlStrings = sqlCommands.split(";");
- final DistributedCache cache = new LocalCache();
- cache.run();
final LocalPStoreProvider provider = new LocalPStoreProvider(config);
provider.start();
@@ -91,8 +87,6 @@ public class PlanningBase extends ExecTest{
result = config;
dbContext.getOptionManager();
result = systemOptions;
- dbContext.getCache();
- result = cache;
dbContext.getPersistentStoreProvider();
result = provider;
}
@@ -126,8 +120,6 @@ public class PlanningBase extends ExecTest{
result = queryOptions;
context.getConfig();
result = config;
- context.getCache();
- result = cache;
context.getDrillOperatorTable();
result = table;
}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/test/java/org/apache/drill/TestBugFixes.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestBugFixes.java b/exec/java-exec/src/test/java/org/apache/drill/TestBugFixes.java
index bfa97d1..51f3121 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestBugFixes.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestBugFixes.java
@@ -44,6 +44,15 @@ public class TestBugFixes extends BaseTestQuery {
test(select);
}
+ @Test
+ public void testSysDrillbits() throws Exception {
+ test("select * from sys.drillbits");
+ }
+
+ @Test
+ public void testVersionTable() throws Exception {
+ test("select * from sys.version");
+ }
@Test
public void DRILL883() throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/test/java/org/apache/drill/exec/cache/TestCacheSerialization.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/cache/TestCacheSerialization.java b/exec/java-exec/src/test/java/org/apache/drill/exec/cache/TestCacheSerialization.java
deleted file mode 100644
index d507913..0000000
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/cache/TestCacheSerialization.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.drill.exec.cache;
-
-import java.util.List;
-
-import org.apache.drill.common.config.DrillConfig;
-import org.apache.drill.common.expression.SchemaPath;
-import org.apache.drill.common.types.TypeProtos;
-import org.apache.drill.common.types.Types;
-import org.apache.drill.exec.ExecTest;
-import org.apache.drill.exec.cache.DistributedCache.CacheConfig;
-import org.apache.drill.exec.cache.infinispan.ICache;
-import org.apache.drill.exec.expr.TypeHelper;
-import org.apache.drill.exec.memory.BufferAllocator;
-import org.apache.drill.exec.memory.TopLevelAllocator;
-import org.apache.drill.exec.physical.impl.orderedpartitioner.OrderedPartitionRecordBatch;
-import org.apache.drill.exec.proto.ExecProtos.FragmentHandle;
-import org.apache.drill.exec.proto.UserBitShared.QueryId;
-import org.apache.drill.exec.record.MaterializedField;
-import org.apache.drill.exec.record.VectorAccessible;
-import org.apache.drill.exec.record.VectorContainer;
-import org.apache.drill.exec.record.VectorWrapper;
-import org.apache.drill.exec.record.WritableBatch;
-import org.apache.drill.exec.server.options.OptionValue;
-import org.apache.drill.exec.server.options.OptionValue.OptionType;
-import org.apache.drill.exec.vector.AllocationHelper;
-import org.apache.drill.exec.vector.IntVector;
-import org.apache.drill.exec.vector.ValueVector;
-import org.apache.drill.exec.vector.VarBinaryVector;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import com.google.common.collect.Lists;
-
-public class TestCacheSerialization extends ExecTest {
-
- private static DistributedCache ICACHE;
- private static BufferAllocator ALLOCATOR;
- private static final DrillConfig CONFIG = DrillConfig.create();
-
- @Test
- public void protobufSerialization() throws Exception {
- DistributedMap<String, FragmentHandle> map = ICACHE.getMap(CacheConfig.newBuilder(FragmentHandle.class).proto().build());
- FragmentHandle s = FragmentHandle.newBuilder().setMajorFragmentId(1).setMinorFragmentId(1).setQueryId(QueryId.newBuilder().setPart1(74).setPart2(66).build()).build();
- map.put("1", s).get();
- for(int i =0; i < 2; i++){
- FragmentHandle s2 = map.get("1");
- Assert.assertEquals(s, s2);
- }
- }
-
- @Test
- public void jacksonSerialization() throws Exception {
- OptionValue v = OptionValue.createBoolean(OptionType.SESSION, "my test option", true);
- DistributedMap<String, OptionValue> map = ICACHE.getMap(CacheConfig.newBuilder(OptionValue.class).jackson().build());
- map.put("1", v).get();
- for(int i = 0; i < 5; i++){
- OptionValue v2 = map.get("1");
- Assert.assertEquals(v, v2);
- }
- }
-
- @Test
- public void multimapWithDrillSerializable() throws Exception {
- List<ValueVector> vectorList = Lists.newArrayList();
-
- MaterializedField intField = MaterializedField.create(SchemaPath.getSimplePath("int"),
- Types.required(TypeProtos.MinorType.INT));
- IntVector intVector = (IntVector) TypeHelper.getNewVector(intField, ALLOCATOR);
- MaterializedField binField = MaterializedField.create(SchemaPath.getSimplePath("binary"),
- Types.required(TypeProtos.MinorType.VARBINARY));
- VarBinaryVector binVector = (VarBinaryVector) TypeHelper.getNewVector(binField, ALLOCATOR);
- AllocationHelper.allocate(intVector, 4, 4);
- AllocationHelper.allocate(binVector, 4, 5);
- vectorList.add(intVector);
- vectorList.add(binVector);
-
- intVector.getMutator().setSafe(0, 0);
- binVector.getMutator().setSafe(0, "ZERO".getBytes());
- intVector.getMutator().setSafe(1, 1);
- binVector.getMutator().setSafe(1, "ONE".getBytes());
- intVector.getMutator().setSafe(2, 2);
- binVector.getMutator().setSafe(2, "TWO".getBytes());
- intVector.getMutator().setSafe(3, 3);
- binVector.getMutator().setSafe(3, "THREE".getBytes());
- intVector.getMutator().setValueCount(4);
- binVector.getMutator().setValueCount(4);
-
- VectorContainer container = new VectorContainer();
- container.addCollection(vectorList);
- container.setRecordCount(4);
- WritableBatch batch = WritableBatch.getBatchNoHVWrap(container.getRecordCount(), container, false);
- CachedVectorContainer wrap = new CachedVectorContainer(batch, ALLOCATOR);
-
- DistributedMultiMap<String, CachedVectorContainer> mmap = ICACHE.getMultiMap(OrderedPartitionRecordBatch.MULTI_CACHE_CONFIG);
- mmap.put("vectors", wrap).get();
-
- for(int x =0; x < 2; x++){
- CachedVectorContainer newWrap = (CachedVectorContainer) mmap.get("vectors").iterator().next();
-
- VectorAccessible newContainer = newWrap.get();
- for (VectorWrapper<?> w : newContainer) {
- ValueVector vv = w.getValueVector();
- int values = vv.getAccessor().getValueCount();
- for (int i = 0; i < values; i++) {
- Object o = vv.getAccessor().getObject(i);
- if (o instanceof byte[]) {
- System.out.println(new String((byte[]) o));
- } else {
- System.out.println(o);
- }
- }
- }
-
- newWrap.clear();
- }
- }
-
- @BeforeClass
- public static void setupCache() throws Exception {
- ALLOCATOR = new TopLevelAllocator();
- ICACHE = new ICache(CONFIG, ALLOCATOR, true);
- ICACHE.run();
- }
-
- @AfterClass
- public static void destroyCache() throws Exception {
- ICACHE.close();
- ALLOCATOR.close();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/test/java/org/apache/drill/exec/compile/TestClassTransformation.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/compile/TestClassTransformation.java b/exec/java-exec/src/test/java/org/apache/drill/exec/compile/TestClassTransformation.java
index 896cf4d..bb855c9 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/compile/TestClassTransformation.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/compile/TestClassTransformation.java
@@ -20,7 +20,6 @@ package org.apache.drill.exec.compile;
import java.io.IOException;
import org.apache.drill.BaseTestQuery;
-import org.apache.drill.exec.cache.local.LocalCache;
import org.apache.drill.exec.compile.ClassTransformer.ClassSet;
import org.apache.drill.exec.compile.sig.GeneratorMapping;
import org.apache.drill.exec.compile.sig.MappingSet;
@@ -105,7 +104,7 @@ public class TestClassTransformation extends BaseTestQuery {
private void compilationInnerClass(QueryClassLoader loader) throws Exception{
CodeGenerator<ExampleInner> cg = newCodeGenerator(ExampleInner.class, ExampleTemplateWithInner.class);
- ClassTransformer ct = new ClassTransformer(new LocalCache());
+ ClassTransformer ct = new ClassTransformer();
Class<? extends ExampleInner> c = (Class<? extends ExampleInner>) ct.getImplementationClass(loader, cg.getDefinition(), cg.generateAndGet(), cg.getMaterializedClassName());
ExampleInner t = (ExampleInner) c.newInstance();
t.doOutside();
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestOptiqPlans.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestOptiqPlans.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestOptiqPlans.java
index a62409b..4aaaa78 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestOptiqPlans.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestOptiqPlans.java
@@ -26,7 +26,6 @@ import org.apache.drill.common.config.DrillConfig;
import org.apache.drill.common.logical.LogicalPlan;
import org.apache.drill.common.util.FileUtils;
import org.apache.drill.exec.ExecTest;
-import org.apache.drill.exec.cache.DistributedCache;
import org.apache.drill.exec.client.DrillClient;
import org.apache.drill.exec.coord.ClusterCoordinator;
import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
@@ -73,27 +72,27 @@ public class TestOptiqPlans extends ExecTest {
@Test
public void orderBy(@Injectable final BootStrapContext ctxt, @Injectable UserClientConnection connection,
- @Injectable ClusterCoordinator coord, @Injectable DataConnectionCreator com, @Injectable DistributedCache cache,
+ @Injectable ClusterCoordinator coord, @Injectable DataConnectionCreator com,
@Injectable Controller controller, @Injectable WorkEventBus workBus) throws Throwable {
- SimpleRootExec exec = doLogicalTest(ctxt, connection, "/logical_order.json", coord, com, cache, controller, workBus);
+ SimpleRootExec exec = doLogicalTest(ctxt, connection, "/logical_order.json", coord, com, controller, workBus);
}
@Test
public void stringFilter(@Injectable final BootStrapContext ctxt, @Injectable UserClientConnection connection,
- @Injectable ClusterCoordinator coord, @Injectable DataConnectionCreator com, @Injectable DistributedCache cache,
+ @Injectable ClusterCoordinator coord, @Injectable DataConnectionCreator com,
@Injectable Controller controller, @Injectable WorkEventBus workBus) throws Throwable {
- SimpleRootExec exec = doLogicalTest(ctxt, connection, "/logical_string_filter.json", coord, com, cache, controller, workBus);
+ SimpleRootExec exec = doLogicalTest(ctxt, connection, "/logical_string_filter.json", coord, com, controller, workBus);
}
@Test
public void groupBy(@Injectable final BootStrapContext bitContext, @Injectable UserClientConnection connection,
- @Injectable ClusterCoordinator coord, @Injectable DataConnectionCreator com, @Injectable DistributedCache cache,
+ @Injectable ClusterCoordinator coord, @Injectable DataConnectionCreator com,
@Injectable Controller controller, @Injectable WorkEventBus workBus) throws Throwable {
- SimpleRootExec exec = doLogicalTest(bitContext, connection, "/logical_group.json", coord, com, cache, controller, workBus);
+ SimpleRootExec exec = doLogicalTest(bitContext, connection, "/logical_group.json", coord, com, controller, workBus);
}
private SimpleRootExec doLogicalTest(final BootStrapContext context, UserClientConnection connection, String file,
- ClusterCoordinator coord, DataConnectionCreator com, DistributedCache cache, Controller controller, WorkEventBus workBus) throws Exception {
+ ClusterCoordinator coord, DataConnectionCreator com, Controller controller, WorkEventBus workBus) throws Exception {
new NonStrictExpectations() {
{
context.getMetrics();
@@ -105,7 +104,7 @@ public class TestOptiqPlans extends ExecTest {
}
};
RemoteServiceSet lss = RemoteServiceSet.getLocalServiceSet();
- DrillbitContext bitContext = new DrillbitContext(DrillbitEndpoint.getDefaultInstance(), context, coord, controller, com, cache, workBus, new LocalPStoreProvider(DrillConfig.create()));
+ DrillbitContext bitContext = new DrillbitContext(DrillbitEndpoint.getDefaultInstance(), context, coord, controller, com, workBus, new LocalPStoreProvider(DrillConfig.create()));
QueryContext qc = new QueryContext(UserSession.Builder.newBuilder().setSupportComplexTypes(true).build(), QueryId.getDefaultInstance(), bitContext);
PhysicalPlanReader reader = bitContext.getPlanReader();
LogicalPlan plan = reader.readLogicalPlan(Files.toString(FileUtils.getResourceAsFile(file), Charsets.UTF_8));
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/orderedpartitioner/TestOrderedPartitionExchange.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/orderedpartitioner/TestOrderedPartitionExchange.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/orderedpartitioner/TestOrderedPartitionExchange.java
index 8419860..27d38e6 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/orderedpartitioner/TestOrderedPartitionExchange.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/orderedpartitioner/TestOrderedPartitionExchange.java
@@ -38,6 +38,7 @@ import org.apache.drill.exec.vector.BigIntVector;
import org.apache.drill.exec.vector.Float8Vector;
import org.apache.drill.exec.vector.IntVector;
import org.junit.Assert;
+import org.junit.Ignore;
import org.junit.Test;
import com.google.common.base.Charsets;
@@ -47,6 +48,7 @@ import com.google.common.io.Files;
/**
* Tests the OrderedPartitionExchange Operator
*/
+@Ignore("Disabled until alternative to distributed cache provided.")
public class TestOrderedPartitionExchange extends PopUnitTestBase {
static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestOrderedPartitionExchange.class);
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/test/java/org/apache/drill/exec/server/TestBitRpc.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/server/TestBitRpc.java b/exec/java-exec/src/test/java/org/apache/drill/exec/server/TestBitRpc.java
index d408773..7b771f5 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/server/TestBitRpc.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/server/TestBitRpc.java
@@ -74,7 +74,7 @@ public class TestBitRpc extends ExecTest {
BootStrapContext c2 = new BootStrapContext(DrillConfig.create());
new NonStrictExpectations() {{
- workBus.getOrCreateFragmentManager((FragmentHandle) any); result = fman;
+ workBus.getFragmentManagerIfExists((FragmentHandle) any); result = fman;
workBus.getFragmentManager( (FragmentHandle) any); result = fman;
fman.getFragmentContext(); result = fcon;
fcon.getAllocator(); result = c.getAllocator();
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/java-exec/src/test/java/org/apache/drill/exec/vector/complex/writer/TestJsonReader.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/vector/complex/writer/TestJsonReader.java b/exec/java-exec/src/test/java/org/apache/drill/exec/vector/complex/writer/TestJsonReader.java
index f450e5d..67c6dc8 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/vector/complex/writer/TestJsonReader.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/vector/complex/writer/TestJsonReader.java
@@ -17,9 +17,7 @@
*/
package org.apache.drill.exec.vector.complex.writer;
-import static org.jgroups.util.Util.assertTrue;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.Assert.*;
import io.netty.buffer.DrillBuf;
import java.io.ByteArrayOutputStream;
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/451dd608/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillCursor.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillCursor.java b/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillCursor.java
index bfc1b8a..fbe611f 100644
--- a/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillCursor.java
+++ b/exec/jdbc/src/main/java/org/apache/drill/jdbc/DrillCursor.java
@@ -110,7 +110,7 @@ public class DrillCursor implements Cursor{
return true;
}
} catch (RpcException | InterruptedException | SchemaChangeException e) {
- throw new SQLException("Failure while trying to get next result batch.", e);
+ throw new SQLException("Failure while executing query.", e);
}
}