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/06/11 05:51:47 UTC

[02/61] [abbrv] Enable View persistence, Storage Plugin and System option persistence.

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/872d0abf/protocol/src/main/java/org/apache/drill/exec/proto/beans/RecordBatchDef.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/RecordBatchDef.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RecordBatchDef.java
new file mode 100644
index 0000000..b2a69be
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RecordBatchDef.java
@@ -0,0 +1,219 @@
+/**
+ * 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 RecordBatchDef implements Externalizable, Message<RecordBatchDef>, Schema<RecordBatchDef>
+{
+
+    public static Schema<RecordBatchDef> getSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    public static RecordBatchDef getDefaultInstance()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    static final RecordBatchDef DEFAULT_INSTANCE = new RecordBatchDef();
+
+    
+    private int recordCount;
+    private List<SerializedField> field;
+    private Boolean carriesTwoByteSelectionVector;
+
+    public RecordBatchDef()
+    {
+        
+    }
+
+    // getters and setters
+
+    // recordCount
+
+    public int getRecordCount()
+    {
+        return recordCount;
+    }
+
+    public RecordBatchDef setRecordCount(int recordCount)
+    {
+        this.recordCount = recordCount;
+        return this;
+    }
+
+    // field
+
+    public List<SerializedField> getFieldList()
+    {
+        return field;
+    }
+
+    public RecordBatchDef setFieldList(List<SerializedField> field)
+    {
+        this.field = field;
+        return this;
+    }
+
+    // carriesTwoByteSelectionVector
+
+    public Boolean getCarriesTwoByteSelectionVector()
+    {
+        return carriesTwoByteSelectionVector;
+    }
+
+    public RecordBatchDef setCarriesTwoByteSelectionVector(Boolean carriesTwoByteSelectionVector)
+    {
+        this.carriesTwoByteSelectionVector = carriesTwoByteSelectionVector;
+        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<RecordBatchDef> cachedSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    // schema methods
+
+    public RecordBatchDef newMessage()
+    {
+        return new RecordBatchDef();
+    }
+
+    public Class<RecordBatchDef> typeClass()
+    {
+        return RecordBatchDef.class;
+    }
+
+    public String messageName()
+    {
+        return RecordBatchDef.class.getSimpleName();
+    }
+
+    public String messageFullName()
+    {
+        return RecordBatchDef.class.getName();
+    }
+
+    public boolean isInitialized(RecordBatchDef message)
+    {
+        return true;
+    }
+
+    public void mergeFrom(Input input, RecordBatchDef message) throws IOException
+    {
+        for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+        {
+            switch(number)
+            {
+                case 0:
+                    return;
+                case 1:
+                    message.recordCount = input.readInt32();
+                    break;
+                case 2:
+                    if(message.field == null)
+                        message.field = new ArrayList<SerializedField>();
+                    message.field.add(input.mergeObject(null, SerializedField.getSchema()));
+                    break;
+
+                case 3:
+                    message.carriesTwoByteSelectionVector = input.readBool();
+                    break;
+                default:
+                    input.handleUnknownField(number, this);
+            }   
+        }
+    }
+
+
+    public void writeTo(Output output, RecordBatchDef message) throws IOException
+    {
+        if(message.recordCount != 0)
+            output.writeInt32(1, message.recordCount, false);
+
+        if(message.field != null)
+        {
+            for(SerializedField field : message.field)
+            {
+                if(field != null)
+                    output.writeObject(2, field, SerializedField.getSchema(), true);
+            }
+        }
+
+
+        if(message.carriesTwoByteSelectionVector != null)
+            output.writeBool(3, message.carriesTwoByteSelectionVector, false);
+    }
+
+    public String getFieldName(int number)
+    {
+        switch(number)
+        {
+            case 1: return "recordCount";
+            case 2: return "field";
+            case 3: return "carriesTwoByteSelectionVector";
+            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("recordCount", 1);
+        __fieldMap.put("field", 2);
+        __fieldMap.put("carriesTwoByteSelectionVector", 3);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/872d0abf/protocol/src/main/java/org/apache/drill/exec/proto/beans/RequestResults.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/RequestResults.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RequestResults.java
new file mode 100644
index 0000000..0abf966
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RequestResults.java
@@ -0,0 +1,187 @@
+/**
+ * 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 RequestResults implements Externalizable, Message<RequestResults>, Schema<RequestResults>
+{
+
+    public static Schema<RequestResults> getSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    public static RequestResults getDefaultInstance()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    static final RequestResults DEFAULT_INSTANCE = new RequestResults();
+
+    
+    private QueryId queryId;
+    private int maximumResponses;
+
+    public RequestResults()
+    {
+        
+    }
+
+    // getters and setters
+
+    // queryId
+
+    public QueryId getQueryId()
+    {
+        return queryId;
+    }
+
+    public RequestResults setQueryId(QueryId queryId)
+    {
+        this.queryId = queryId;
+        return this;
+    }
+
+    // maximumResponses
+
+    public int getMaximumResponses()
+    {
+        return maximumResponses;
+    }
+
+    public RequestResults setMaximumResponses(int maximumResponses)
+    {
+        this.maximumResponses = maximumResponses;
+        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<RequestResults> cachedSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    // schema methods
+
+    public RequestResults newMessage()
+    {
+        return new RequestResults();
+    }
+
+    public Class<RequestResults> typeClass()
+    {
+        return RequestResults.class;
+    }
+
+    public String messageName()
+    {
+        return RequestResults.class.getSimpleName();
+    }
+
+    public String messageFullName()
+    {
+        return RequestResults.class.getName();
+    }
+
+    public boolean isInitialized(RequestResults message)
+    {
+        return true;
+    }
+
+    public void mergeFrom(Input input, RequestResults message) throws IOException
+    {
+        for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+        {
+            switch(number)
+            {
+                case 0:
+                    return;
+                case 1:
+                    message.queryId = input.mergeObject(message.queryId, QueryId.getSchema());
+                    break;
+
+                case 2:
+                    message.maximumResponses = input.readInt32();
+                    break;
+                default:
+                    input.handleUnknownField(number, this);
+            }   
+        }
+    }
+
+
+    public void writeTo(Output output, RequestResults message) throws IOException
+    {
+        if(message.queryId != null)
+             output.writeObject(1, message.queryId, QueryId.getSchema(), false);
+
+
+        if(message.maximumResponses != 0)
+            output.writeInt32(2, message.maximumResponses, false);
+    }
+
+    public String getFieldName(int number)
+    {
+        switch(number)
+        {
+            case 1: return "queryId";
+            case 2: return "maximumResponses";
+            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("queryId", 1);
+        __fieldMap.put("maximumResponses", 2);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/872d0abf/protocol/src/main/java/org/apache/drill/exec/proto/beans/Roles.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/Roles.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/Roles.java
new file mode 100644
index 0000000..e24f516
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/Roles.java
@@ -0,0 +1,256 @@
+/**
+ * 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 Roles implements Externalizable, Message<Roles>, Schema<Roles>
+{
+
+    public static Schema<Roles> getSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    public static Roles getDefaultInstance()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    static final Roles DEFAULT_INSTANCE = new Roles();
+
+    static final Boolean DEFAULT_SQL_QUERY = new Boolean(true);
+    static final Boolean DEFAULT_LOGICAL_PLAN = new Boolean(true);
+    static final Boolean DEFAULT_PHYSICAL_PLAN = new Boolean(true);
+    static final Boolean DEFAULT_JAVA_EXECUTOR = new Boolean(true);
+    static final Boolean DEFAULT_DISTRIBUTED_CACHE = new Boolean(true);
+    
+    private Boolean sqlQuery = DEFAULT_SQL_QUERY;
+    private Boolean logicalPlan = DEFAULT_LOGICAL_PLAN;
+    private Boolean physicalPlan = DEFAULT_PHYSICAL_PLAN;
+    private Boolean javaExecutor = DEFAULT_JAVA_EXECUTOR;
+    private Boolean distributedCache = DEFAULT_DISTRIBUTED_CACHE;
+
+    public Roles()
+    {
+        
+    }
+
+    // getters and setters
+
+    // sqlQuery
+
+    public Boolean getSqlQuery()
+    {
+        return sqlQuery;
+    }
+
+    public Roles setSqlQuery(Boolean sqlQuery)
+    {
+        this.sqlQuery = sqlQuery;
+        return this;
+    }
+
+    // logicalPlan
+
+    public Boolean getLogicalPlan()
+    {
+        return logicalPlan;
+    }
+
+    public Roles setLogicalPlan(Boolean logicalPlan)
+    {
+        this.logicalPlan = logicalPlan;
+        return this;
+    }
+
+    // physicalPlan
+
+    public Boolean getPhysicalPlan()
+    {
+        return physicalPlan;
+    }
+
+    public Roles setPhysicalPlan(Boolean physicalPlan)
+    {
+        this.physicalPlan = physicalPlan;
+        return this;
+    }
+
+    // javaExecutor
+
+    public Boolean getJavaExecutor()
+    {
+        return javaExecutor;
+    }
+
+    public Roles setJavaExecutor(Boolean javaExecutor)
+    {
+        this.javaExecutor = javaExecutor;
+        return this;
+    }
+
+    // distributedCache
+
+    public Boolean getDistributedCache()
+    {
+        return distributedCache;
+    }
+
+    public Roles setDistributedCache(Boolean distributedCache)
+    {
+        this.distributedCache = distributedCache;
+        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<Roles> cachedSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    // schema methods
+
+    public Roles newMessage()
+    {
+        return new Roles();
+    }
+
+    public Class<Roles> typeClass()
+    {
+        return Roles.class;
+    }
+
+    public String messageName()
+    {
+        return Roles.class.getSimpleName();
+    }
+
+    public String messageFullName()
+    {
+        return Roles.class.getName();
+    }
+
+    public boolean isInitialized(Roles message)
+    {
+        return true;
+    }
+
+    public void mergeFrom(Input input, Roles message) throws IOException
+    {
+        for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+        {
+            switch(number)
+            {
+                case 0:
+                    return;
+                case 1:
+                    message.sqlQuery = input.readBool();
+                    break;
+                case 2:
+                    message.logicalPlan = input.readBool();
+                    break;
+                case 3:
+                    message.physicalPlan = input.readBool();
+                    break;
+                case 4:
+                    message.javaExecutor = input.readBool();
+                    break;
+                case 5:
+                    message.distributedCache = input.readBool();
+                    break;
+                default:
+                    input.handleUnknownField(number, this);
+            }   
+        }
+    }
+
+
+    public void writeTo(Output output, Roles message) throws IOException
+    {
+        if(message.sqlQuery != null && message.sqlQuery != DEFAULT_SQL_QUERY)
+            output.writeBool(1, message.sqlQuery, false);
+
+        if(message.logicalPlan != null && message.logicalPlan != DEFAULT_LOGICAL_PLAN)
+            output.writeBool(2, message.logicalPlan, false);
+
+        if(message.physicalPlan != null && message.physicalPlan != DEFAULT_PHYSICAL_PLAN)
+            output.writeBool(3, message.physicalPlan, false);
+
+        if(message.javaExecutor != null && message.javaExecutor != DEFAULT_JAVA_EXECUTOR)
+            output.writeBool(4, message.javaExecutor, false);
+
+        if(message.distributedCache != null && message.distributedCache != DEFAULT_DISTRIBUTED_CACHE)
+            output.writeBool(5, message.distributedCache, false);
+    }
+
+    public String getFieldName(int number)
+    {
+        switch(number)
+        {
+            case 1: return "sqlQuery";
+            case 2: return "logicalPlan";
+            case 3: return "physicalPlan";
+            case 4: return "javaExecutor";
+            case 5: return "distributedCache";
+            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("sqlQuery", 1);
+        __fieldMap.put("logicalPlan", 2);
+        __fieldMap.put("physicalPlan", 3);
+        __fieldMap.put("javaExecutor", 4);
+        __fieldMap.put("distributedCache", 5);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/872d0abf/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcChannel.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcChannel.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcChannel.java
new file mode 100644
index 0000000..9c32dd7
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcChannel.java
@@ -0,0 +1,51 @@
+/**
+ * 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;
+
+public enum RpcChannel implements com.dyuproject.protostuff.EnumLite<RpcChannel>
+{
+    BIT_CONTROL(0),
+    BIT_DATA(1),
+    USER(2);
+    
+    public final int number;
+    
+    private RpcChannel (int number)
+    {
+        this.number = number;
+    }
+    
+    public int getNumber()
+    {
+        return number;
+    }
+    
+    public static RpcChannel valueOf(int number)
+    {
+        switch(number) 
+        {
+            case 0: return BIT_CONTROL;
+            case 1: return BIT_DATA;
+            case 2: return USER;
+            default: return null;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/872d0abf/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcFailure.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcFailure.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcFailure.java
new file mode 100644
index 0000000..84bb1ca
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcFailure.java
@@ -0,0 +1,229 @@
+/**
+ * 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 RpcFailure implements Externalizable, Message<RpcFailure>, Schema<RpcFailure>
+{
+
+    public static Schema<RpcFailure> getSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    public static RpcFailure getDefaultInstance()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    static final RpcFailure DEFAULT_INSTANCE = new RpcFailure();
+
+    
+    private long errorId;
+    private int errorCode;
+    private String shortError;
+    private String longError;
+
+    public RpcFailure()
+    {
+        
+    }
+
+    // getters and setters
+
+    // errorId
+
+    public long getErrorId()
+    {
+        return errorId;
+    }
+
+    public RpcFailure setErrorId(long errorId)
+    {
+        this.errorId = errorId;
+        return this;
+    }
+
+    // errorCode
+
+    public int getErrorCode()
+    {
+        return errorCode;
+    }
+
+    public RpcFailure setErrorCode(int errorCode)
+    {
+        this.errorCode = errorCode;
+        return this;
+    }
+
+    // shortError
+
+    public String getShortError()
+    {
+        return shortError;
+    }
+
+    public RpcFailure setShortError(String shortError)
+    {
+        this.shortError = shortError;
+        return this;
+    }
+
+    // longError
+
+    public String getLongError()
+    {
+        return longError;
+    }
+
+    public RpcFailure setLongError(String longError)
+    {
+        this.longError = longError;
+        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<RpcFailure> cachedSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    // schema methods
+
+    public RpcFailure newMessage()
+    {
+        return new RpcFailure();
+    }
+
+    public Class<RpcFailure> typeClass()
+    {
+        return RpcFailure.class;
+    }
+
+    public String messageName()
+    {
+        return RpcFailure.class.getSimpleName();
+    }
+
+    public String messageFullName()
+    {
+        return RpcFailure.class.getName();
+    }
+
+    public boolean isInitialized(RpcFailure message)
+    {
+        return true;
+    }
+
+    public void mergeFrom(Input input, RpcFailure message) throws IOException
+    {
+        for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+        {
+            switch(number)
+            {
+                case 0:
+                    return;
+                case 1:
+                    message.errorId = input.readInt64();
+                    break;
+                case 2:
+                    message.errorCode = input.readInt32();
+                    break;
+                case 3:
+                    message.shortError = input.readString();
+                    break;
+                case 4:
+                    message.longError = input.readString();
+                    break;
+                default:
+                    input.handleUnknownField(number, this);
+            }   
+        }
+    }
+
+
+    public void writeTo(Output output, RpcFailure message) throws IOException
+    {
+        if(message.errorId != 0)
+            output.writeInt64(1, message.errorId, false);
+
+        if(message.errorCode != 0)
+            output.writeInt32(2, message.errorCode, false);
+
+        if(message.shortError != null)
+            output.writeString(3, message.shortError, false);
+
+        if(message.longError != null)
+            output.writeString(4, message.longError, false);
+    }
+
+    public 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 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("errorId", 1);
+        __fieldMap.put("errorCode", 2);
+        __fieldMap.put("shortError", 3);
+        __fieldMap.put("longError", 4);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/872d0abf/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcHeader.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcHeader.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcHeader.java
new file mode 100644
index 0000000..d87a777
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcHeader.java
@@ -0,0 +1,207 @@
+/**
+ * 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 RpcHeader implements Externalizable, Message<RpcHeader>, Schema<RpcHeader>
+{
+
+    public static Schema<RpcHeader> getSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    public static RpcHeader getDefaultInstance()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    static final RpcHeader DEFAULT_INSTANCE = new RpcHeader();
+
+    
+    private RpcMode mode;
+    private int coordinationId;
+    private int rpcType;
+
+    public RpcHeader()
+    {
+        
+    }
+
+    // getters and setters
+
+    // mode
+
+    public RpcMode getMode()
+    {
+        return mode == null ? RpcMode.REQUEST : mode;
+    }
+
+    public RpcHeader setMode(RpcMode mode)
+    {
+        this.mode = mode;
+        return this;
+    }
+
+    // coordinationId
+
+    public int getCoordinationId()
+    {
+        return coordinationId;
+    }
+
+    public RpcHeader setCoordinationId(int coordinationId)
+    {
+        this.coordinationId = coordinationId;
+        return this;
+    }
+
+    // rpcType
+
+    public int getRpcType()
+    {
+        return rpcType;
+    }
+
+    public RpcHeader setRpcType(int rpcType)
+    {
+        this.rpcType = rpcType;
+        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<RpcHeader> cachedSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    // schema methods
+
+    public RpcHeader newMessage()
+    {
+        return new RpcHeader();
+    }
+
+    public Class<RpcHeader> typeClass()
+    {
+        return RpcHeader.class;
+    }
+
+    public String messageName()
+    {
+        return RpcHeader.class.getSimpleName();
+    }
+
+    public String messageFullName()
+    {
+        return RpcHeader.class.getName();
+    }
+
+    public boolean isInitialized(RpcHeader message)
+    {
+        return true;
+    }
+
+    public void mergeFrom(Input input, RpcHeader message) throws IOException
+    {
+        for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+        {
+            switch(number)
+            {
+                case 0:
+                    return;
+                case 1:
+                    message.mode = RpcMode.valueOf(input.readEnum());
+                    break;
+                case 2:
+                    message.coordinationId = input.readInt32();
+                    break;
+                case 3:
+                    message.rpcType = input.readInt32();
+                    break;
+                default:
+                    input.handleUnknownField(number, this);
+            }   
+        }
+    }
+
+
+    public void writeTo(Output output, RpcHeader message) throws IOException
+    {
+        if(message.mode != null)
+             output.writeEnum(1, message.mode.number, false);
+
+        if(message.coordinationId != 0)
+            output.writeInt32(2, message.coordinationId, false);
+
+        if(message.rpcType != 0)
+            output.writeInt32(3, message.rpcType, false);
+    }
+
+    public String getFieldName(int number)
+    {
+        switch(number)
+        {
+            case 1: return "mode";
+            case 2: return "coordinationId";
+            case 3: return "rpcType";
+            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("mode", 1);
+        __fieldMap.put("coordinationId", 2);
+        __fieldMap.put("rpcType", 3);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/872d0abf/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcMode.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcMode.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcMode.java
new file mode 100644
index 0000000..df71855
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcMode.java
@@ -0,0 +1,51 @@
+/**
+ * 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;
+
+public enum RpcMode implements com.dyuproject.protostuff.EnumLite<RpcMode>
+{
+    REQUEST(0),
+    RESPONSE(1),
+    RESPONSE_FAILURE(2);
+    
+    public final int number;
+    
+    private RpcMode (int number)
+    {
+        this.number = number;
+    }
+    
+    public int getNumber()
+    {
+        return number;
+    }
+    
+    public static RpcMode valueOf(int number)
+    {
+        switch(number) 
+        {
+            case 0: return REQUEST;
+            case 1: return RESPONSE;
+            case 2: return RESPONSE_FAILURE;
+            default: return null;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/872d0abf/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcType.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcType.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcType.java
new file mode 100644
index 0000000..3f1f9fd
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RpcType.java
@@ -0,0 +1,65 @@
+/**
+ * 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;
+
+public enum RpcType implements com.dyuproject.protostuff.EnumLite<RpcType>
+{
+    HANDSHAKE(0),
+    ACK(1),
+    GOODBYE(2),
+    RUN_QUERY(3),
+    CANCEL_QUERY(4),
+    REQUEST_RESULTS(5),
+    QUERY_RESULT(6),
+    QUERY_HANDLE(7),
+    REQ_META_FUNCTIONS(8),
+    RESP_FUNCTION_LIST(9);
+    
+    public final int number;
+    
+    private RpcType (int number)
+    {
+        this.number = number;
+    }
+    
+    public int getNumber()
+    {
+        return number;
+    }
+    
+    public static RpcType valueOf(int number)
+    {
+        switch(number) 
+        {
+            case 0: return HANDSHAKE;
+            case 1: return ACK;
+            case 2: return GOODBYE;
+            case 3: return RUN_QUERY;
+            case 4: return CANCEL_QUERY;
+            case 5: return REQUEST_RESULTS;
+            case 6: return QUERY_RESULT;
+            case 7: return QUERY_HANDLE;
+            case 8: return REQ_META_FUNCTIONS;
+            case 9: return RESP_FUNCTION_LIST;
+            default: return null;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/872d0abf/protocol/src/main/java/org/apache/drill/exec/proto/beans/RunQuery.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/RunQuery.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RunQuery.java
new file mode 100644
index 0000000..2c3f0f5
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/RunQuery.java
@@ -0,0 +1,207 @@
+/**
+ * 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 RunQuery implements Externalizable, Message<RunQuery>, Schema<RunQuery>
+{
+
+    public static Schema<RunQuery> getSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    public static RunQuery getDefaultInstance()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    static final RunQuery DEFAULT_INSTANCE = new RunQuery();
+
+    
+    private QueryResultsMode resultsMode;
+    private QueryType type;
+    private String plan;
+
+    public RunQuery()
+    {
+        
+    }
+
+    // getters and setters
+
+    // resultsMode
+
+    public QueryResultsMode getResultsMode()
+    {
+        return resultsMode == null ? QueryResultsMode.STREAM_FULL : resultsMode;
+    }
+
+    public RunQuery setResultsMode(QueryResultsMode resultsMode)
+    {
+        this.resultsMode = resultsMode;
+        return this;
+    }
+
+    // type
+
+    public QueryType getType()
+    {
+        return type == null ? QueryType.SQL : type;
+    }
+
+    public RunQuery setType(QueryType type)
+    {
+        this.type = type;
+        return this;
+    }
+
+    // plan
+
+    public String getPlan()
+    {
+        return plan;
+    }
+
+    public RunQuery setPlan(String plan)
+    {
+        this.plan = plan;
+        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<RunQuery> cachedSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    // schema methods
+
+    public RunQuery newMessage()
+    {
+        return new RunQuery();
+    }
+
+    public Class<RunQuery> typeClass()
+    {
+        return RunQuery.class;
+    }
+
+    public String messageName()
+    {
+        return RunQuery.class.getSimpleName();
+    }
+
+    public String messageFullName()
+    {
+        return RunQuery.class.getName();
+    }
+
+    public boolean isInitialized(RunQuery message)
+    {
+        return true;
+    }
+
+    public void mergeFrom(Input input, RunQuery message) throws IOException
+    {
+        for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+        {
+            switch(number)
+            {
+                case 0:
+                    return;
+                case 1:
+                    message.resultsMode = QueryResultsMode.valueOf(input.readEnum());
+                    break;
+                case 2:
+                    message.type = QueryType.valueOf(input.readEnum());
+                    break;
+                case 3:
+                    message.plan = input.readString();
+                    break;
+                default:
+                    input.handleUnknownField(number, this);
+            }   
+        }
+    }
+
+
+    public void writeTo(Output output, RunQuery message) throws IOException
+    {
+        if(message.resultsMode != null)
+             output.writeEnum(1, message.resultsMode.number, false);
+
+        if(message.type != null)
+             output.writeEnum(2, message.type.number, false);
+
+        if(message.plan != null)
+            output.writeString(3, message.plan, false);
+    }
+
+    public String getFieldName(int number)
+    {
+        switch(number)
+        {
+            case 1: return "resultsMode";
+            case 2: return "type";
+            case 3: return "plan";
+            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("resultsMode", 1);
+        __fieldMap.put("type", 2);
+        __fieldMap.put("plan", 3);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/872d0abf/protocol/src/main/java/org/apache/drill/exec/proto/beans/SerializedField.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/SerializedField.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/SerializedField.java
new file mode 100644
index 0000000..699097a
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/SerializedField.java
@@ -0,0 +1,311 @@
+/**
+ * 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 SerializedField implements Externalizable, Message<SerializedField>, Schema<SerializedField>
+{
+
+    public static Schema<SerializedField> getSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    public static SerializedField getDefaultInstance()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    static final SerializedField DEFAULT_INSTANCE = new SerializedField();
+
+    
+    private org.apache.drill.common.types.MajorType majorType;
+    private NamePart namePart;
+    private List<SerializedField> child;
+    private int valueCount;
+    private int varByteLength;
+    private int groupCount;
+    private int bufferLength;
+
+    public SerializedField()
+    {
+        
+    }
+
+    // getters and setters
+
+    // majorType
+
+    public org.apache.drill.common.types.MajorType getMajorType()
+    {
+        return majorType;
+    }
+
+    public SerializedField setMajorType(org.apache.drill.common.types.MajorType majorType)
+    {
+        this.majorType = majorType;
+        return this;
+    }
+
+    // namePart
+
+    public NamePart getNamePart()
+    {
+        return namePart;
+    }
+
+    public SerializedField setNamePart(NamePart namePart)
+    {
+        this.namePart = namePart;
+        return this;
+    }
+
+    // child
+
+    public List<SerializedField> getChildList()
+    {
+        return child;
+    }
+
+    public SerializedField setChildList(List<SerializedField> child)
+    {
+        this.child = child;
+        return this;
+    }
+
+    // valueCount
+
+    public int getValueCount()
+    {
+        return valueCount;
+    }
+
+    public SerializedField setValueCount(int valueCount)
+    {
+        this.valueCount = valueCount;
+        return this;
+    }
+
+    // varByteLength
+
+    public int getVarByteLength()
+    {
+        return varByteLength;
+    }
+
+    public SerializedField setVarByteLength(int varByteLength)
+    {
+        this.varByteLength = varByteLength;
+        return this;
+    }
+
+    // groupCount
+
+    public int getGroupCount()
+    {
+        return groupCount;
+    }
+
+    public SerializedField setGroupCount(int groupCount)
+    {
+        this.groupCount = groupCount;
+        return this;
+    }
+
+    // bufferLength
+
+    public int getBufferLength()
+    {
+        return bufferLength;
+    }
+
+    public SerializedField setBufferLength(int bufferLength)
+    {
+        this.bufferLength = bufferLength;
+        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<SerializedField> cachedSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    // schema methods
+
+    public SerializedField newMessage()
+    {
+        return new SerializedField();
+    }
+
+    public Class<SerializedField> typeClass()
+    {
+        return SerializedField.class;
+    }
+
+    public String messageName()
+    {
+        return SerializedField.class.getSimpleName();
+    }
+
+    public String messageFullName()
+    {
+        return SerializedField.class.getName();
+    }
+
+    public boolean isInitialized(SerializedField message)
+    {
+        return true;
+    }
+
+    public void mergeFrom(Input input, SerializedField message) throws IOException
+    {
+        for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+        {
+            switch(number)
+            {
+                case 0:
+                    return;
+                case 1:
+                    message.majorType = input.mergeObject(message.majorType, org.apache.drill.common.types.MajorType.getSchema());
+                    break;
+
+                case 2:
+                    message.namePart = input.mergeObject(message.namePart, NamePart.getSchema());
+                    break;
+
+                case 3:
+                    if(message.child == null)
+                        message.child = new ArrayList<SerializedField>();
+                    message.child.add(input.mergeObject(null, SerializedField.getSchema()));
+                    break;
+
+                case 4:
+                    message.valueCount = input.readInt32();
+                    break;
+                case 5:
+                    message.varByteLength = input.readInt32();
+                    break;
+                case 6:
+                    message.groupCount = input.readInt32();
+                    break;
+                case 7:
+                    message.bufferLength = input.readInt32();
+                    break;
+                default:
+                    input.handleUnknownField(number, this);
+            }   
+        }
+    }
+
+
+    public void writeTo(Output output, SerializedField message) throws IOException
+    {
+        if(message.majorType != null)
+             output.writeObject(1, message.majorType, org.apache.drill.common.types.MajorType.getSchema(), false);
+
+
+        if(message.namePart != null)
+             output.writeObject(2, message.namePart, NamePart.getSchema(), false);
+
+
+        if(message.child != null)
+        {
+            for(SerializedField child : message.child)
+            {
+                if(child != null)
+                    output.writeObject(3, child, SerializedField.getSchema(), true);
+            }
+        }
+
+
+        if(message.valueCount != 0)
+            output.writeInt32(4, message.valueCount, false);
+
+        if(message.varByteLength != 0)
+            output.writeInt32(5, message.varByteLength, false);
+
+        if(message.groupCount != 0)
+            output.writeInt32(6, message.groupCount, false);
+
+        if(message.bufferLength != 0)
+            output.writeInt32(7, message.bufferLength, false);
+    }
+
+    public String getFieldName(int number)
+    {
+        switch(number)
+        {
+            case 1: return "majorType";
+            case 2: return "namePart";
+            case 3: return "child";
+            case 4: return "valueCount";
+            case 5: return "varByteLength";
+            case 6: return "groupCount";
+            case 7: return "bufferLength";
+            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("majorType", 1);
+        __fieldMap.put("namePart", 2);
+        __fieldMap.put("child", 3);
+        __fieldMap.put("valueCount", 4);
+        __fieldMap.put("varByteLength", 5);
+        __fieldMap.put("groupCount", 6);
+        __fieldMap.put("bufferLength", 7);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/872d0abf/protocol/src/main/java/org/apache/drill/exec/proto/beans/StreamProfile.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/StreamProfile.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/StreamProfile.java
new file mode 100644
index 0000000..2480768
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/StreamProfile.java
@@ -0,0 +1,207 @@
+/**
+ * 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 StreamProfile implements Externalizable, Message<StreamProfile>, Schema<StreamProfile>
+{
+
+    public static Schema<StreamProfile> getSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    public static StreamProfile getDefaultInstance()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    static final StreamProfile DEFAULT_INSTANCE = new StreamProfile();
+
+    
+    private long records;
+    private long batches;
+    private long schemas;
+
+    public StreamProfile()
+    {
+        
+    }
+
+    // getters and setters
+
+    // records
+
+    public long getRecords()
+    {
+        return records;
+    }
+
+    public StreamProfile setRecords(long records)
+    {
+        this.records = records;
+        return this;
+    }
+
+    // batches
+
+    public long getBatches()
+    {
+        return batches;
+    }
+
+    public StreamProfile setBatches(long batches)
+    {
+        this.batches = batches;
+        return this;
+    }
+
+    // schemas
+
+    public long getSchemas()
+    {
+        return schemas;
+    }
+
+    public StreamProfile setSchemas(long schemas)
+    {
+        this.schemas = schemas;
+        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<StreamProfile> cachedSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    // schema methods
+
+    public StreamProfile newMessage()
+    {
+        return new StreamProfile();
+    }
+
+    public Class<StreamProfile> typeClass()
+    {
+        return StreamProfile.class;
+    }
+
+    public String messageName()
+    {
+        return StreamProfile.class.getSimpleName();
+    }
+
+    public String messageFullName()
+    {
+        return StreamProfile.class.getName();
+    }
+
+    public boolean isInitialized(StreamProfile message)
+    {
+        return true;
+    }
+
+    public void mergeFrom(Input input, StreamProfile message) throws IOException
+    {
+        for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+        {
+            switch(number)
+            {
+                case 0:
+                    return;
+                case 1:
+                    message.records = input.readInt64();
+                    break;
+                case 2:
+                    message.batches = input.readInt64();
+                    break;
+                case 3:
+                    message.schemas = input.readInt64();
+                    break;
+                default:
+                    input.handleUnknownField(number, this);
+            }   
+        }
+    }
+
+
+    public void writeTo(Output output, StreamProfile message) throws IOException
+    {
+        if(message.records != 0)
+            output.writeInt64(1, message.records, false);
+
+        if(message.batches != 0)
+            output.writeInt64(2, message.batches, false);
+
+        if(message.schemas != 0)
+            output.writeInt64(3, message.schemas, false);
+    }
+
+    public String getFieldName(int number)
+    {
+        switch(number)
+        {
+            case 1: return "records";
+            case 2: return "batches";
+            case 3: return "schemas";
+            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("records", 1);
+        __fieldMap.put("batches", 2);
+        __fieldMap.put("schemas", 3);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/872d0abf/protocol/src/main/java/org/apache/drill/exec/proto/beans/UserCredentials.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/UserCredentials.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/UserCredentials.java
new file mode 100644
index 0000000..11b42a3
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/UserCredentials.java
@@ -0,0 +1,163 @@
+/**
+ * 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 UserCredentials implements Externalizable, Message<UserCredentials>, Schema<UserCredentials>
+{
+
+    public static Schema<UserCredentials> getSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    public static UserCredentials getDefaultInstance()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    static final UserCredentials DEFAULT_INSTANCE = new UserCredentials();
+
+    
+    private String userName;
+
+    public UserCredentials()
+    {
+        
+    }
+
+    // getters and setters
+
+    // userName
+
+    public String getUserName()
+    {
+        return userName;
+    }
+
+    public UserCredentials setUserName(String userName)
+    {
+        this.userName = userName;
+        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<UserCredentials> cachedSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    // schema methods
+
+    public UserCredentials newMessage()
+    {
+        return new UserCredentials();
+    }
+
+    public Class<UserCredentials> typeClass()
+    {
+        return UserCredentials.class;
+    }
+
+    public String messageName()
+    {
+        return UserCredentials.class.getSimpleName();
+    }
+
+    public String messageFullName()
+    {
+        return UserCredentials.class.getName();
+    }
+
+    public boolean isInitialized(UserCredentials message)
+    {
+        return true;
+    }
+
+    public void mergeFrom(Input input, UserCredentials message) throws IOException
+    {
+        for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+        {
+            switch(number)
+            {
+                case 0:
+                    return;
+                case 1:
+                    message.userName = input.readString();
+                    break;
+                default:
+                    input.handleUnknownField(number, this);
+            }   
+        }
+    }
+
+
+    public void writeTo(Output output, UserCredentials message) throws IOException
+    {
+        if(message.userName != null)
+            output.writeString(1, message.userName, false);
+    }
+
+    public String getFieldName(int number)
+    {
+        switch(number)
+        {
+            case 1: return "userName";
+            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("userName", 1);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/872d0abf/protocol/src/main/java/org/apache/drill/exec/proto/beans/UserProperties.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/UserProperties.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/UserProperties.java
new file mode 100644
index 0000000..ad6bd3f
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/UserProperties.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 UserProperties implements Externalizable, Message<UserProperties>, Schema<UserProperties>
+{
+
+    public static Schema<UserProperties> getSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    public static UserProperties getDefaultInstance()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    static final UserProperties DEFAULT_INSTANCE = new UserProperties();
+
+    
+    private List<Property> properties;
+
+    public UserProperties()
+    {
+        
+    }
+
+    // getters and setters
+
+    // properties
+
+    public List<Property> getPropertiesList()
+    {
+        return properties;
+    }
+
+    public UserProperties setPropertiesList(List<Property> properties)
+    {
+        this.properties = properties;
+        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<UserProperties> cachedSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    // schema methods
+
+    public UserProperties newMessage()
+    {
+        return new UserProperties();
+    }
+
+    public Class<UserProperties> typeClass()
+    {
+        return UserProperties.class;
+    }
+
+    public String messageName()
+    {
+        return UserProperties.class.getSimpleName();
+    }
+
+    public String messageFullName()
+    {
+        return UserProperties.class.getName();
+    }
+
+    public boolean isInitialized(UserProperties message)
+    {
+        return true;
+    }
+
+    public void mergeFrom(Input input, UserProperties message) throws IOException
+    {
+        for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+        {
+            switch(number)
+            {
+                case 0:
+                    return;
+                case 1:
+                    if(message.properties == null)
+                        message.properties = new ArrayList<Property>();
+                    message.properties.add(input.mergeObject(null, Property.getSchema()));
+                    break;
+
+                default:
+                    input.handleUnknownField(number, this);
+            }   
+        }
+    }
+
+
+    public void writeTo(Output output, UserProperties message) throws IOException
+    {
+        if(message.properties != null)
+        {
+            for(Property properties : message.properties)
+            {
+                if(properties != null)
+                    output.writeObject(1, properties, Property.getSchema(), true);
+            }
+        }
+
+    }
+
+    public String getFieldName(int number)
+    {
+        switch(number)
+        {
+            case 1: return "properties";
+            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("properties", 1);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/872d0abf/protocol/src/main/java/org/apache/drill/exec/proto/beans/UserToBitHandshake.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/UserToBitHandshake.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/UserToBitHandshake.java
new file mode 100644
index 0000000..70235b1
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/UserToBitHandshake.java
@@ -0,0 +1,255 @@
+/**
+ * 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 UserToBitHandshake implements Externalizable, Message<UserToBitHandshake>, Schema<UserToBitHandshake>
+{
+
+    public static Schema<UserToBitHandshake> getSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    public static UserToBitHandshake getDefaultInstance()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    static final UserToBitHandshake DEFAULT_INSTANCE = new UserToBitHandshake();
+
+    
+    private RpcChannel channel;
+    private Boolean supportListening;
+    private int rpcVersion;
+    private UserCredentials credentials;
+    private UserProperties properties;
+
+    public UserToBitHandshake()
+    {
+        
+    }
+
+    // getters and setters
+
+    // channel
+
+    public RpcChannel getChannel()
+    {
+        return channel == null ? RpcChannel.USER : channel;
+    }
+
+    public UserToBitHandshake setChannel(RpcChannel channel)
+    {
+        this.channel = channel;
+        return this;
+    }
+
+    // supportListening
+
+    public Boolean getSupportListening()
+    {
+        return supportListening;
+    }
+
+    public UserToBitHandshake setSupportListening(Boolean supportListening)
+    {
+        this.supportListening = supportListening;
+        return this;
+    }
+
+    // rpcVersion
+
+    public int getRpcVersion()
+    {
+        return rpcVersion;
+    }
+
+    public UserToBitHandshake setRpcVersion(int rpcVersion)
+    {
+        this.rpcVersion = rpcVersion;
+        return this;
+    }
+
+    // credentials
+
+    public UserCredentials getCredentials()
+    {
+        return credentials;
+    }
+
+    public UserToBitHandshake setCredentials(UserCredentials credentials)
+    {
+        this.credentials = credentials;
+        return this;
+    }
+
+    // properties
+
+    public UserProperties getProperties()
+    {
+        return properties;
+    }
+
+    public UserToBitHandshake setProperties(UserProperties properties)
+    {
+        this.properties = properties;
+        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<UserToBitHandshake> cachedSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    // schema methods
+
+    public UserToBitHandshake newMessage()
+    {
+        return new UserToBitHandshake();
+    }
+
+    public Class<UserToBitHandshake> typeClass()
+    {
+        return UserToBitHandshake.class;
+    }
+
+    public String messageName()
+    {
+        return UserToBitHandshake.class.getSimpleName();
+    }
+
+    public String messageFullName()
+    {
+        return UserToBitHandshake.class.getName();
+    }
+
+    public boolean isInitialized(UserToBitHandshake message)
+    {
+        return true;
+    }
+
+    public void mergeFrom(Input input, UserToBitHandshake message) throws IOException
+    {
+        for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+        {
+            switch(number)
+            {
+                case 0:
+                    return;
+                case 1:
+                    message.channel = RpcChannel.valueOf(input.readEnum());
+                    break;
+                case 2:
+                    message.supportListening = input.readBool();
+                    break;
+                case 3:
+                    message.rpcVersion = input.readInt32();
+                    break;
+                case 4:
+                    message.credentials = input.mergeObject(message.credentials, UserCredentials.getSchema());
+                    break;
+
+                case 5:
+                    message.properties = input.mergeObject(message.properties, UserProperties.getSchema());
+                    break;
+
+                default:
+                    input.handleUnknownField(number, this);
+            }   
+        }
+    }
+
+
+    public void writeTo(Output output, UserToBitHandshake message) throws IOException
+    {
+        if(message.channel != null)
+             output.writeEnum(1, message.channel.number, false);
+
+        if(message.supportListening != null)
+            output.writeBool(2, message.supportListening, false);
+
+        if(message.rpcVersion != 0)
+            output.writeInt32(3, message.rpcVersion, false);
+
+        if(message.credentials != null)
+             output.writeObject(4, message.credentials, UserCredentials.getSchema(), false);
+
+
+        if(message.properties != null)
+             output.writeObject(5, message.properties, UserProperties.getSchema(), false);
+
+    }
+
+    public String getFieldName(int number)
+    {
+        switch(number)
+        {
+            case 1: return "channel";
+            case 2: return "supportListening";
+            case 3: return "rpcVersion";
+            case 4: return "credentials";
+            case 5: return "properties";
+            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("channel", 1);
+        __fieldMap.put("supportListening", 2);
+        __fieldMap.put("rpcVersion", 3);
+        __fieldMap.put("credentials", 4);
+        __fieldMap.put("properties", 5);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/872d0abf/protocol/src/main/java/org/apache/drill/exec/proto/beans/ValueMode.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/ValueMode.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/ValueMode.java
new file mode 100644
index 0000000..0c7e202
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/ValueMode.java
@@ -0,0 +1,51 @@
+/**
+ * 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;
+
+public enum ValueMode implements com.dyuproject.protostuff.EnumLite<ValueMode>
+{
+    VALUE_VECTOR(0),
+    RLE(1),
+    DICT(2);
+    
+    public final int number;
+    
+    private ValueMode (int number)
+    {
+        this.number = number;
+    }
+    
+    public int getNumber()
+    {
+        return number;
+    }
+    
+    public static ValueMode valueOf(int number)
+    {
+        switch(number) 
+        {
+            case 0: return VALUE_VECTOR;
+            case 1: return RLE;
+            case 2: return DICT;
+            default: return null;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/872d0abf/protocol/src/main/java/org/apache/drill/exec/proto/beans/ViewPointer.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/ViewPointer.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/ViewPointer.java
new file mode 100644
index 0000000..2f583fa
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/ViewPointer.java
@@ -0,0 +1,185 @@
+/**
+ * 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 ViewPointer implements Externalizable, Message<ViewPointer>, Schema<ViewPointer>
+{
+
+    public static Schema<ViewPointer> getSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    public static ViewPointer getDefaultInstance()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    static final ViewPointer DEFAULT_INSTANCE = new ViewPointer();
+
+    
+    private String name;
+    private String path;
+
+    public ViewPointer()
+    {
+        
+    }
+
+    // getters and setters
+
+    // name
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public ViewPointer setName(String name)
+    {
+        this.name = name;
+        return this;
+    }
+
+    // path
+
+    public String getPath()
+    {
+        return path;
+    }
+
+    public ViewPointer setPath(String path)
+    {
+        this.path = path;
+        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<ViewPointer> cachedSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    // schema methods
+
+    public ViewPointer newMessage()
+    {
+        return new ViewPointer();
+    }
+
+    public Class<ViewPointer> typeClass()
+    {
+        return ViewPointer.class;
+    }
+
+    public String messageName()
+    {
+        return ViewPointer.class.getSimpleName();
+    }
+
+    public String messageFullName()
+    {
+        return ViewPointer.class.getName();
+    }
+
+    public boolean isInitialized(ViewPointer message)
+    {
+        return true;
+    }
+
+    public void mergeFrom(Input input, ViewPointer message) throws IOException
+    {
+        for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+        {
+            switch(number)
+            {
+                case 0:
+                    return;
+                case 1:
+                    message.name = input.readString();
+                    break;
+                case 2:
+                    message.path = input.readString();
+                    break;
+                default:
+                    input.handleUnknownField(number, this);
+            }   
+        }
+    }
+
+
+    public void writeTo(Output output, ViewPointer message) throws IOException
+    {
+        if(message.name != null)
+            output.writeString(1, message.name, false);
+
+        if(message.path != null)
+            output.writeString(2, message.path, false);
+    }
+
+    public String getFieldName(int number)
+    {
+        switch(number)
+        {
+            case 1: return "name";
+            case 2: return "path";
+            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("name", 1);
+        __fieldMap.put("path", 2);
+    }
+    
+}