drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sudhe...@apache.org
Subject [2/5] drill git commit: DRILL-4792: Include session options used for a query as part of the profile
Date Wed, 02 Nov 2016 18:47:08 GMT
DRILL-4792: Include session options used for a query as part of the profile

closes #551


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/6782f0ad
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/6782f0ad
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/6782f0ad

Branch: refs/heads/master
Commit: 6782f0ade3344842c34c24bfc80aebeda6ef3df5
Parents: 5f34c96
Author: Arina Ielchiieva <arina.yelchiyeva@gmail.com>
Authored: Tue Jul 19 16:54:18 2016 +0000
Committer: Sudheesh Katkam <skatkam@maprtech.com>
Committed: Wed Nov 2 10:56:01 2016 -0700

----------------------------------------------------------------------
 .../drill/exec/server/options/OptionValue.java  |   4 +
 .../server/rest/profile/ProfileWrapper.java     |  19 +-
 .../drill/exec/work/foreman/QueryManager.java   |  16 +-
 .../src/main/resources/rest/profile/profile.ftl |  36 ++
 .../drill/exec/proto/SchemaUserBitShared.java   |  14 +
 .../apache/drill/exec/proto/UserBitShared.java  | 447 ++++++++++++++++---
 .../drill/exec/proto/beans/QueryInfo.java       |  22 +
 .../drill/exec/proto/beans/QueryProfile.java    |  22 +
 protocol/src/main/protobuf/UserBitShared.proto  |   2 +
 9 files changed, 513 insertions(+), 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/exec/java-exec/src/main/java/org/apache/drill/exec/server/options/OptionValue.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/server/options/OptionValue.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/server/options/OptionValue.java
index 8753a51..96fdf0c 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/server/options/OptionValue.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/server/options/OptionValue.java
@@ -99,6 +99,10 @@ public class OptionValue implements Comparable<OptionValue> {
     this.bool_val = bool_val;
   }
 
+  public String getName() {
+    return name;
+  }
+
   @JsonIgnore
   public Object getValue() {
     switch (kind) {

http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java
index f73ab90..84cff7a 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java
@@ -23,6 +23,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.drill.exec.proto.UserBitShared.CoreOperatorType;
 import org.apache.drill.exec.proto.UserBitShared.MajorFragmentProfile;
@@ -30,17 +31,22 @@ import org.apache.drill.exec.proto.UserBitShared.MinorFragmentProfile;
 import org.apache.drill.exec.proto.UserBitShared.OperatorProfile;
 import org.apache.drill.exec.proto.UserBitShared.QueryProfile;
 import org.apache.drill.exec.proto.helper.QueryIdHelper;
+import org.apache.drill.exec.server.options.OptionList;
+
+import static com.fasterxml.jackson.databind.SerializationFeature.INDENT_OUTPUT;
 
 /**
  * Wrapper class for a {@link #profile query profile}, so it to be presented through web
UI.
  */
 public class ProfileWrapper {
-//  private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ProfileWrapper.class);
+  private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ProfileWrapper.class);
+  private static final ObjectMapper mapper = new ObjectMapper().enable(INDENT_OUTPUT);
 
   private QueryProfile profile;
   private String id;
   private final List<FragmentWrapper> fragmentProfiles;
   private final List<OperatorWrapper> operatorProfiles;
+  private OptionList options;
 
   public ProfileWrapper(final QueryProfile profile) {
     this.profile = profile;
@@ -89,6 +95,13 @@ public class ProfileWrapper {
       ows.add(new OperatorWrapper(ip.getLeft(), opmap.get(ip)));
     }
     this.operatorProfiles = ows;
+
+    try {
+      options = mapper.readValue(profile.getOptionsJson(), OptionList.class);
+    } catch (Exception e) {
+      logger.error("Unable to deserialize query options", e);
+      options = new OptionList();
+    }
   }
 
   public boolean hasError() {
@@ -136,4 +149,8 @@ public class ProfileWrapper {
     }
     return sb.append("}").toString();
   }
+
+  public OptionList getOptionList() {
+    return options;
+  }
 }

http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
index b76fd7b..25b88b8 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
@@ -17,6 +17,8 @@
  */
 package org.apache.drill.exec.work.foreman;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import io.netty.buffer.ByteBuf;
 
 import java.util.List;
@@ -48,6 +50,7 @@ import org.apache.drill.exec.proto.helper.QueryIdHelper;
 import org.apache.drill.exec.rpc.RpcException;
 import org.apache.drill.exec.rpc.control.Controller;
 import org.apache.drill.exec.server.DrillbitContext;
+import org.apache.drill.exec.server.options.OptionList;
 import org.apache.drill.exec.store.sys.PersistentStore;
 import org.apache.drill.exec.store.sys.PersistentStoreConfig;
 import org.apache.drill.exec.store.sys.PersistentStoreProvider;
@@ -320,6 +323,7 @@ public class QueryManager implements AutoCloseable {
         .setUser(foreman.getQueryContext().getQueryUserName())
         .setForeman(foreman.getQueryContext().getCurrentEndpoint())
         .setStart(startTime)
+        .setOptionsJson(getQueryOptionsAsJson())
         .build();
   }
 
@@ -338,7 +342,8 @@ public class QueryManager implements AutoCloseable {
         .setStart(startTime)
         .setEnd(endTime)
         .setTotalFragments(fragmentDataSet.size())
-        .setFinishedFragments(finishedFragments.get());
+        .setFinishedFragments(finishedFragments.get())
+        .setOptionsJson(getQueryOptionsAsJson());
 
     if (ex != null) {
       profileBuilder.setError(ex.getMessage(false));
@@ -358,6 +363,15 @@ public class QueryManager implements AutoCloseable {
     return profileBuilder.build();
   }
 
+  private String getQueryOptionsAsJson() {
+    try {
+      OptionList optionList = foreman.getQueryContext().getOptions().getOptionList();
+      return foreman.getQueryContext().getLpPersistence().getMapper().writeValueAsString(optionList);
+    } catch (JsonProcessingException e) {
+      throw new DrillRuntimeException("Error while trying to convert option list to json
string", e);
+    }
+  }
+
   private class OuterIter implements IntObjectPredicate<IntObjectHashMap<FragmentData>>
{
     private final QueryProfile.Builder profileBuilder;
 

http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/exec/java-exec/src/main/resources/rest/profile/profile.ftl
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/resources/rest/profile/profile.ftl b/exec/java-exec/src/main/resources/rest/profile/profile.ftl
index 88dbe21..ef971fb 100644
--- a/exec/java-exec/src/main/resources/rest/profile/profile.ftl
+++ b/exec/java-exec/src/main/resources/rest/profile/profile.ftl
@@ -107,6 +107,42 @@
   <p>FOREMAN: ${model.getProfile().getForeman().getAddress()}</p>
   <p>TOTAL FRAGMENTS: ${model.getProfile().getTotalFragments()}</p>
 
+  <#if (model.getOptionList()?size > 0)>
+    <div class="page-header"></div>
+    <h3>Session Options</h3>
+    <div class="panel-group" id="session-options-accordion">
+      <div class="panel panel-default">
+        <div class="panel-heading">
+          <h4 class="panel-title">
+            <a data-toggle="collapse" href="#session-options-overview">
+              Overview
+            </a>
+          </h4>
+        </div>
+        <div id="session-options-overview" class="panel-collapse collapse in">
+          <div class="panel-body">
+            <table class="table table-bordered">
+              <thead>
+                <tr>
+                  <th>Name</th>
+                  <th>Value</th>
+                </tr>
+              </thead>
+              <tbody>
+                <#list model.getOptionList() as option>
+                  <tr>
+                    <td>${option.getName()}</td>
+                    <td>${option.getValue()?c}</td>
+                  </tr>
+                </#list>
+              </tbody>
+            </table>
+          </div>
+        </div>
+      </div>
+    </div>
+  </#if>
+
   <div class="page-header"></div>
   <h3>Fragment Profiles</h3>
 

http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/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 037484d..f31110d 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
@@ -1616,6 +1616,8 @@ public final class SchemaUserBitShared
                 if(message.hasForeman())
                     output.writeObject(5, message.getForeman(), org.apache.drill.exec.proto.SchemaCoordinationProtos.DrillbitEndpoint.WRITE,
false);
 
+                if(message.hasOptionsJson())
+                    output.writeString(6, message.getOptionsJson(), false);
             }
             public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.QueryInfo
message)
             {
@@ -1671,6 +1673,9 @@ public final class SchemaUserBitShared
                             builder.setForeman(input.mergeObject(org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.newBuilder(),
org.apache.drill.exec.proto.SchemaCoordinationProtos.DrillbitEndpoint.MERGE));
 
                             break;
+                        case 6:
+                            builder.setOptionsJson(input.readString());
+                            break;
                         default:
                             input.handleUnknownField(number, this);
                     }
@@ -1716,6 +1721,7 @@ public final class SchemaUserBitShared
                 case 3: return "state";
                 case 4: return "user";
                 case 5: return "foreman";
+                case 6: return "optionsJson";
                 default: return null;
             }
         }
@@ -1732,6 +1738,7 @@ public final class SchemaUserBitShared
             fieldMap.put("state", 3);
             fieldMap.put("user", 4);
             fieldMap.put("foreman", 5);
+            fieldMap.put("optionsJson", 6);
         }
     }
 
@@ -1781,6 +1788,8 @@ public final class SchemaUserBitShared
                     output.writeString(15, message.getErrorId(), false);
                 if(message.hasErrorNode())
                     output.writeString(16, message.getErrorNode(), false);
+                if(message.hasOptionsJson())
+                    output.writeString(17, message.getOptionsJson(), false);
             }
             public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.QueryProfile
message)
             {
@@ -1871,6 +1880,9 @@ public final class SchemaUserBitShared
                         case 16:
                             builder.setErrorNode(input.readString());
                             break;
+                        case 17:
+                            builder.setOptionsJson(input.readString());
+                            break;
                         default:
                             input.handleUnknownField(number, this);
                     }
@@ -1927,6 +1939,7 @@ public final class SchemaUserBitShared
                 case 14: return "verboseError";
                 case 15: return "errorId";
                 case 16: return "errorNode";
+                case 17: return "optionsJson";
                 default: return null;
             }
         }
@@ -1954,6 +1967,7 @@ public final class SchemaUserBitShared
             fieldMap.put("verboseError", 14);
             fieldMap.put("errorId", 15);
             fieldMap.put("errorNode", 16);
+            fieldMap.put("optionsJson", 17);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/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 f0c783b..9a61cbb 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
@@ -11999,6 +11999,21 @@ public final class UserBitShared {
      * <code>optional .exec.DrillbitEndpoint foreman = 5;</code>
      */
     org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpointOrBuilder getForemanOrBuilder();
+
+    // optional string options_json = 6;
+    /**
+     * <code>optional string options_json = 6;</code>
+     */
+    boolean hasOptionsJson();
+    /**
+     * <code>optional string options_json = 6;</code>
+     */
+    java.lang.String getOptionsJson();
+    /**
+     * <code>optional string options_json = 6;</code>
+     */
+    com.google.protobuf.ByteString
+        getOptionsJsonBytes();
   }
   /**
    * Protobuf type {@code exec.shared.QueryInfo}
@@ -12090,6 +12105,11 @@ public final class UserBitShared {
               bitField0_ |= 0x00000010;
               break;
             }
+            case 50: {
+              bitField0_ |= 0x00000020;
+              optionsJson_ = input.readBytes();
+              break;
+            }
           }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -12270,12 +12290,56 @@ public final class UserBitShared {
       return foreman_;
     }
 
+    // optional string options_json = 6;
+    public static final int OPTIONS_JSON_FIELD_NUMBER = 6;
+    private java.lang.Object optionsJson_;
+    /**
+     * <code>optional string options_json = 6;</code>
+     */
+    public boolean hasOptionsJson() {
+      return ((bitField0_ & 0x00000020) == 0x00000020);
+    }
+    /**
+     * <code>optional string options_json = 6;</code>
+     */
+    public java.lang.String getOptionsJson() {
+      java.lang.Object ref = optionsJson_;
+      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()) {
+          optionsJson_ = s;
+        }
+        return s;
+      }
+    }
+    /**
+     * <code>optional string options_json = 6;</code>
+     */
+    public com.google.protobuf.ByteString
+        getOptionsJsonBytes() {
+      java.lang.Object ref = optionsJson_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        optionsJson_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
     private void initFields() {
       query_ = "";
       start_ = 0L;
       state_ = org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState.STARTING;
       user_ = "-";
       foreman_ = org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint.getDefaultInstance();
+      optionsJson_ = "";
     }
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
@@ -12304,6 +12368,9 @@ public final class UserBitShared {
       if (((bitField0_ & 0x00000010) == 0x00000010)) {
         output.writeMessage(5, foreman_);
       }
+      if (((bitField0_ & 0x00000020) == 0x00000020)) {
+        output.writeBytes(6, getOptionsJsonBytes());
+      }
       getUnknownFields().writeTo(output);
     }
 
@@ -12333,6 +12400,10 @@ public final class UserBitShared {
         size += com.google.protobuf.CodedOutputStream
           .computeMessageSize(5, foreman_);
       }
+      if (((bitField0_ & 0x00000020) == 0x00000020)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(6, getOptionsJsonBytes());
+      }
       size += getUnknownFields().getSerializedSize();
       memoizedSerializedSize = size;
       return size;
@@ -12464,6 +12535,8 @@ public final class UserBitShared {
           foremanBuilder_.clear();
         }
         bitField0_ = (bitField0_ & ~0x00000010);
+        optionsJson_ = "";
+        bitField0_ = (bitField0_ & ~0x00000020);
         return this;
       }
 
@@ -12516,6 +12589,10 @@ public final class UserBitShared {
         } else {
           result.foreman_ = foremanBuilder_.build();
         }
+        if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
+          to_bitField0_ |= 0x00000020;
+        }
+        result.optionsJson_ = optionsJson_;
         result.bitField0_ = to_bitField0_;
         onBuilt();
         return result;
@@ -12551,6 +12628,11 @@ public final class UserBitShared {
         if (other.hasForeman()) {
           mergeForeman(other.getForeman());
         }
+        if (other.hasOptionsJson()) {
+          bitField0_ |= 0x00000020;
+          optionsJson_ = other.optionsJson_;
+          onChanged();
+        }
         this.mergeUnknownFields(other.getUnknownFields());
         return this;
       }
@@ -12912,6 +12994,80 @@ public final class UserBitShared {
         return foremanBuilder_;
       }
 
+      // optional string options_json = 6;
+      private java.lang.Object optionsJson_ = "";
+      /**
+       * <code>optional string options_json = 6;</code>
+       */
+      public boolean hasOptionsJson() {
+        return ((bitField0_ & 0x00000020) == 0x00000020);
+      }
+      /**
+       * <code>optional string options_json = 6;</code>
+       */
+      public java.lang.String getOptionsJson() {
+        java.lang.Object ref = optionsJson_;
+        if (!(ref instanceof java.lang.String)) {
+          java.lang.String s = ((com.google.protobuf.ByteString) ref)
+              .toStringUtf8();
+          optionsJson_ = s;
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <code>optional string options_json = 6;</code>
+       */
+      public com.google.protobuf.ByteString
+          getOptionsJsonBytes() {
+        java.lang.Object ref = optionsJson_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          optionsJson_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>optional string options_json = 6;</code>
+       */
+      public Builder setOptionsJson(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000020;
+        optionsJson_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string options_json = 6;</code>
+       */
+      public Builder clearOptionsJson() {
+        bitField0_ = (bitField0_ & ~0x00000020);
+        optionsJson_ = getDefaultInstance().getOptionsJson();
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string options_json = 6;</code>
+       */
+      public Builder setOptionsJsonBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000020;
+        optionsJson_ = value;
+        onChanged();
+        return this;
+      }
+
       // @@protoc_insertion_point(builder_scope:exec.shared.QueryInfo)
     }
 
@@ -13143,6 +13299,21 @@ public final class UserBitShared {
      */
     com.google.protobuf.ByteString
         getErrorNodeBytes();
+
+    // optional string options_json = 17;
+    /**
+     * <code>optional string options_json = 17;</code>
+     */
+    boolean hasOptionsJson();
+    /**
+     * <code>optional string options_json = 17;</code>
+     */
+    java.lang.String getOptionsJson();
+    /**
+     * <code>optional string options_json = 17;</code>
+     */
+    com.google.protobuf.ByteString
+        getOptionsJsonBytes();
   }
   /**
    * Protobuf type {@code exec.shared.QueryProfile}
@@ -13306,6 +13477,11 @@ public final class UserBitShared {
               errorNode_ = input.readBytes();
               break;
             }
+            case 138: {
+              bitField0_ |= 0x00008000;
+              optionsJson_ = input.readBytes();
+              break;
+            }
           }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -13826,6 +14002,49 @@ public final class UserBitShared {
       }
     }
 
+    // optional string options_json = 17;
+    public static final int OPTIONS_JSON_FIELD_NUMBER = 17;
+    private java.lang.Object optionsJson_;
+    /**
+     * <code>optional string options_json = 17;</code>
+     */
+    public boolean hasOptionsJson() {
+      return ((bitField0_ & 0x00008000) == 0x00008000);
+    }
+    /**
+     * <code>optional string options_json = 17;</code>
+     */
+    public java.lang.String getOptionsJson() {
+      java.lang.Object ref = optionsJson_;
+      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()) {
+          optionsJson_ = s;
+        }
+        return s;
+      }
+    }
+    /**
+     * <code>optional string options_json = 17;</code>
+     */
+    public com.google.protobuf.ByteString
+        getOptionsJsonBytes() {
+      java.lang.Object ref = optionsJson_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        optionsJson_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
     private void initFields() {
       id_ = org.apache.drill.exec.proto.UserBitShared.QueryId.getDefaultInstance();
       type_ = org.apache.drill.exec.proto.UserBitShared.QueryType.SQL;
@@ -13843,6 +14062,7 @@ public final class UserBitShared {
       verboseError_ = "";
       errorId_ = "";
       errorNode_ = "";
+      optionsJson_ = "";
     }
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
@@ -13904,6 +14124,9 @@ public final class UserBitShared {
       if (((bitField0_ & 0x00004000) == 0x00004000)) {
         output.writeBytes(16, getErrorNodeBytes());
       }
+      if (((bitField0_ & 0x00008000) == 0x00008000)) {
+        output.writeBytes(17, getOptionsJsonBytes());
+      }
       getUnknownFields().writeTo(output);
     }
 
@@ -13977,6 +14200,10 @@ public final class UserBitShared {
         size += com.google.protobuf.CodedOutputStream
           .computeBytesSize(16, getErrorNodeBytes());
       }
+      if (((bitField0_ & 0x00008000) == 0x00008000)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(17, getOptionsJsonBytes());
+      }
       size += getUnknownFields().getSerializedSize();
       memoizedSerializedSize = size;
       return size;
@@ -14140,6 +14367,8 @@ public final class UserBitShared {
         bitField0_ = (bitField0_ & ~0x00004000);
         errorNode_ = "";
         bitField0_ = (bitField0_ & ~0x00008000);
+        optionsJson_ = "";
+        bitField0_ = (bitField0_ & ~0x00010000);
         return this;
       }
 
@@ -14245,6 +14474,10 @@ public final class UserBitShared {
           to_bitField0_ |= 0x00004000;
         }
         result.errorNode_ = errorNode_;
+        if (((from_bitField0_ & 0x00010000) == 0x00010000)) {
+          to_bitField0_ |= 0x00008000;
+        }
+        result.optionsJson_ = optionsJson_;
         result.bitField0_ = to_bitField0_;
         onBuilt();
         return result;
@@ -14346,6 +14579,11 @@ public final class UserBitShared {
           errorNode_ = other.errorNode_;
           onChanged();
         }
+        if (other.hasOptionsJson()) {
+          bitField0_ |= 0x00010000;
+          optionsJson_ = other.optionsJson_;
+          onChanged();
+        }
         this.mergeUnknownFields(other.getUnknownFields());
         return this;
       }
@@ -15569,6 +15807,80 @@ public final class UserBitShared {
         return this;
       }
 
+      // optional string options_json = 17;
+      private java.lang.Object optionsJson_ = "";
+      /**
+       * <code>optional string options_json = 17;</code>
+       */
+      public boolean hasOptionsJson() {
+        return ((bitField0_ & 0x00010000) == 0x00010000);
+      }
+      /**
+       * <code>optional string options_json = 17;</code>
+       */
+      public java.lang.String getOptionsJson() {
+        java.lang.Object ref = optionsJson_;
+        if (!(ref instanceof java.lang.String)) {
+          java.lang.String s = ((com.google.protobuf.ByteString) ref)
+              .toStringUtf8();
+          optionsJson_ = s;
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <code>optional string options_json = 17;</code>
+       */
+      public com.google.protobuf.ByteString
+          getOptionsJsonBytes() {
+        java.lang.Object ref = optionsJson_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          optionsJson_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>optional string options_json = 17;</code>
+       */
+      public Builder setOptionsJson(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00010000;
+        optionsJson_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string options_json = 17;</code>
+       */
+      public Builder clearOptionsJson() {
+        bitField0_ = (bitField0_ & ~0x00010000);
+        optionsJson_ = getDefaultInstance().getOptionsJson();
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string options_json = 17;</code>
+       */
+      public Builder setOptionsJsonBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00010000;
+        optionsJson_ = value;
+        onChanged();
+        return this;
+      }
+
       // @@protoc_insertion_point(builder_scope:exec.shared.QueryProfile)
     }
 
@@ -22219,73 +22531,74 @@ public final class UserBitShared {
       "ENQUEUED\020\006\"p\n\tQueryData\022&\n\010query_id\030\001 \001(" +
       "\0132\024.exec.shared.QueryId\022\021\n\trow_count\030\002 \001" +
       "(\005\022(\n\003def\030\003 \001(\0132\033.exec.shared.RecordBatc" +
-      "hDef\"\227\001\n\tQueryInfo\022\r\n\005query\030\001 \001(\t\022\r\n\005sta" +
+      "hDef\"\255\001\n\tQueryInfo\022\r\n\005query\030\001 \001(\t\022\r\n\005sta" +
       "rt\030\002 \001(\003\0222\n\005state\030\003 \001(\0162#.exec.shared.Qu",
       "eryResult.QueryState\022\017\n\004user\030\004 \001(\t:\001-\022\'\n" +
-      "\007foreman\030\005 \001(\0132\026.exec.DrillbitEndpoint\"\272" +
-      "\003\n\014QueryProfile\022 \n\002id\030\001 \001(\0132\024.exec.share" +
-      "d.QueryId\022$\n\004type\030\002 \001(\0162\026.exec.shared.Qu" +
-      "eryType\022\r\n\005start\030\003 \001(\003\022\013\n\003end\030\004 \001(\003\022\r\n\005q"
+
-      "uery\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(\016" +
-      "2#.exec.shared.QueryResult.QueryState\022\027\n" +
-      "\017total_fragments\030\t \001(\005\022\032\n\022finished_fragm" +
-      "ents\030\n \001(\005\022;\n\020fragment_profile\030\013 \003(\0132!.e",
-      "xec.shared.MajorFragmentProfile\022\017\n\004user\030" +
-      "\014 \001(\t:\001-\022\r\n\005error\030\r \001(\t\022\024\n\014verboseError\030" +
-      "\016 \001(\t\022\020\n\010error_id\030\017 \001(\t\022\022\n\nerror_node\030\020 "
+
-      "\001(\t\"t\n\024MajorFragmentProfile\022\031\n\021major_fra" +
-      "gment_id\030\001 \001(\005\022A\n\026minor_fragment_profile" +
-      "\030\002 \003(\0132!.exec.shared.MinorFragmentProfil" +
-      "e\"\350\002\n\024MinorFragmentProfile\022)\n\005state\030\001 \001(" +
-      "\0162\032.exec.shared.FragmentState\022(\n\005error\030\002" +
-      " \001(\0132\031.exec.shared.DrillPBError\022\031\n\021minor" +
-      "_fragment_id\030\003 \001(\005\0226\n\020operator_profile\030\004",
-      " \003(\0132\034.exec.shared.OperatorProfile\022\022\n\nst" +
-      "art_time\030\005 \001(\003\022\020\n\010end_time\030\006 \001(\003\022\023\n\013memo"
+
-      "ry_used\030\007 \001(\003\022\027\n\017max_memory_used\030\010 \001(\003\022(" +
-      "\n\010endpoint\030\t \001(\0132\026.exec.DrillbitEndpoint" +
-      "\022\023\n\013last_update\030\n \001(\003\022\025\n\rlast_progress\030\013" +
-      " \001(\003\"\377\001\n\017OperatorProfile\0221\n\rinput_profil" +
-      "e\030\001 \003(\0132\032.exec.shared.StreamProfile\022\023\n\013o" +
-      "perator_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#\n\033peak_local_memory_allocated\030\007 \001(\003",
-      "\022(\n\006metric\030\010 \003(\0132\030.exec.shared.MetricVal" +
-      "ue\022\022\n\nwait_nanos\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\007sch"
+
-      "emas\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\")\n\010Registry\022\035\n\003jar\030\001 \003(\0132\020.exec.s"
+
-      "hared.Jar\"/\n\003Jar\022\014\n\004name\030\001 \001(\t\022\032\n\022functi" +
-      "on_signature\030\002 \003(\t*5\n\nRpcChannel\022\017\n\013BIT_" +
-      "CONTROL\020\000\022\014\n\010BIT_DATA\020\001\022\010\n\004USER\020\002*V\n\tQue"
+
-      "ryType\022\007\n\003SQL\020\001\022\013\n\007LOGICAL\020\002\022\014\n\010PHYSICAL",
-      "\020\003\022\r\n\tEXECUTION\020\004\022\026\n\022PREPARED_STATEMENT\020" +
-      "\005*\207\001\n\rFragmentState\022\013\n\007SENDING\020\000\022\027\n\023AWAI" +
-      "TING_ALLOCATION\020\001\022\013\n\007RUNNING\020\002\022\014\n\010FINISH" +
-      "ED\020\003\022\r\n\tCANCELLED\020\004\022\n\n\006FAILED\020\005\022\032\n\026CANCE"
+
-      "LLATION_REQUESTED\020\006*\335\005\n\020CoreOperatorType" +
-      "\022\021\n\rSINGLE_SENDER\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\tHAS" +
-      "H_JOIN\020\004\022\016\n\nMERGE_JOIN\020\005\022\031\n\025HASH_PARTITI" +
-      "ON_SENDER\020\006\022\t\n\005LIMIT\020\007\022\024\n\020MERGING_RECEIV" +
-      "ER\020\010\022\034\n\030ORDERED_PARTITION_SENDER\020\t\022\013\n\007PR",
-      "OJECT\020\n\022\026\n\022UNORDERED_RECEIVER\020\013\022\020\n\014RANGE" +
-      "_SENDER\020\014\022\n\n\006SCREEN\020\r\022\034\n\030SELECTION_VECTO" +
-      "R_REMOVER\020\016\022\027\n\023STREAMING_AGGREGATE\020\017\022\016\n\n" +
-      "TOP_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_R"
+
-      "OW_GROUP_SCAN\020\025\022\021\n\rHIVE_SUB_SCAN\020\026\022\025\n\021SY" +
-      "STEM_TABLE_SCAN\020\027\022\021\n\rMOCK_SUB_SCAN\020\030\022\022\n\016" +
-      "PARQUET_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\rJSO" +
-      "N_SUB_SCAN\020\035\022\030\n\024INFO_SCHEMA_SUB_SCAN\020\036\022\023",
-      "\n\017COMPLEX_TO_JSON\020\037\022\025\n\021PRODUCER_CONSUMER" +
-      "\020 \022\022\n\016HBASE_SUB_SCAN\020!\022\n\n\006WINDOW\020\"\022\024\n\020NE" +
-      "STED_LOOP_JOIN\020#\022\021\n\rAVRO_SUB_SCAN\020$B.\n\033o" +
-      "rg.apache.drill.exec.protoB\rUserBitShare" +
-      "dH\001"
+      "\007foreman\030\005 \001(\0132\026.exec.DrillbitEndpoint\022\024" +
+      "\n\014options_json\030\006 \001(\t\"\320\003\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.DrillbitE" +
+      "ndpoint\0222\n\005state\030\010 \001(\0162#.exec.shared.Que" +
+      "ryResult.QueryState\022\027\n\017total_fragments\030\t" +
+      " \001(\005\022\032\n\022finished_fragments\030\n \001(\005\022;\n\020frag",
+      "ment_profile\030\013 \003(\0132!.exec.shared.MajorFr" +
+      "agmentProfile\022\017\n\004user\030\014 \001(\t:\001-\022\r\n\005error\030" +
+      "\r \001(\t\022\024\n\014verboseError\030\016 \001(\t\022\020\n\010error_id\030" +
+      "\017 \001(\t\022\022\n\nerror_node\030\020 \001(\t\022\024\n\014options_jso" +
+      "n\030\021 \001(\t\"t\n\024MajorFragmentProfile\022\031\n\021major" +
+      "_fragment_id\030\001 \001(\005\022A\n\026minor_fragment_pro" +
+      "file\030\002 \003(\0132!.exec.shared.MinorFragmentPr" +
+      "ofile\"\350\002\n\024MinorFragmentProfile\022)\n\005state\030" +
+      "\001 \001(\0162\032.exec.shared.FragmentState\022(\n\005err" +
+      "or\030\002 \001(\0132\031.exec.shared.DrillPBError\022\031\n\021m",
+      "inor_fragment_id\030\003 \001(\005\0226\n\020operator_profi" +
+      "le\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\013"
+
+      "memory_used\030\007 \001(\003\022\027\n\017max_memory_used\030\010 \001" +
+      "(\003\022(\n\010endpoint\030\t \001(\0132\026.exec.DrillbitEndp" +
+      "oint\022\023\n\013last_update\030\n \001(\003\022\025\n\rlast_progre" +
+      "ss\030\013 \001(\003\"\377\001\n\017OperatorProfile\0221\n\rinput_pr" +
+      "ofile\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_nanos\030\005 \001(\003\022\025\n\rprocess_nano",
+      "s\030\006 \001(\003\022#\n\033peak_local_memory_allocated\030\007" +
+      " \001(\003\022(\n\006metric\030\010 \003(\0132\030.exec.shared.Metri" +
+      "cValue\022\022\n\nwait_nanos\030\t \001(\003\"B\n\rStreamProf" +
+      "ile\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\013MetricValue\022\021\n\tmetric_" +
+      "id\030\001 \001(\005\022\022\n\nlong_value\030\002 \001(\003\022\024\n\014double_v"
+
+      "alue\030\003 \001(\001\")\n\010Registry\022\035\n\003jar\030\001 \003(\0132\020.ex"
+
+      "ec.shared.Jar\"/\n\003Jar\022\014\n\004name\030\001 \001(\t\022\032\n\022fu" +
+      "nction_signature\030\002 \003(\t*5\n\nRpcChannel\022\017\n\013" +
+      "BIT_CONTROL\020\000\022\014\n\010BIT_DATA\020\001\022\010\n\004USER\020\002*V\n",
+      "\tQueryType\022\007\n\003SQL\020\001\022\013\n\007LOGICAL\020\002\022\014\n\010PHYS"
+
+      "ICAL\020\003\022\r\n\tEXECUTION\020\004\022\026\n\022PREPARED_STATEM" +
+      "ENT\020\005*\207\001\n\rFragmentState\022\013\n\007SENDING\020\000\022\027\n\023"
+
+      "AWAITING_ALLOCATION\020\001\022\013\n\007RUNNING\020\002\022\014\n\010FI" +
+      "NISHED\020\003\022\r\n\tCANCELLED\020\004\022\n\n\006FAILED\020\005\022\032\n\026C"
+
+      "ANCELLATION_REQUESTED\020\006*\335\005\n\020CoreOperator" +
+      "Type\022\021\n\rSINGLE_SENDER\020\000\022\024\n\020BROADCAST_SEN" +
+      "DER\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\nMERGE_JOIN\020\005\022\031\n\025HASH_PAR" +
+      "TITION_SENDER\020\006\022\t\n\005LIMIT\020\007\022\024\n\020MERGING_RE",
+      "CEIVER\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\014R" +
+      "ANGE_SENDER\020\014\022\n\n\006SCREEN\020\r\022\034\n\030SELECTION_V" +
+      "ECTOR_REMOVER\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\005T" +
+      "RACE\020\022\022\t\n\005UNION\020\023\022\014\n\010OLD_SORT\020\024\022\032\n\026PARQU"
+
+      "ET_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_JSON\020\037\022\025\n\021PRODUCER_CONS" +
+      "UMER\020 \022\022\n\016HBASE_SUB_SCAN\020!\022\n\n\006WINDOW\020\"\022\024" +
+      "\n\020NESTED_LOOP_JOIN\020#\022\021\n\rAVRO_SUB_SCAN\020$B" +
+      ".\n\033org.apache.drill.exec.protoB\rUserBitS" +
+      "haredH\001"
     };
     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
       new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@@ -22369,13 +22682,13 @@ public final class UserBitShared {
           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", });
+              new java.lang.String[] { "Query", "Start", "State", "User", "Foreman", "OptionsJson",
});
           internal_static_exec_shared_QueryProfile_descriptor =
             getDescriptor().getMessageTypes().get(13);
           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", "User", "Error", "VerboseError",
"ErrorId", "ErrorNode", });
+              new java.lang.String[] { "Id", "Type", "Start", "End", "Query", "Plan", "Foreman",
"State", "TotalFragments", "FinishedFragments", "FragmentProfile", "User", "Error", "VerboseError",
"ErrorId", "ErrorNode", "OptionsJson", });
           internal_static_exec_shared_MajorFragmentProfile_descriptor =
             getDescriptor().getMessageTypes().get(14);
           internal_static_exec_shared_MajorFragmentProfile_fieldAccessorTable = new

http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/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
index 612b483..4331ca3 100644
--- 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
@@ -54,6 +54,7 @@ public final class QueryInfo implements Externalizable, Message<QueryInfo>,
Sche
     private QueryResult.QueryState state;
     private String user = DEFAULT_USER;
     private DrillbitEndpoint foreman;
+    private String optionsJson;
 
     public QueryInfo()
     {
@@ -127,6 +128,19 @@ public final class QueryInfo implements Externalizable, Message<QueryInfo>,
Sche
         return this;
     }
 
+    // optionsJson
+
+    public String getOptionsJson()
+    {
+        return optionsJson;
+    }
+
+    public QueryInfo setOptionsJson(String optionsJson)
+    {
+        this.optionsJson = optionsJson;
+        return this;
+    }
+
     // java serialization
 
     public void readExternal(ObjectInput in) throws IOException
@@ -197,6 +211,9 @@ public final class QueryInfo implements Externalizable, Message<QueryInfo>,
Sche
                     message.foreman = input.mergeObject(message.foreman, DrillbitEndpoint.getSchema());
                     break;
 
+                case 6:
+                    message.optionsJson = input.readString();
+                    break;
                 default:
                     input.handleUnknownField(number, this);
             }   
@@ -221,6 +238,9 @@ public final class QueryInfo implements Externalizable, Message<QueryInfo>,
Sche
         if(message.foreman != null)
              output.writeObject(5, message.foreman, DrillbitEndpoint.getSchema(), false);
 
+
+        if(message.optionsJson != null)
+            output.writeString(6, message.optionsJson, false);
     }
 
     public String getFieldName(int number)
@@ -232,6 +252,7 @@ public final class QueryInfo implements Externalizable, Message<QueryInfo>,
Sche
             case 3: return "state";
             case 4: return "user";
             case 5: return "foreman";
+            case 6: return "optionsJson";
             default: return null;
         }
     }
@@ -250,6 +271,7 @@ public final class QueryInfo implements Externalizable, Message<QueryInfo>,
Sche
         __fieldMap.put("state", 3);
         __fieldMap.put("user", 4);
         __fieldMap.put("foreman", 5);
+        __fieldMap.put("optionsJson", 6);
     }
     
 }

http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryProfile.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryProfile.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryProfile.java
index d3fac19..150db26 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryProfile.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/QueryProfile.java
@@ -67,6 +67,7 @@ public final class QueryProfile implements Externalizable, Message<QueryProfile>
     private String verboseError;
     private String errorId;
     private String errorNode;
+    private String optionsJson;
 
     public QueryProfile()
     {
@@ -283,6 +284,19 @@ public final class QueryProfile implements Externalizable, Message<QueryProfile>
         return this;
     }
 
+    // optionsJson
+
+    public String getOptionsJson()
+    {
+        return optionsJson;
+    }
+
+    public QueryProfile setOptionsJson(String optionsJson)
+    {
+        this.optionsJson = optionsJson;
+        return this;
+    }
+
     // java serialization
 
     public void readExternal(ObjectInput in) throws IOException
@@ -390,6 +404,9 @@ public final class QueryProfile implements Externalizable, Message<QueryProfile>
                 case 16:
                     message.errorNode = input.readString();
                     break;
+                case 17:
+                    message.optionsJson = input.readString();
+                    break;
                 default:
                     input.handleUnknownField(number, this);
             }   
@@ -455,6 +472,9 @@ public final class QueryProfile implements Externalizable, Message<QueryProfile>
 
         if(message.errorNode != null)
             output.writeString(16, message.errorNode, false);
+
+        if(message.optionsJson != null)
+            output.writeString(17, message.optionsJson, false);
     }
 
     public String getFieldName(int number)
@@ -477,6 +497,7 @@ public final class QueryProfile implements Externalizable, Message<QueryProfile>
             case 14: return "verboseError";
             case 15: return "errorId";
             case 16: return "errorNode";
+            case 17: return "optionsJson";
             default: return null;
         }
     }
@@ -506,6 +527,7 @@ public final class QueryProfile implements Externalizable, Message<QueryProfile>
         __fieldMap.put("verboseError", 14);
         __fieldMap.put("errorId", 15);
         __fieldMap.put("errorNode", 16);
+        __fieldMap.put("optionsJson", 17);
     }
     
 }

http://git-wip-us.apache.org/repos/asf/drill/blob/6782f0ad/protocol/src/main/protobuf/UserBitShared.proto
----------------------------------------------------------------------
diff --git a/protocol/src/main/protobuf/UserBitShared.proto b/protocol/src/main/protobuf/UserBitShared.proto
index 03b1a0b..5efca2d 100644
--- a/protocol/src/main/protobuf/UserBitShared.proto
+++ b/protocol/src/main/protobuf/UserBitShared.proto
@@ -185,6 +185,7 @@ message QueryInfo {
   optional QueryResult.QueryState state = 3;
   optional string user = 4 [default = "-"];
   optional DrillbitEndpoint foreman = 5;
+  optional string options_json = 6;
 }
 
 
@@ -205,6 +206,7 @@ message QueryProfile {
   optional string verboseError = 14;
   optional string error_id = 15;
   optional string error_node = 16;
+  optional string options_json = 17;
 }
 
 message MajorFragmentProfile {


Mime
View raw message