drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [01/12] incubator-drill git commit: DRILL-1684, DRILL-1517, DRILL-1350: Profile and cancellation updates - Remove any storage of persisted profiles. - Store a separate query info object for active queries. - Update cancellation and running profile loadin
Date Thu, 20 Nov 2014 16:44:37 GMT
Repository: incubator-drill
Updated Branches:
  refs/heads/master 90c12c8ce -> fc58c693a


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/2eb72a7c/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryStatus.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryStatus.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryStatus.java
index 06c8e28..8da0ffb 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryStatus.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryStatus.java
@@ -25,6 +25,7 @@ import org.apache.drill.exec.proto.BitControl.FragmentStatus;
 import org.apache.drill.exec.proto.SchemaUserBitShared;
 import org.apache.drill.exec.proto.UserBitShared.MajorFragmentProfile;
 import org.apache.drill.exec.proto.UserBitShared.QueryId;
+import org.apache.drill.exec.proto.UserBitShared.QueryInfo;
 import org.apache.drill.exec.proto.UserBitShared.QueryProfile;
 import org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState;
 import org.apache.drill.exec.proto.UserProtos.RunQuery;
@@ -41,10 +42,14 @@ public class QueryStatus {
   static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(QueryStatus.class);
 
   public static final PStoreConfig<QueryProfile> QUERY_PROFILE = PStoreConfig.
-          newProtoBuilder(SchemaUserBitShared.QueryProfile.WRITE, SchemaUserBitShared.QueryProfile.MERGE).name("query_profiles").build();
+          newProtoBuilder(SchemaUserBitShared.QueryProfile.WRITE, SchemaUserBitShared.QueryProfile.MERGE) //
+          .name("profiles") //
+          .blob() //
+          .max(100) //
+          .build();
 
-  public static final PStoreConfig<QueryProfile> RUNNING_QUERY_PROFILE = PStoreConfig.
-      newProtoBuilder(SchemaUserBitShared.QueryProfile.WRITE, SchemaUserBitShared.QueryProfile.MERGE).name("query_profiles_running").build();
+  public static final PStoreConfig<QueryInfo> RUNNING_QUERY_INFO = PStoreConfig.
+      newProtoBuilder(SchemaUserBitShared.QueryInfo.WRITE, SchemaUserBitShared.QueryInfo.MERGE).name("running").ephemeral().build();
 
   // doesn't need to be thread safe as fragmentDataMap is generated in a single thread and then accessed by multiple threads for reads only.
   private IntObjectOpenHashMap<IntObjectOpenHashMap<FragmentData>> fragmentDataMap = new IntObjectOpenHashMap<IntObjectOpenHashMap<FragmentData>>();
@@ -61,15 +66,15 @@ public class QueryStatus {
   private int finishedFragments = 0;
 
   private final PStore<QueryProfile> profilePStore;
-  private final EStore<QueryProfile> profileEStore;
+  private final PStore<QueryInfo> profileEStore;
 
   public QueryStatus(RunQuery query, QueryId id, PStoreProvider provider, Foreman foreman) {
     this.id = id;
     this.query = query;
     this.queryId = QueryIdHelper.getQueryId(id);
     try {
-      this.profilePStore = provider.getPStore(QUERY_PROFILE);
-      this.profileEStore = provider.getEStore(RUNNING_QUERY_PROFILE);
+      this.profilePStore = provider.getStore(QUERY_PROFILE);
+      this.profileEStore = provider.getStore(RUNNING_QUERY_INFO);
     } catch (IOException e) {
       throw new DrillRuntimeException(e);
     }
@@ -120,25 +125,24 @@ public class QueryStatus {
     fragmentDataMap.get(majorFragmentId).get(minorFragmentId).setStatus(fragmentStatus);
   }
 
-  public void updateQueryStateInStore() {
+  public synchronized void updateQueryStateInStore() {
     QueryState queryState = foreman.getQueryState();
     switch (queryState) {
       case PENDING:
-        // only foreman will put one node for "pending" query into PStore. This is to avoid concurrency issue when multiple threads fail and
-        // call this method.
-        profilePStore.put(queryId, getAsProfile(false));
       case RUNNING:
-        profileEStore.put(queryId, getAsProfile(false));  // store as ephemeral query profile.
-        logger.warn("Update running or pending query state : {}", queryState);
+        profileEStore.put(queryId, getAsInfo());  // store as ephemeral query profile.
         break;
       case COMPLETED:
       case CANCELED:
       case FAILED:
-        logger.warn("Update finished query state : {}", queryState);
-        profileEStore.put(queryId, getAsProfile(false));  //  Change the state in EStore to complete/cancel/fail.
+        try{
+          profileEStore.delete(queryId);
+        }catch(Exception e){
+          logger.warn("Failure while trying to delete the estore profile for this query.", e);
+        }
+        //profileEStore.put(queryId, getAsProfile(false));  //  Change the state in EStore to complete/cancel/fail.
         // profileEStore.delete(queryId);  // delete the ephemeral query profile.
-        profilePStore.put(queryId, getAsProfile(false));
-        profilePStore.putBlob(queryId, getAsProfile(true));
+        profilePStore.put(queryId, getAsProfile());
         break;
       default:
     }
@@ -205,7 +209,16 @@ public class QueryStatus {
     }
   }
 
-  public QueryProfile getAsProfile(boolean fullStatus) {
+  public QueryInfo getAsInfo() {
+    return QueryInfo.newBuilder() //
+      .setQuery(query.getPlan())
+      .setState(foreman.getQueryState())
+      .setForeman(foreman.getContext().getCurrentEndpoint())
+      .setStart(startTime)
+      .build();
+  }
+
+  public QueryProfile getAsProfile() {
     QueryProfile.Builder b = QueryProfile.newBuilder();
     b.setQuery(query.getPlan());
     b.setType(query.getType());
@@ -213,22 +226,20 @@ public class QueryStatus {
       b.setPlan(planText);
     }
     b.setId(id);
-    if (fullStatus) {
-      for (int i = 0; i < fragmentDataMap.allocated.length; i++) {
-        if (fragmentDataMap.allocated[i]) {
-          int majorFragmentId = fragmentDataMap.keys[i];
-          IntObjectOpenHashMap<FragmentData> minorMap = (IntObjectOpenHashMap<FragmentData>) ((Object[]) fragmentDataMap.values)[i];
-
-          MajorFragmentProfile.Builder fb = MajorFragmentProfile.newBuilder();
-          fb.setMajorFragmentId(majorFragmentId);
-          for (int v = 0; v < minorMap.allocated.length; v++) {
-            if (minorMap.allocated[v]) {
-              FragmentData data = (FragmentData) ((Object[]) minorMap.values)[v];
-              fb.addMinorFragmentProfile(data.getStatus().getProfile());
-            }
+    for (int i = 0; i < fragmentDataMap.allocated.length; i++) {
+      if (fragmentDataMap.allocated[i]) {
+        int majorFragmentId = fragmentDataMap.keys[i];
+        IntObjectOpenHashMap<FragmentData> minorMap = (IntObjectOpenHashMap<FragmentData>) ((Object[]) fragmentDataMap.values)[i];
+
+        MajorFragmentProfile.Builder fb = MajorFragmentProfile.newBuilder();
+        fb.setMajorFragmentId(majorFragmentId);
+        for (int v = 0; v < minorMap.allocated.length; v++) {
+          if (minorMap.allocated[v]) {
+            FragmentData data = (FragmentData) ((Object[]) minorMap.values)[v];
+            fb.addMinorFragmentProfile(data.getStatus().getProfile());
           }
-          b.addFragmentProfile(fb);
         }
+        b.addFragmentProfile(fb);
       }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/2eb72a7c/exec/java-exec/src/main/java/org/apache/drill/exec/work/user/UserWorker.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/user/UserWorker.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/user/UserWorker.java
index db76057..30402b7 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/user/UserWorker.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/user/UserWorker.java
@@ -17,6 +17,7 @@
  */
 package org.apache.drill.exec.work.user;
 
+import java.util.Random;
 import java.util.UUID;
 
 import org.apache.drill.exec.proto.ExecProtos.FragmentHandle;
@@ -45,8 +46,13 @@ public class UserWorker{
   }
 
   public QueryId submitWork(UserClientConnection connection, RunQuery query) {
-    UUID uuid = UUID.randomUUID();
-    QueryId id = QueryId.newBuilder().setPart1(uuid.getMostSignificantBits()).setPart2(uuid.getLeastSignificantBits()).build();
+    Random r = new Random();
+
+    // create a new queryid where the first four bytes are a growing time (each new value comes earlier in sequence).  Last 12 bytes are random.
+    long time = (int) (System.currentTimeMillis()/1000);
+    long p1 = ((Integer.MAX_VALUE - time) << 32) + r.nextInt();
+    long p2 = r.nextLong();
+    QueryId id = QueryId.newBuilder().setPart1(p1).setPart2(p2).build();
     Foreman foreman = new Foreman(bee, bee.getContext(), connection, id, query);
     bee.addNewForeman(foreman);
     return id;

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/2eb72a7c/exec/java-exec/src/test/java/org/apache/drill/exec/store/sys/PStoreTestUtil.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/store/sys/PStoreTestUtil.java b/exec/java-exec/src/test/java/org/apache/drill/exec/store/sys/PStoreTestUtil.java
index 6f7794b..1f5aa22 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/store/sys/PStoreTestUtil.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/store/sys/PStoreTestUtil.java
@@ -32,7 +32,7 @@ public class PStoreTestUtil {
   static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PStoreTestUtil.class);
 
   public static void test(PStoreProvider provider) throws Exception{
-    PStore<String> store = provider.getPStore(PStoreConfig.newJacksonBuilder(new ObjectMapper(), String.class).name("sys.test").build());
+    PStore<String> store = provider.getStore(PStoreConfig.newJacksonBuilder(new ObjectMapper(), String.class).name("sys.test").build());
     String[] keys = {"first", "second"};
     String[] values = {"value1", "value2"};
     Map<String, String> expectedMap = Maps.newHashMap();
@@ -41,7 +41,7 @@ public class PStoreTestUtil {
       expectedMap.put(keys[i], values[i]);
       store.put(keys[i], values[i]);
     }
-
+    // allow one second for puts to propagate back to cache
     {
       Iterator<Map.Entry<String, String>> iter = store.iterator();
       for(int i =0; i < keys.length; i++){
@@ -61,6 +61,8 @@ public class PStoreTestUtil {
       }
     }
 
+    // allow one second for deletes to propagate back to cache
+
     assertFalse(store.iterator().hasNext());
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/2eb72a7c/exec/java-exec/src/test/java/org/apache/drill/exec/store/sys/TestPStoreProviders.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/store/sys/TestPStoreProviders.java b/exec/java-exec/src/test/java/org/apache/drill/exec/store/sys/TestPStoreProviders.java
index 18d87c7..cbfbcd3 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/store/sys/TestPStoreProviders.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/store/sys/TestPStoreProviders.java
@@ -51,7 +51,7 @@ public class TestPStoreProviders extends TestWithZookeeper {
 
     try(CuratorFramework curator = builder.build()){
       curator.start();
-      ZkPStoreProvider provider = new ZkPStoreProvider(curator);
+      ZkPStoreProvider provider = new ZkPStoreProvider(config, curator);
       PStoreTestUtil.test(provider);
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/2eb72a7c/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 a0eba74..813d961 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
@@ -87,25 +87,29 @@ public final class BitControl {
      */
     REQ_QUERY_STATUS(8, 10),
     /**
+     * <code>REQ_QUERY_CANCEL = 15;</code>
+     */
+    REQ_QUERY_CANCEL(9, 15),
+    /**
      * <code>RESP_FRAGMENT_HANDLE = 11;</code>
      *
      * <pre>
      * bit responses
      * </pre>
      */
-    RESP_FRAGMENT_HANDLE(9, 11),
+    RESP_FRAGMENT_HANDLE(10, 11),
     /**
      * <code>RESP_FRAGMENT_STATUS = 12;</code>
      */
-    RESP_FRAGMENT_STATUS(10, 12),
+    RESP_FRAGMENT_STATUS(11, 12),
     /**
      * <code>RESP_BIT_STATUS = 13;</code>
      */
-    RESP_BIT_STATUS(11, 13),
+    RESP_BIT_STATUS(12, 13),
     /**
      * <code>RESP_QUERY_STATUS = 14;</code>
      */
-    RESP_QUERY_STATUS(12, 14),
+    RESP_QUERY_STATUS(13, 14),
     ;
 
     /**
@@ -161,6 +165,10 @@ public final class BitControl {
      */
     public static final int REQ_QUERY_STATUS_VALUE = 10;
     /**
+     * <code>REQ_QUERY_CANCEL = 15;</code>
+     */
+    public static final int REQ_QUERY_CANCEL_VALUE = 15;
+    /**
      * <code>RESP_FRAGMENT_HANDLE = 11;</code>
      *
      * <pre>
@@ -195,6 +203,7 @@ public final class BitControl {
         case 8: return REQ_FRAGMENT_STATUS;
         case 9: return REQ_BIT_STATUS;
         case 10: return REQ_QUERY_STATUS;
+        case 15: return REQ_QUERY_CANCEL;
         case 11: return RESP_FRAGMENT_HANDLE;
         case 12: return RESP_FRAGMENT_STATUS;
         case 13: return RESP_BIT_STATUS;
@@ -6635,16 +6644,16 @@ public final class BitControl {
       "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" +
+      "ender\030\002 \001(\0132\030.exec.bit.FragmentHandle*\271\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"
+      "_BIT_STATUS\020\t\022\024\n\020REQ_QUERY_STATUS\020\n\022\024\n\020R" +
+      "EQ_QUERY_CANCEL\020\017\022\030\n\024RESP_FRAGMENT_HANDL" +
+      "E\020\013\022\030\n\024RESP_FRAGMENT_STATUS\020\014\022\023\n\017RESP_BI" +
+      "T_STATUS\020\r\022\025\n\021RESP_QUERY_STATUS\020\016B+\n\033org" +
+      ".apache.drill.exec.protoB\nBitControlH\001"
     };
     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
       new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/2eb72a7c/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 f6bd17b..fdd003e 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
@@ -1532,6 +1532,147 @@ public final class SchemaUserBitShared
         }
     }
 
+    public static final class QueryInfo
+    {
+        public static final org.apache.drill.exec.proto.SchemaUserBitShared.QueryInfo.MessageSchema WRITE =
+            new org.apache.drill.exec.proto.SchemaUserBitShared.QueryInfo.MessageSchema();
+        public static final org.apache.drill.exec.proto.SchemaUserBitShared.QueryInfo.BuilderSchema MERGE =
+            new org.apache.drill.exec.proto.SchemaUserBitShared.QueryInfo.BuilderSchema();
+        
+        public static class MessageSchema implements com.dyuproject.protostuff.Schema<org.apache.drill.exec.proto.UserBitShared.QueryInfo>
+        {
+            public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.QueryInfo message) throws java.io.IOException
+            {
+                if(message.hasQuery())
+                    output.writeString(1, message.getQuery(), false);
+                if(message.hasStart())
+                    output.writeInt64(2, message.getStart(), false);
+                if(message.hasState())
+                    output.writeEnum(3, message.getState().getNumber(), false);
+                if(message.hasUser())
+                    output.writeString(4, message.getUser(), false);
+                if(message.hasForeman())
+                    output.writeObject(5, message.getForeman(), org.apache.drill.exec.proto.SchemaCoordinationProtos.DrillbitEndpoint.WRITE, false);
+
+            }
+            public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.QueryInfo message)
+            {
+                return message.isInitialized();
+            }
+            public java.lang.String getFieldName(int number)
+            {
+                return org.apache.drill.exec.proto.SchemaUserBitShared.QueryInfo.getFieldName(number);
+            }
+            public int getFieldNumber(java.lang.String name)
+            {
+                return org.apache.drill.exec.proto.SchemaUserBitShared.QueryInfo.getFieldNumber(name);
+            }
+            public java.lang.Class<org.apache.drill.exec.proto.UserBitShared.QueryInfo> typeClass()
+            {
+                return org.apache.drill.exec.proto.UserBitShared.QueryInfo.class;
+            }
+            public java.lang.String messageName()
+            {
+                return org.apache.drill.exec.proto.UserBitShared.QueryInfo.class.getSimpleName();
+            }
+            public java.lang.String messageFullName()
+            {
+                return org.apache.drill.exec.proto.UserBitShared.QueryInfo.class.getName();
+            }
+            //unused
+            public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.exec.proto.UserBitShared.QueryInfo message) throws java.io.IOException {}
+            public org.apache.drill.exec.proto.UserBitShared.QueryInfo newMessage() { return null; }
+        }
+        public static class BuilderSchema implements com.dyuproject.protostuff.Schema<org.apache.drill.exec.proto.UserBitShared.QueryInfo.Builder>
+        {
+            public void mergeFrom(com.dyuproject.protostuff.Input input, org.apache.drill.exec.proto.UserBitShared.QueryInfo.Builder builder) throws java.io.IOException
+            {
+                for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+                {
+                    switch(number)
+                    {
+                        case 0:
+                            return;
+                        case 1:
+                            builder.setQuery(input.readString());
+                            break;
+                        case 2:
+                            builder.setStart(input.readInt64());
+                            break;
+                        case 3:
+                            builder.setState(org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState.valueOf(input.readEnum()));
+                            break;
+                        case 4:
+                            builder.setUser(input.readString());
+                            break;
+                        case 5:
+                            builder.setForeman(input.mergeObject(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.newBuilder(), org.apache.drill.exec.proto.SchemaCoordinationProtos.DrillbitEndpoint.MERGE));
+
+                            break;
+                        default:
+                            input.handleUnknownField(number, this);
+                    }
+                }
+            }
+            public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.QueryInfo.Builder builder)
+            {
+                return builder.isInitialized();
+            }
+            public org.apache.drill.exec.proto.UserBitShared.QueryInfo.Builder newMessage()
+            {
+                return org.apache.drill.exec.proto.UserBitShared.QueryInfo.newBuilder();
+            }
+            public java.lang.String getFieldName(int number)
+            {
+                return org.apache.drill.exec.proto.SchemaUserBitShared.QueryInfo.getFieldName(number);
+            }
+            public int getFieldNumber(java.lang.String name)
+            {
+                return org.apache.drill.exec.proto.SchemaUserBitShared.QueryInfo.getFieldNumber(name);
+            }
+            public java.lang.Class<org.apache.drill.exec.proto.UserBitShared.QueryInfo.Builder> typeClass()
+            {
+                return org.apache.drill.exec.proto.UserBitShared.QueryInfo.Builder.class;
+            }
+            public java.lang.String messageName()
+            {
+                return org.apache.drill.exec.proto.UserBitShared.QueryInfo.class.getSimpleName();
+            }
+            public java.lang.String messageFullName()
+            {
+                return org.apache.drill.exec.proto.UserBitShared.QueryInfo.class.getName();
+            }
+            //unused
+            public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.QueryInfo.Builder builder) throws java.io.IOException {}
+        }
+        public static java.lang.String getFieldName(int number)
+        {
+            switch(number)
+            {
+                case 1: return "query";
+                case 2: return "start";
+                case 3: return "state";
+                case 4: return "user";
+                case 5: return "foreman";
+                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("query", 1);
+            fieldMap.put("start", 2);
+            fieldMap.put("state", 3);
+            fieldMap.put("user", 4);
+            fieldMap.put("foreman", 5);
+        }
+    }
+
     public static final class QueryProfile
     {
         public static final org.apache.drill.exec.proto.SchemaUserBitShared.QueryProfile.MessageSchema WRITE =

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/2eb72a7c/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 37d0eda..e0666f2 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
@@ -11888,6 +11888,996 @@ public final class UserBitShared {
     // @@protoc_insertion_point(class_scope:exec.shared.QueryResult)
   }
 
+  public interface QueryInfoOrBuilder
+      extends com.google.protobuf.MessageOrBuilder {
+
+    // optional string query = 1;
+    /**
+     * <code>optional string query = 1;</code>
+     */
+    boolean hasQuery();
+    /**
+     * <code>optional string query = 1;</code>
+     */
+    java.lang.String getQuery();
+    /**
+     * <code>optional string query = 1;</code>
+     */
+    com.google.protobuf.ByteString
+        getQueryBytes();
+
+    // optional int64 start = 2;
+    /**
+     * <code>optional int64 start = 2;</code>
+     */
+    boolean hasStart();
+    /**
+     * <code>optional int64 start = 2;</code>
+     */
+    long getStart();
+
+    // optional .exec.shared.QueryResult.QueryState state = 3;
+    /**
+     * <code>optional .exec.shared.QueryResult.QueryState state = 3;</code>
+     */
+    boolean hasState();
+    /**
+     * <code>optional .exec.shared.QueryResult.QueryState state = 3;</code>
+     */
+    org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState getState();
+
+    // optional string user = 4;
+    /**
+     * <code>optional string user = 4;</code>
+     */
+    boolean hasUser();
+    /**
+     * <code>optional string user = 4;</code>
+     */
+    java.lang.String getUser();
+    /**
+     * <code>optional string user = 4;</code>
+     */
+    com.google.protobuf.ByteString
+        getUserBytes();
+
+    // optional .exec.DrillbitEndpoint foreman = 5;
+    /**
+     * <code>optional .exec.DrillbitEndpoint foreman = 5;</code>
+     */
+    boolean hasForeman();
+    /**
+     * <code>optional .exec.DrillbitEndpoint foreman = 5;</code>
+     */
+    org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint getForeman();
+    /**
+     * <code>optional .exec.DrillbitEndpoint foreman = 5;</code>
+     */
+    org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpointOrBuilder getForemanOrBuilder();
+  }
+  /**
+   * Protobuf type {@code exec.shared.QueryInfo}
+   */
+  public static final class QueryInfo extends
+      com.google.protobuf.GeneratedMessage
+      implements QueryInfoOrBuilder {
+    // Use QueryInfo.newBuilder() to construct.
+    private QueryInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+      super(builder);
+      this.unknownFields = builder.getUnknownFields();
+    }
+    private QueryInfo(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+    private static final QueryInfo defaultInstance;
+    public static QueryInfo getDefaultInstance() {
+      return defaultInstance;
+    }
+
+    public QueryInfo getDefaultInstanceForType() {
+      return defaultInstance;
+    }
+
+    private final com.google.protobuf.UnknownFieldSet unknownFields;
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+        getUnknownFields() {
+      return this.unknownFields;
+    }
+    private QueryInfo(
+        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;
+              query_ = input.readBytes();
+              break;
+            }
+            case 16: {
+              bitField0_ |= 0x00000002;
+              start_ = input.readInt64();
+              break;
+            }
+            case 24: {
+              int rawValue = input.readEnum();
+              org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState value = org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState.valueOf(rawValue);
+              if (value == null) {
+                unknownFields.mergeVarintField(3, rawValue);
+              } else {
+                bitField0_ |= 0x00000004;
+                state_ = value;
+              }
+              break;
+            }
+            case 34: {
+              bitField0_ |= 0x00000008;
+              user_ = input.readBytes();
+              break;
+            }
+            case 42: {
+              org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000010) == 0x00000010)) {
+                subBuilder = foreman_.toBuilder();
+              }
+              foreman_ = input.readMessage(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(foreman_);
+                foreman_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000010;
+              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_QueryInfo_descriptor;
+    }
+
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return org.apache.drill.exec.proto.UserBitShared.internal_static_exec_shared_QueryInfo_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              org.apache.drill.exec.proto.UserBitShared.QueryInfo.class, org.apache.drill.exec.proto.UserBitShared.QueryInfo.Builder.class);
+    }
+
+    public static com.google.protobuf.Parser<QueryInfo> PARSER =
+        new com.google.protobuf.AbstractParser<QueryInfo>() {
+      public QueryInfo parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new QueryInfo(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<QueryInfo> getParserForType() {
+      return PARSER;
+    }
+
+    private int bitField0_;
+    // optional string query = 1;
+    public static final int QUERY_FIELD_NUMBER = 1;
+    private java.lang.Object query_;
+    /**
+     * <code>optional string query = 1;</code>
+     */
+    public boolean hasQuery() {
+      return ((bitField0_ & 0x00000001) == 0x00000001);
+    }
+    /**
+     * <code>optional string query = 1;</code>
+     */
+    public java.lang.String getQuery() {
+      java.lang.Object ref = query_;
+      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()) {
+          query_ = s;
+        }
+        return s;
+      }
+    }
+    /**
+     * <code>optional string query = 1;</code>
+     */
+    public com.google.protobuf.ByteString
+        getQueryBytes() {
+      java.lang.Object ref = query_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        query_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
+    // optional int64 start = 2;
+    public static final int START_FIELD_NUMBER = 2;
+    private long start_;
+    /**
+     * <code>optional int64 start = 2;</code>
+     */
+    public boolean hasStart() {
+      return ((bitField0_ & 0x00000002) == 0x00000002);
+    }
+    /**
+     * <code>optional int64 start = 2;</code>
+     */
+    public long getStart() {
+      return start_;
+    }
+
+    // optional .exec.shared.QueryResult.QueryState state = 3;
+    public static final int STATE_FIELD_NUMBER = 3;
+    private org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState state_;
+    /**
+     * <code>optional .exec.shared.QueryResult.QueryState state = 3;</code>
+     */
+    public boolean hasState() {
+      return ((bitField0_ & 0x00000004) == 0x00000004);
+    }
+    /**
+     * <code>optional .exec.shared.QueryResult.QueryState state = 3;</code>
+     */
+    public org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState getState() {
+      return state_;
+    }
+
+    // optional string user = 4;
+    public static final int USER_FIELD_NUMBER = 4;
+    private java.lang.Object user_;
+    /**
+     * <code>optional string user = 4;</code>
+     */
+    public boolean hasUser() {
+      return ((bitField0_ & 0x00000008) == 0x00000008);
+    }
+    /**
+     * <code>optional string user = 4;</code>
+     */
+    public java.lang.String getUser() {
+      java.lang.Object ref = user_;
+      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()) {
+          user_ = s;
+        }
+        return s;
+      }
+    }
+    /**
+     * <code>optional string user = 4;</code>
+     */
+    public com.google.protobuf.ByteString
+        getUserBytes() {
+      java.lang.Object ref = user_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        user_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
+    // optional .exec.DrillbitEndpoint foreman = 5;
+    public static final int FOREMAN_FIELD_NUMBER = 5;
+    private org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint foreman_;
+    /**
+     * <code>optional .exec.DrillbitEndpoint foreman = 5;</code>
+     */
+    public boolean hasForeman() {
+      return ((bitField0_ & 0x00000010) == 0x00000010);
+    }
+    /**
+     * <code>optional .exec.DrillbitEndpoint foreman = 5;</code>
+     */
+    public org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint getForeman() {
+      return foreman_;
+    }
+    /**
+     * <code>optional .exec.DrillbitEndpoint foreman = 5;</code>
+     */
+    public org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpointOrBuilder getForemanOrBuilder() {
+      return foreman_;
+    }
+
+    private void initFields() {
+      query_ = "";
+      start_ = 0L;
+      state_ = org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState.PENDING;
+      user_ = "";
+      foreman_ = org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.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, getQueryBytes());
+      }
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        output.writeInt64(2, start_);
+      }
+      if (((bitField0_ & 0x00000004) == 0x00000004)) {
+        output.writeEnum(3, state_.getNumber());
+      }
+      if (((bitField0_ & 0x00000008) == 0x00000008)) {
+        output.writeBytes(4, getUserBytes());
+      }
+      if (((bitField0_ & 0x00000010) == 0x00000010)) {
+        output.writeMessage(5, foreman_);
+      }
+      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, getQueryBytes());
+      }
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeInt64Size(2, start_);
+      }
+      if (((bitField0_ & 0x00000004) == 0x00000004)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeEnumSize(3, state_.getNumber());
+      }
+      if (((bitField0_ & 0x00000008) == 0x00000008)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(4, getUserBytes());
+      }
+      if (((bitField0_ & 0x00000010) == 0x00000010)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeMessageSize(5, foreman_);
+      }
+      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.QueryInfo parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.apache.drill.exec.proto.UserBitShared.QueryInfo 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.QueryInfo parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.apache.drill.exec.proto.UserBitShared.QueryInfo 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.QueryInfo parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.apache.drill.exec.proto.UserBitShared.QueryInfo 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.QueryInfo parseDelimitedFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input);
+    }
+    public static org.apache.drill.exec.proto.UserBitShared.QueryInfo 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.QueryInfo parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.apache.drill.exec.proto.UserBitShared.QueryInfo 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.QueryInfo 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.QueryInfo}
+     */
+    public static final class Builder extends
+        com.google.protobuf.GeneratedMessage.Builder<Builder>
+       implements org.apache.drill.exec.proto.UserBitShared.QueryInfoOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.apache.drill.exec.proto.UserBitShared.internal_static_exec_shared_QueryInfo_descriptor;
+      }
+
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.apache.drill.exec.proto.UserBitShared.internal_static_exec_shared_QueryInfo_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                org.apache.drill.exec.proto.UserBitShared.QueryInfo.class, org.apache.drill.exec.proto.UserBitShared.QueryInfo.Builder.class);
+      }
+
+      // Construct using org.apache.drill.exec.proto.UserBitShared.QueryInfo.newBuilder()
+      private Builder() {
+        maybeForceBuilderInitialization();
+      }
+
+      private Builder(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+        super(parent);
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+          getForemanFieldBuilder();
+        }
+      }
+      private static Builder create() {
+        return new Builder();
+      }
+
+      public Builder clear() {
+        super.clear();
+        query_ = "";
+        bitField0_ = (bitField0_ & ~0x00000001);
+        start_ = 0L;
+        bitField0_ = (bitField0_ & ~0x00000002);
+        state_ = org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState.PENDING;
+        bitField0_ = (bitField0_ & ~0x00000004);
+        user_ = "";
+        bitField0_ = (bitField0_ & ~0x00000008);
+        if (foremanBuilder_ == null) {
+          foreman_ = org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.getDefaultInstance();
+        } else {
+          foremanBuilder_.clear();
+        }
+        bitField0_ = (bitField0_ & ~0x00000010);
+        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_QueryInfo_descriptor;
+      }
+
+      public org.apache.drill.exec.proto.UserBitShared.QueryInfo getDefaultInstanceForType() {
+        return org.apache.drill.exec.proto.UserBitShared.QueryInfo.getDefaultInstance();
+      }
+
+      public org.apache.drill.exec.proto.UserBitShared.QueryInfo build() {
+        org.apache.drill.exec.proto.UserBitShared.QueryInfo result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(result);
+        }
+        return result;
+      }
+
+      public org.apache.drill.exec.proto.UserBitShared.QueryInfo buildPartial() {
+        org.apache.drill.exec.proto.UserBitShared.QueryInfo result = new org.apache.drill.exec.proto.UserBitShared.QueryInfo(this);
+        int from_bitField0_ = bitField0_;
+        int to_bitField0_ = 0;
+        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+          to_bitField0_ |= 0x00000001;
+        }
+        result.query_ = query_;
+        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+          to_bitField0_ |= 0x00000002;
+        }
+        result.start_ = start_;
+        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
+          to_bitField0_ |= 0x00000004;
+        }
+        result.state_ = state_;
+        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
+          to_bitField0_ |= 0x00000008;
+        }
+        result.user_ = user_;
+        if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
+          to_bitField0_ |= 0x00000010;
+        }
+        if (foremanBuilder_ == null) {
+          result.foreman_ = foreman_;
+        } else {
+          result.foreman_ = foremanBuilder_.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.QueryInfo) {
+          return mergeFrom((org.apache.drill.exec.proto.UserBitShared.QueryInfo)other);
+        } else {
+          super.mergeFrom(other);
+          return this;
+        }
+      }
+
+      public Builder mergeFrom(org.apache.drill.exec.proto.UserBitShared.QueryInfo other) {
+        if (other == org.apache.drill.exec.proto.UserBitShared.QueryInfo.getDefaultInstance()) return this;
+        if (other.hasQuery()) {
+          bitField0_ |= 0x00000001;
+          query_ = other.query_;
+          onChanged();
+        }
+        if (other.hasStart()) {
+          setStart(other.getStart());
+        }
+        if (other.hasState()) {
+          setState(other.getState());
+        }
+        if (other.hasUser()) {
+          bitField0_ |= 0x00000008;
+          user_ = other.user_;
+          onChanged();
+        }
+        if (other.hasForeman()) {
+          mergeForeman(other.getForeman());
+        }
+        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.QueryInfo parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.apache.drill.exec.proto.UserBitShared.QueryInfo) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
+        return this;
+      }
+      private int bitField0_;
+
+      // optional string query = 1;
+      private java.lang.Object query_ = "";
+      /**
+       * <code>optional string query = 1;</code>
+       */
+      public boolean hasQuery() {
+        return ((bitField0_ & 0x00000001) == 0x00000001);
+      }
+      /**
+       * <code>optional string query = 1;</code>
+       */
+      public java.lang.String getQuery() {
+        java.lang.Object ref = query_;
+        if (!(ref instanceof java.lang.String)) {
+          java.lang.String s = ((com.google.protobuf.ByteString) ref)
+              .toStringUtf8();
+          query_ = s;
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <code>optional string query = 1;</code>
+       */
+      public com.google.protobuf.ByteString
+          getQueryBytes() {
+        java.lang.Object ref = query_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          query_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>optional string query = 1;</code>
+       */
+      public Builder setQuery(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000001;
+        query_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string query = 1;</code>
+       */
+      public Builder clearQuery() {
+        bitField0_ = (bitField0_ & ~0x00000001);
+        query_ = getDefaultInstance().getQuery();
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string query = 1;</code>
+       */
+      public Builder setQueryBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000001;
+        query_ = value;
+        onChanged();
+        return this;
+      }
+
+      // optional int64 start = 2;
+      private long start_ ;
+      /**
+       * <code>optional int64 start = 2;</code>
+       */
+      public boolean hasStart() {
+        return ((bitField0_ & 0x00000002) == 0x00000002);
+      }
+      /**
+       * <code>optional int64 start = 2;</code>
+       */
+      public long getStart() {
+        return start_;
+      }
+      /**
+       * <code>optional int64 start = 2;</code>
+       */
+      public Builder setStart(long value) {
+        bitField0_ |= 0x00000002;
+        start_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional int64 start = 2;</code>
+       */
+      public Builder clearStart() {
+        bitField0_ = (bitField0_ & ~0x00000002);
+        start_ = 0L;
+        onChanged();
+        return this;
+      }
+
+      // optional .exec.shared.QueryResult.QueryState state = 3;
+      private org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState state_ = org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState.PENDING;
+      /**
+       * <code>optional .exec.shared.QueryResult.QueryState state = 3;</code>
+       */
+      public boolean hasState() {
+        return ((bitField0_ & 0x00000004) == 0x00000004);
+      }
+      /**
+       * <code>optional .exec.shared.QueryResult.QueryState state = 3;</code>
+       */
+      public org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState getState() {
+        return state_;
+      }
+      /**
+       * <code>optional .exec.shared.QueryResult.QueryState state = 3;</code>
+       */
+      public Builder setState(org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState value) {
+        if (value == null) {
+          throw new NullPointerException();
+        }
+        bitField0_ |= 0x00000004;
+        state_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional .exec.shared.QueryResult.QueryState state = 3;</code>
+       */
+      public Builder clearState() {
+        bitField0_ = (bitField0_ & ~0x00000004);
+        state_ = org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState.PENDING;
+        onChanged();
+        return this;
+      }
+
+      // optional string user = 4;
+      private java.lang.Object user_ = "";
+      /**
+       * <code>optional string user = 4;</code>
+       */
+      public boolean hasUser() {
+        return ((bitField0_ & 0x00000008) == 0x00000008);
+      }
+      /**
+       * <code>optional string user = 4;</code>
+       */
+      public java.lang.String getUser() {
+        java.lang.Object ref = user_;
+        if (!(ref instanceof java.lang.String)) {
+          java.lang.String s = ((com.google.protobuf.ByteString) ref)
+              .toStringUtf8();
+          user_ = s;
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <code>optional string user = 4;</code>
+       */
+      public com.google.protobuf.ByteString
+          getUserBytes() {
+        java.lang.Object ref = user_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          user_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>optional string user = 4;</code>
+       */
+      public Builder setUser(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000008;
+        user_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string user = 4;</code>
+       */
+      public Builder clearUser() {
+        bitField0_ = (bitField0_ & ~0x00000008);
+        user_ = getDefaultInstance().getUser();
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string user = 4;</code>
+       */
+      public Builder setUserBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000008;
+        user_ = value;
+        onChanged();
+        return this;
+      }
+
+      // optional .exec.DrillbitEndpoint foreman = 5;
+      private org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint foreman_ = org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.getDefaultInstance();
+      private com.google.protobuf.SingleFieldBuilder<
+          org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint, org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.Builder, org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpointOrBuilder> foremanBuilder_;
+      /**
+       * <code>optional .exec.DrillbitEndpoint foreman = 5;</code>
+       */
+      public boolean hasForeman() {
+        return ((bitField0_ & 0x00000010) == 0x00000010);
+      }
+      /**
+       * <code>optional .exec.DrillbitEndpoint foreman = 5;</code>
+       */
+      public org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint getForeman() {
+        if (foremanBuilder_ == null) {
+          return foreman_;
+        } else {
+          return foremanBuilder_.getMessage();
+        }
+      }
+      /**
+       * <code>optional .exec.DrillbitEndpoint foreman = 5;</code>
+       */
+      public Builder setForeman(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint value) {
+        if (foremanBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          foreman_ = value;
+          onChanged();
+        } else {
+          foremanBuilder_.setMessage(value);
+        }
+        bitField0_ |= 0x00000010;
+        return this;
+      }
+      /**
+       * <code>optional .exec.DrillbitEndpoint foreman = 5;</code>
+       */
+      public Builder setForeman(
+          org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.Builder builderForValue) {
+        if (foremanBuilder_ == null) {
+          foreman_ = builderForValue.build();
+          onChanged();
+        } else {
+          foremanBuilder_.setMessage(builderForValue.build());
+        }
+        bitField0_ |= 0x00000010;
+        return this;
+      }
+      /**
+       * <code>optional .exec.DrillbitEndpoint foreman = 5;</code>
+       */
+      public Builder mergeForeman(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint value) {
+        if (foremanBuilder_ == null) {
+          if (((bitField0_ & 0x00000010) == 0x00000010) &&
+              foreman_ != org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.getDefaultInstance()) {
+            foreman_ =
+              org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.newBuilder(foreman_).mergeFrom(value).buildPartial();
+          } else {
+            foreman_ = value;
+          }
+          onChanged();
+        } else {
+          foremanBuilder_.mergeFrom(value);
+        }
+        bitField0_ |= 0x00000010;
+        return this;
+      }
+      /**
+       * <code>optional .exec.DrillbitEndpoint foreman = 5;</code>
+       */
+      public Builder clearForeman() {
+        if (foremanBuilder_ == null) {
+          foreman_ = org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.getDefaultInstance();
+          onChanged();
+        } else {
+          foremanBuilder_.clear();
+        }
+        bitField0_ = (bitField0_ & ~0x00000010);
+        return this;
+      }
+      /**
+       * <code>optional .exec.DrillbitEndpoint foreman = 5;</code>
+       */
+      public org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.Builder getForemanBuilder() {
+        bitField0_ |= 0x00000010;
+        onChanged();
+        return getForemanFieldBuilder().getBuilder();
+      }
+      /**
+       * <code>optional .exec.DrillbitEndpoint foreman = 5;</code>
+       */
+      public org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpointOrBuilder getForemanOrBuilder() {
+        if (foremanBuilder_ != null) {
+          return foremanBuilder_.getMessageOrBuilder();
+        } else {
+          return foreman_;
+        }
+      }
+      /**
+       * <code>optional .exec.DrillbitEndpoint foreman = 5;</code>
+       */
+      private com.google.protobuf.SingleFieldBuilder<
+          org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint, org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.Builder, org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpointOrBuilder> 
+          getForemanFieldBuilder() {
+        if (foremanBuilder_ == null) {
+          foremanBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+              org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint, org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.Builder, org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpointOrBuilder>(
+                  foreman_,
+                  getParentForChildren(),
+                  isClean());
+          foreman_ = null;
+        }
+        return foremanBuilder_;
+      }
+
+      // @@protoc_insertion_point(builder_scope:exec.shared.QueryInfo)
+    }
+
+    static {
+      defaultInstance = new QueryInfo(true);
+      defaultInstance.initFields();
+    }
+
+    // @@protoc_insertion_point(class_scope:exec.shared.QueryInfo)
+  }
+
   public interface QueryProfileOrBuilder
       extends com.google.protobuf.MessageOrBuilder {
 
@@ -18776,6 +19766,11 @@ public final class UserBitShared {
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_exec_shared_QueryResult_fieldAccessorTable;
   private static com.google.protobuf.Descriptors.Descriptor
+    internal_static_exec_shared_QueryInfo_descriptor;
+  private static
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
+      internal_static_exec_shared_QueryInfo_fieldAccessorTable;
+  private static com.google.protobuf.Descriptors.Descriptor
     internal_static_exec_shared_QueryProfile_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
@@ -18859,60 +19854,64 @@ public final class UserBitShared {
       "dBatchDef\022\026\n\016schema_changed\030\013 \001(\010\"b\n\nQue" +
       "ryState\022\013\n\007PENDING\020\000\022\013\n\007RUNNING\020\001\022\r\n\tCOM" +
       "PLETED\020\002\022\014\n\010CANCELED\020\003\022\n\n\006FAILED\020\004\022\021\n\rUN" +
-      "KNOWN_QUERY\020\005\"\336\002\n\014QueryProfile\022 \n\002id\030\001 \001" +
-      "(\0132\024.exec.shared.QueryId\022$\n\004type\030\002 \001(\0162\026" +
-      ".exec.shared.QueryType\022\r\n\005start\030\003 \001(\003\022\013\n" +
-      "\003end\030\004 \001(\003\022\r\n\005query\030\005 \001(\t\022\014\n\004plan\030\006 \001(\t\022" +
-      "\'\n\007foreman\030\007 \001(\0132\026.exec.DrillbitEndpoint",
-      "\0222\n\005state\030\010 \001(\0162#.exec.shared.QueryResul" +
-      "t.QueryState\022\027\n\017total_fragments\030\t \001(\005\022\032\n" +
-      "\022finished_fragments\030\n \001(\005\022;\n\020fragment_pr" +
-      "ofile\030\013 \003(\0132!.exec.shared.MajorFragmentP" +
-      "rofile\"t\n\024MajorFragmentProfile\022\031\n\021major_" +
-      "fragment_id\030\001 \001(\005\022A\n\026minor_fragment_prof" +
-      "ile\030\002 \003(\0132!.exec.shared.MinorFragmentPro" +
-      "file\"\274\002\n\024MinorFragmentProfile\022)\n\005state\030\001" +
-      " \001(\0162\032.exec.shared.FragmentState\022(\n\005erro" +
-      "r\030\002 \001(\0132\031.exec.shared.DrillPBError\022\031\n\021mi",
-      "nor_fragment_id\030\003 \001(\005\0226\n\020operator_profil" +
-      "e\030\004 \003(\0132\034.exec.shared.OperatorProfile\022\022\n" +
-      "\nstart_time\030\005 \001(\003\022\020\n\010end_time\030\006 \001(\003\022\023\n\013m" +
-      "emory_used\030\007 \001(\003\022\027\n\017max_memory_used\030\010 \001(" +
-      "\003\022(\n\010endpoint\030\t \001(\0132\026.exec.DrillbitEndpo" +
-      "int\"\372\001\n\017OperatorProfile\0221\n\rinput_profile" +
-      "\030\001 \003(\0132\032.exec.shared.StreamProfile\022\023\n\013op" +
-      "erator_id\030\003 \001(\005\022\025\n\roperator_type\030\004 \001(\005\022\023" +
-      "\n\013setup_nanos\030\005 \001(\003\022\025\n\rprocess_nanos\030\006 \001" +
-      "(\003\022\036\n\026local_memory_allocated\030\007 \001(\003\022(\n\006me",
-      "tric\030\010 \003(\0132\030.exec.shared.MetricValue\022\022\n\n" +
-      "wait_nanos\030\t \001(\003\"B\n\rStreamProfile\022\017\n\007rec" +
-      "ords\030\001 \001(\003\022\017\n\007batches\030\002 \001(\003\022\017\n\007schemas\030\003" +
-      " \001(\003\"J\n\013MetricValue\022\021\n\tmetric_id\030\001 \001(\005\022\022" +
-      "\n\nlong_value\030\002 \001(\003\022\024\n\014double_value\030\003 \001(\001" +
-      "*5\n\nRpcChannel\022\017\n\013BIT_CONTROL\020\000\022\014\n\010BIT_D" +
-      "ATA\020\001\022\010\n\004USER\020\002*/\n\tQueryType\022\007\n\003SQL\020\001\022\013\n" +
-      "\007LOGICAL\020\002\022\014\n\010PHYSICAL\020\003*k\n\rFragmentStat" +
-      "e\022\013\n\007SENDING\020\000\022\027\n\023AWAITING_ALLOCATION\020\001\022" +
-      "\013\n\007RUNNING\020\002\022\014\n\010FINISHED\020\003\022\r\n\tCANCELLED\020",
-      "\004\022\n\n\006FAILED\020\005*\264\005\n\020CoreOperatorType\022\021\n\rSI" +
-      "NGLE_SENDER\020\000\022\024\n\020BROADCAST_SENDER\020\001\022\n\n\006F" +
-      "ILTER\020\002\022\022\n\016HASH_AGGREGATE\020\003\022\r\n\tHASH_JOIN" +
-      "\020\004\022\016\n\nMERGE_JOIN\020\005\022\031\n\025HASH_PARTITION_SEN" +
-      "DER\020\006\022\t\n\005LIMIT\020\007\022\024\n\020MERGING_RECEIVER\020\010\022\034" +
-      "\n\030ORDERED_PARTITION_SENDER\020\t\022\013\n\007PROJECT\020" +
-      "\n\022\026\n\022UNORDERED_RECEIVER\020\013\022\020\n\014RANGE_SENDE" +
-      "R\020\014\022\n\n\006SCREEN\020\r\022\034\n\030SELECTION_VECTOR_REMO" +
-      "VER\020\016\022\027\n\023STREAMING_AGGREGATE\020\017\022\016\n\nTOP_N_" +
-      "SORT\020\020\022\021\n\rEXTERNAL_SORT\020\021\022\t\n\005TRACE\020\022\022\t\n\005",
-      "UNION\020\023\022\014\n\010OLD_SORT\020\024\022\032\n\026PARQUET_ROW_GRO" +
-      "UP_SCAN\020\025\022\021\n\rHIVE_SUB_SCAN\020\026\022\025\n\021SYSTEM_T" +
-      "ABLE_SCAN\020\027\022\021\n\rMOCK_SUB_SCAN\020\030\022\022\n\016PARQUE" +
-      "T_WRITER\020\031\022\023\n\017DIRECT_SUB_SCAN\020\032\022\017\n\013TEXT_" +
-      "WRITER\020\033\022\021\n\rTEXT_SUB_SCAN\020\034\022\021\n\rJSON_SUB_" +
-      "SCAN\020\035\022\030\n\024INFO_SCHEMA_SUB_SCAN\020\036\022\023\n\017COMP" +
-      "LEX_TO_JSON\020\037\022\025\n\021PRODUCER_CONSUMER\020 \022\022\n\016" +
-      "HBASE_SUB_SCAN\020!\022\n\n\006WINDOW\020\"B.\n\033org.apac" +
-      "he.drill.exec.protoB\rUserBitSharedH\001"
+      "KNOWN_QUERY\020\005\"\224\001\n\tQueryInfo\022\r\n\005query\030\001 \001" +
+      "(\t\022\r\n\005start\030\002 \001(\003\0222\n\005state\030\003 \001(\0162#.exec." +
+      "shared.QueryResult.QueryState\022\014\n\004user\030\004 " +
+      "\001(\t\022\'\n\007foreman\030\005 \001(\0132\026.exec.DrillbitEndp" +
+      "oint\"\336\002\n\014QueryProfile\022 \n\002id\030\001 \001(\0132\024.exec",
+      ".shared.QueryId\022$\n\004type\030\002 \001(\0162\026.exec.sha" +
+      "red.QueryType\022\r\n\005start\030\003 \001(\003\022\013\n\003end\030\004 \001(" +
+      "\003\022\r\n\005query\030\005 \001(\t\022\014\n\004plan\030\006 \001(\t\022\'\n\007forema" +
+      "n\030\007 \001(\0132\026.exec.DrillbitEndpoint\0222\n\005state" +
+      "\030\010 \001(\0162#.exec.shared.QueryResult.QuerySt" +
+      "ate\022\027\n\017total_fragments\030\t \001(\005\022\032\n\022finished" +
+      "_fragments\030\n \001(\005\022;\n\020fragment_profile\030\013 \003" +
+      "(\0132!.exec.shared.MajorFragmentProfile\"t\n" +
+      "\024MajorFragmentProfile\022\031\n\021major_fragment_" +
+      "id\030\001 \001(\005\022A\n\026minor_fragment_profile\030\002 \003(\013",
+      "2!.exec.shared.MinorFragmentProfile\"\274\002\n\024" +
+      "MinorFragmentProfile\022)\n\005state\030\001 \001(\0162\032.ex" +
+      "ec.shared.FragmentState\022(\n\005error\030\002 \001(\0132\031" +
+      ".exec.shared.DrillPBError\022\031\n\021minor_fragm" +
+      "ent_id\030\003 \001(\005\0226\n\020operator_profile\030\004 \003(\0132\034" +
+      ".exec.shared.OperatorProfile\022\022\n\nstart_ti" +
+      "me\030\005 \001(\003\022\020\n\010end_time\030\006 \001(\003\022\023\n\013memory_use" +
+      "d\030\007 \001(\003\022\027\n\017max_memory_used\030\010 \001(\003\022(\n\010endp" +
+      "oint\030\t \001(\0132\026.exec.DrillbitEndpoint\"\372\001\n\017O" +
+      "peratorProfile\0221\n\rinput_profile\030\001 \003(\0132\032.",
+      "exec.shared.StreamProfile\022\023\n\013operator_id" +
+      "\030\003 \001(\005\022\025\n\roperator_type\030\004 \001(\005\022\023\n\013setup_n" +
+      "anos\030\005 \001(\003\022\025\n\rprocess_nanos\030\006 \001(\003\022\036\n\026loc" +
+      "al_memory_allocated\030\007 \001(\003\022(\n\006metric\030\010 \003(" +
+      "\0132\030.exec.shared.MetricValue\022\022\n\nwait_nano" +
+      "s\030\t \001(\003\"B\n\rStreamProfile\022\017\n\007records\030\001 \001(" +
+      "\003\022\017\n\007batches\030\002 \001(\003\022\017\n\007schemas\030\003 \001(\003\"J\n\013M" +
+      "etricValue\022\021\n\tmetric_id\030\001 \001(\005\022\022\n\nlong_va" +
+      "lue\030\002 \001(\003\022\024\n\014double_value\030\003 \001(\001*5\n\nRpcCh" +
+      "annel\022\017\n\013BIT_CONTROL\020\000\022\014\n\010BIT_DATA\020\001\022\010\n\004",
+      "USER\020\002*/\n\tQueryType\022\007\n\003SQL\020\001\022\013\n\007LOGICAL\020" +
+      "\002\022\014\n\010PHYSICAL\020\003*k\n\rFragmentState\022\013\n\007SEND" +
+      "ING\020\000\022\027\n\023AWAITING_ALLOCATION\020\001\022\013\n\007RUNNIN" +
+      "G\020\002\022\014\n\010FINISHED\020\003\022\r\n\tCANCELLED\020\004\022\n\n\006FAIL" +
+      "ED\020\005*\264\005\n\020CoreOperatorType\022\021\n\rSINGLE_SEND" +
+      "ER\020\000\022\024\n\020BROADCAST_SENDER\020\001\022\n\n\006FILTER\020\002\022\022" +
+      "\n\016HASH_AGGREGATE\020\003\022\r\n\tHASH_JOIN\020\004\022\016\n\nMER" +
+      "GE_JOIN\020\005\022\031\n\025HASH_PARTITION_SENDER\020\006\022\t\n\005" +
+      "LIMIT\020\007\022\024\n\020MERGING_RECEIVER\020\010\022\034\n\030ORDERED" +
+      "_PARTITION_SENDER\020\t\022\013\n\007PROJECT\020\n\022\026\n\022UNOR",
+      "DERED_RECEIVER\020\013\022\020\n\014RANGE_SENDER\020\014\022\n\n\006SC" +
+      "REEN\020\r\022\034\n\030SELECTION_VECTOR_REMOVER\020\016\022\027\n\023" +
+      "STREAMING_AGGREGATE\020\017\022\016\n\nTOP_N_SORT\020\020\022\021\n" +
+      "\rEXTERNAL_SORT\020\021\022\t\n\005TRACE\020\022\022\t\n\005UNION\020\023\022\014" +
+      "\n\010OLD_SORT\020\024\022\032\n\026PARQUET_ROW_GROUP_SCAN\020\025" +
+      "\022\021\n\rHIVE_SUB_SCAN\020\026\022\025\n\021SYSTEM_TABLE_SCAN" +
+      "\020\027\022\021\n\rMOCK_SUB_SCAN\020\030\022\022\n\016PARQUET_WRITER\020" +
+      "\031\022\023\n\017DIRECT_SUB_SCAN\020\032\022\017\n\013TEXT_WRITER\020\033\022" +
+      "\021\n\rTEXT_SUB_SCAN\020\034\022\021\n\rJSON_SUB_SCAN\020\035\022\030\n" +
+      "\024INFO_SCHEMA_SUB_SCAN\020\036\022\023\n\017COMPLEX_TO_JS",
+      "ON\020\037\022\025\n\021PRODUCER_CONSUMER\020 \022\022\n\016HBASE_SUB" +
+      "_SCAN\020!\022\n\n\006WINDOW\020\"B.\n\033org.apache.drill." +
+      "exec.protoB\rUserBitSharedH\001"
     };
     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
       new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@@ -18985,38 +19984,44 @@ public final class UserBitShared {
             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
               internal_static_exec_shared_QueryResult_descriptor,
               new java.lang.String[] { "QueryState", "QueryId", "IsLastChunk", "RowCount", "RecordsScan", "RecordsError", "SubmissionTime", "NodeStatus", "Error", "Def", "SchemaChanged", });
-          internal_static_exec_shared_QueryProfile_descriptor =
+          internal_static_exec_shared_QueryInfo_descriptor =
             getDescriptor().getMessageTypes().get(11);
+          internal_static_exec_shared_QueryInfo_fieldAccessorTable = new
+            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+              internal_static_exec_shared_QueryInfo_descriptor,
+              new java.lang.String[] { "Query", "Start", "State", "User", "Foreman", });
+          internal_static_exec_shared_QueryProfile_descriptor =
+            getDescriptor().getMessageTypes().get(12);
           internal_static_exec_shared_QueryProfile_fieldAccessorTable = new
             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
               internal_static_exec_shared_QueryProfile_descriptor,
               new java.lang.String[] { "Id", "Type", "Start", "End", "Query", "Plan", "Foreman", "State", "TotalFragments", "FinishedFragments", "FragmentProfile", });
           internal_static_exec_shared_MajorFragmentProfile_descriptor =
-            getDescriptor().getMessageTypes().get(12);
+            getDescriptor().getMessageTypes().get(13);
           internal_static_exec_shared_MajorFragmentProfile_fieldAccessorTable = new
             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
               internal_static_exec_shared_MajorFragmentProfile_descriptor,
               new java.lang.String[] { "MajorFragmentId", "MinorFragmentProfile", });
           internal_static_exec_shared_MinorFragmentProfile_descriptor =
-            getDescriptor().getMessageTypes().get(13);
+            getDescriptor().getMessageTypes().get(14);
           internal_static_exec_shared_MinorFragmentProfile_fieldAccessorTable = new
             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
               internal_static_exec_shared_MinorFragmentProfile_descriptor,
               new java.lang.String[] { "State", "Error", "MinorFragmentId", "OperatorProfile", "StartTime", "EndTime", "MemoryUsed", "MaxMemoryUsed", "Endpoint", });
           internal_static_exec_shared_OperatorProfile_descriptor =
-            getDescriptor().getMessageTypes().get(14);
+            getDescriptor().getMessageTypes().get(15);
           internal_static_exec_shared_OperatorProfile_fieldAccessorTable = new
             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
               internal_static_exec_shared_OperatorProfile_descriptor,
               new java.lang.String[] { "InputProfile", "OperatorId", "OperatorType", "SetupNanos", "ProcessNanos", "LocalMemoryAllocated", "Metric", "WaitNanos", });
           internal_static_exec_shared_StreamProfile_descriptor =
-            getDescriptor().getMessageTypes().get(15);
+            getDescriptor().getMessageTypes().get(16);
           internal_static_exec_shared_StreamProfile_fieldAccessorTable = new
             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
               internal_static_exec_shared_StreamProfile_descriptor,
               new java.lang.String[] { "Records", "Batches", "Schemas", });
           internal_static_exec_shared_MetricValue_descriptor =
-            getDescriptor().getMessageTypes().get(16);
+            getDescriptor().getMessageTypes().get(17);
           internal_static_exec_shared_MetricValue_fieldAccessorTable = new
             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
               internal_static_exec_shared_MetricValue_descriptor,

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/2eb72a7c/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryInfo.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryInfo.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryInfo.java
new file mode 100644
index 0000000..1c86ae7
--- /dev/null
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryInfo.java
@@ -0,0 +1,253 @@
+/**
+ * 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 QueryInfo implements Externalizable, Message<QueryInfo>, Schema<QueryInfo>
+{
+
+    public static Schema<QueryInfo> getSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    public static QueryInfo getDefaultInstance()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    static final QueryInfo DEFAULT_INSTANCE = new QueryInfo();
+
+    
+    private String query;
+    private long start;
+    private QueryResult.QueryState state;
+    private String user;
+    private DrillbitEndpoint foreman;
+
+    public QueryInfo()
+    {
+        
+    }
+
+    // getters and setters
+
+    // query
+
+    public String getQuery()
+    {
+        return query;
+    }
+
+    public QueryInfo setQuery(String query)
+    {
+        this.query = query;
+        return this;
+    }
+
+    // start
+
+    public long getStart()
+    {
+        return start;
+    }
+
+    public QueryInfo setStart(long start)
+    {
+        this.start = start;
+        return this;
+    }
+
+    // state
+
+    public QueryResult.QueryState getState()
+    {
+        return state == null ? QueryResult.QueryState.PENDING : state;
+    }
+
+    public QueryInfo setState(QueryResult.QueryState state)
+    {
+        this.state = state;
+        return this;
+    }
+
+    // user
+
+    public String getUser()
+    {
+        return user;
+    }
+
+    public QueryInfo setUser(String user)
+    {
+        this.user = user;
+        return this;
+    }
+
+    // foreman
+
+    public DrillbitEndpoint getForeman()
+    {
+        return foreman;
+    }
+
+    public QueryInfo setForeman(DrillbitEndpoint foreman)
+    {
+        this.foreman = foreman;
+        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<QueryInfo> cachedSchema()
+    {
+        return DEFAULT_INSTANCE;
+    }
+
+    // schema methods
+
+    public QueryInfo newMessage()
+    {
+        return new QueryInfo();
+    }
+
+    public Class<QueryInfo> typeClass()
+    {
+        return QueryInfo.class;
+    }
+
+    public String messageName()
+    {
+        return QueryInfo.class.getSimpleName();
+    }
+
+    public String messageFullName()
+    {
+        return QueryInfo.class.getName();
+    }
+
+    public boolean isInitialized(QueryInfo message)
+    {
+        return true;
+    }
+
+    public void mergeFrom(Input input, QueryInfo message) throws IOException
+    {
+        for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this))
+        {
+            switch(number)
+            {
+                case 0:
+                    return;
+                case 1:
+                    message.query = input.readString();
+                    break;
+                case 2:
+                    message.start = input.readInt64();
+                    break;
+                case 3:
+                    message.state = QueryResult.QueryState.valueOf(input.readEnum());
+                    break;
+                case 4:
+                    message.user = input.readString();
+                    break;
+                case 5:
+                    message.foreman = input.mergeObject(message.foreman, DrillbitEndpoint.getSchema());
+                    break;
+
+                default:
+                    input.handleUnknownField(number, this);
+            }   
+        }
+    }
+
+
+    public void writeTo(Output output, QueryInfo message) throws IOException
+    {
+        if(message.query != null)
+            output.writeString(1, message.query, false);
+
+        if(message.start != 0)
+            output.writeInt64(2, message.start, false);
+
+        if(message.state != null)
+             output.writeEnum(3, message.state.number, false);
+
+        if(message.user != null)
+            output.writeString(4, message.user, false);
+
+        if(message.foreman != null)
+             output.writeObject(5, message.foreman, DrillbitEndpoint.getSchema(), false);
+
+    }
+
+    public String getFieldName(int number)
+    {
+        switch(number)
+        {
+            case 1: return "query";
+            case 2: return "start";
+            case 3: return "state";
+            case 4: return "user";
+            case 5: return "foreman";
+            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("query", 1);
+        __fieldMap.put("start", 2);
+        __fieldMap.put("state", 3);
+        __fieldMap.put("user", 4);
+        __fieldMap.put("foreman", 5);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/2eb72a7c/protocol/src/main/protobuf/BitControl.proto
----------------------------------------------------------------------
diff --git a/protocol/src/main/protobuf/BitControl.proto b/protocol/src/main/protobuf/BitControl.proto
index 1fc5bb3..0424725 100644
--- a/protocol/src/main/protobuf/BitControl.proto
+++ b/protocol/src/main/protobuf/BitControl.proto
@@ -23,6 +23,7 @@ enum RpcType {
   REQ_FRAGMENT_STATUS = 8; // send a fragment status, return Ack
   REQ_BIT_STATUS = 9; // get bit status.
   REQ_QUERY_STATUS = 10;
+  REQ_QUERY_CANCEL = 15;
       
     // bit responses
   RESP_FRAGMENT_HANDLE = 11;

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/2eb72a7c/protocol/src/main/protobuf/UserBitShared.proto
----------------------------------------------------------------------
diff --git a/protocol/src/main/protobuf/UserBitShared.proto b/protocol/src/main/protobuf/UserBitShared.proto
index fc2e89f..3b85e9b 100644
--- a/protocol/src/main/protobuf/UserBitShared.proto
+++ b/protocol/src/main/protobuf/UserBitShared.proto
@@ -118,6 +118,13 @@ message QueryResult {
 	optional bool schema_changed = 11;
 }
 
+message QueryInfo {
+  optional string query = 1;
+  optional int64 start = 2;
+  optional QueryResult.QueryState state = 3;
+  optional string user = 4;
+  optional DrillbitEndpoint foreman = 5;
+}
 
 
 message QueryProfile {


Mime
View raw message