incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [4/6] Adding thrift api calls for getting status of executing commands and the cancel api as well.
Date Mon, 08 Sep 2014 12:48:42 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/77a4f849/blur-thrift/src/main/java/org/apache/blur/thrift/generated/CommandStatus.java
----------------------------------------------------------------------
diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/CommandStatus.java
b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/CommandStatus.java
new file mode 100644
index 0000000..0c0d422
--- /dev/null
+++ b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/CommandStatus.java
@@ -0,0 +1,826 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.blur.thrift.generated;
+
+/**
+ * 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.
+ */
+
+
+
+import org.apache.blur.thirdparty.thrift_0_9_0.scheme.IScheme;
+import org.apache.blur.thirdparty.thrift_0_9_0.scheme.SchemeFactory;
+import org.apache.blur.thirdparty.thrift_0_9_0.scheme.StandardScheme;
+
+import org.apache.blur.thirdparty.thrift_0_9_0.scheme.TupleScheme;
+import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TTupleProtocol;
+import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolException;
+import org.apache.blur.thirdparty.thrift_0_9_0.EncodingUtils;
+import org.apache.blur.thirdparty.thrift_0_9_0.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+
+public class CommandStatus implements org.apache.blur.thirdparty.thrift_0_9_0.TBase<CommandStatus,
CommandStatus._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct STRUCT_DESC
= new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct("CommandStatus");
+
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField EXECUTION_ID_FIELD_DESC
= new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("executionId", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING,
(short)1);
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField TABLE_FIELD_DESC
= new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("table", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING,
(short)2);
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField COMMAND_NAME_FIELD_DESC
= new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("commandName", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING,
(short)3);
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField ARGUMENTS_FIELD_DESC
= new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("arguments", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT,
(short)4);
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField STATE_FIELD_DESC
= new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("state", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I32,
(short)5);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new CommandStatusStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new CommandStatusTupleSchemeFactory());
+  }
+
+  public String executionId; // required
+  public String table; // required
+  public String commandName; // required
+  public Arguments arguments; // required
+  /**
+   * 
+   * @see CommandStatusState
+   */
+  public CommandStatusState state; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding
and manipulating them. */
+  public enum _Fields implements org.apache.blur.thirdparty.thrift_0_9_0.TFieldIdEnum {
+    EXECUTION_ID((short)1, "executionId"),
+    TABLE((short)2, "table"),
+    COMMAND_NAME((short)3, "commandName"),
+    ARGUMENTS((short)4, "arguments"),
+    /**
+     * 
+     * @see CommandStatusState
+     */
+    STATE((short)5, "state");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // EXECUTION_ID
+          return EXECUTION_ID;
+        case 2: // TABLE
+          return TABLE;
+        case 3: // COMMAND_NAME
+          return COMMAND_NAME;
+        case 4: // ARGUMENTS
+          return ARGUMENTS;
+        case 5: // STATE
+          return STATE;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't
exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  public static final Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData>
metaDataMap;
+  static {
+    Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> tmpMap
= new EnumMap<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.EXECUTION_ID, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("executionId",
org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, 
+        new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING)));
+    tmpMap.put(_Fields.TABLE, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("table",
org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, 
+        new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING)));
+    tmpMap.put(_Fields.COMMAND_NAME, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("commandName",
org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, 
+        new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING)));
+    tmpMap.put(_Fields.ARGUMENTS, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("arguments",
org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, 
+        new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.StructMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT,
Arguments.class)));
+    tmpMap.put(_Fields.STATE, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("state",
org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, 
+        new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.EnumMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.ENUM,
CommandStatusState.class)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData.addStructMetaDataMap(CommandStatus.class,
metaDataMap);
+  }
+
+  public CommandStatus() {
+  }
+
+  public CommandStatus(
+    String executionId,
+    String table,
+    String commandName,
+    Arguments arguments,
+    CommandStatusState state)
+  {
+    this();
+    this.executionId = executionId;
+    this.table = table;
+    this.commandName = commandName;
+    this.arguments = arguments;
+    this.state = state;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public CommandStatus(CommandStatus other) {
+    if (other.isSetExecutionId()) {
+      this.executionId = other.executionId;
+    }
+    if (other.isSetTable()) {
+      this.table = other.table;
+    }
+    if (other.isSetCommandName()) {
+      this.commandName = other.commandName;
+    }
+    if (other.isSetArguments()) {
+      this.arguments = new Arguments(other.arguments);
+    }
+    if (other.isSetState()) {
+      this.state = other.state;
+    }
+  }
+
+  public CommandStatus deepCopy() {
+    return new CommandStatus(this);
+  }
+
+  @Override
+  public void clear() {
+    this.executionId = null;
+    this.table = null;
+    this.commandName = null;
+    this.arguments = null;
+    this.state = null;
+  }
+
+  public String getExecutionId() {
+    return this.executionId;
+  }
+
+  public CommandStatus setExecutionId(String executionId) {
+    this.executionId = executionId;
+    return this;
+  }
+
+  public void unsetExecutionId() {
+    this.executionId = null;
+  }
+
+  /** Returns true if field executionId is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetExecutionId() {
+    return this.executionId != null;
+  }
+
+  public void setExecutionIdIsSet(boolean value) {
+    if (!value) {
+      this.executionId = null;
+    }
+  }
+
+  public String getTable() {
+    return this.table;
+  }
+
+  public CommandStatus setTable(String table) {
+    this.table = table;
+    return this;
+  }
+
+  public void unsetTable() {
+    this.table = null;
+  }
+
+  /** Returns true if field table is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetTable() {
+    return this.table != null;
+  }
+
+  public void setTableIsSet(boolean value) {
+    if (!value) {
+      this.table = null;
+    }
+  }
+
+  public String getCommandName() {
+    return this.commandName;
+  }
+
+  public CommandStatus setCommandName(String commandName) {
+    this.commandName = commandName;
+    return this;
+  }
+
+  public void unsetCommandName() {
+    this.commandName = null;
+  }
+
+  /** Returns true if field commandName is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetCommandName() {
+    return this.commandName != null;
+  }
+
+  public void setCommandNameIsSet(boolean value) {
+    if (!value) {
+      this.commandName = null;
+    }
+  }
+
+  public Arguments getArguments() {
+    return this.arguments;
+  }
+
+  public CommandStatus setArguments(Arguments arguments) {
+    this.arguments = arguments;
+    return this;
+  }
+
+  public void unsetArguments() {
+    this.arguments = null;
+  }
+
+  /** Returns true if field arguments is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetArguments() {
+    return this.arguments != null;
+  }
+
+  public void setArgumentsIsSet(boolean value) {
+    if (!value) {
+      this.arguments = null;
+    }
+  }
+
+  /**
+   * 
+   * @see CommandStatusState
+   */
+  public CommandStatusState getState() {
+    return this.state;
+  }
+
+  /**
+   * 
+   * @see CommandStatusState
+   */
+  public CommandStatus setState(CommandStatusState state) {
+    this.state = state;
+    return this;
+  }
+
+  public void unsetState() {
+    this.state = null;
+  }
+
+  /** Returns true if field state is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetState() {
+    return this.state != null;
+  }
+
+  public void setStateIsSet(boolean value) {
+    if (!value) {
+      this.state = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case EXECUTION_ID:
+      if (value == null) {
+        unsetExecutionId();
+      } else {
+        setExecutionId((String)value);
+      }
+      break;
+
+    case TABLE:
+      if (value == null) {
+        unsetTable();
+      } else {
+        setTable((String)value);
+      }
+      break;
+
+    case COMMAND_NAME:
+      if (value == null) {
+        unsetCommandName();
+      } else {
+        setCommandName((String)value);
+      }
+      break;
+
+    case ARGUMENTS:
+      if (value == null) {
+        unsetArguments();
+      } else {
+        setArguments((Arguments)value);
+      }
+      break;
+
+    case STATE:
+      if (value == null) {
+        unsetState();
+      } else {
+        setState((CommandStatusState)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case EXECUTION_ID:
+      return getExecutionId();
+
+    case TABLE:
+      return getTable();
+
+    case COMMAND_NAME:
+      return getCommandName();
+
+    case ARGUMENTS:
+      return getArguments();
+
+    case STATE:
+      return getState();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and
false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case EXECUTION_ID:
+      return isSetExecutionId();
+    case TABLE:
+      return isSetTable();
+    case COMMAND_NAME:
+      return isSetCommandName();
+    case ARGUMENTS:
+      return isSetArguments();
+    case STATE:
+      return isSetState();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof CommandStatus)
+      return this.equals((CommandStatus)that);
+    return false;
+  }
+
+  public boolean equals(CommandStatus that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_executionId = true && this.isSetExecutionId();
+    boolean that_present_executionId = true && that.isSetExecutionId();
+    if (this_present_executionId || that_present_executionId) {
+      if (!(this_present_executionId && that_present_executionId))
+        return false;
+      if (!this.executionId.equals(that.executionId))
+        return false;
+    }
+
+    boolean this_present_table = true && this.isSetTable();
+    boolean that_present_table = true && that.isSetTable();
+    if (this_present_table || that_present_table) {
+      if (!(this_present_table && that_present_table))
+        return false;
+      if (!this.table.equals(that.table))
+        return false;
+    }
+
+    boolean this_present_commandName = true && this.isSetCommandName();
+    boolean that_present_commandName = true && that.isSetCommandName();
+    if (this_present_commandName || that_present_commandName) {
+      if (!(this_present_commandName && that_present_commandName))
+        return false;
+      if (!this.commandName.equals(that.commandName))
+        return false;
+    }
+
+    boolean this_present_arguments = true && this.isSetArguments();
+    boolean that_present_arguments = true && that.isSetArguments();
+    if (this_present_arguments || that_present_arguments) {
+      if (!(this_present_arguments && that_present_arguments))
+        return false;
+      if (!this.arguments.equals(that.arguments))
+        return false;
+    }
+
+    boolean this_present_state = true && this.isSetState();
+    boolean that_present_state = true && that.isSetState();
+    if (this_present_state || that_present_state) {
+      if (!(this_present_state && that_present_state))
+        return false;
+      if (!this.state.equals(that.state))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(CommandStatus other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    CommandStatus typedOther = (CommandStatus)other;
+
+    lastComparison = Boolean.valueOf(isSetExecutionId()).compareTo(typedOther.isSetExecutionId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetExecutionId()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.executionId,
typedOther.executionId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetTable()).compareTo(typedOther.isSetTable());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTable()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.table,
typedOther.table);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetCommandName()).compareTo(typedOther.isSetCommandName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCommandName()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.commandName,
typedOther.commandName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetArguments()).compareTo(typedOther.isSetArguments());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetArguments()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.arguments,
typedOther.arguments);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetState()).compareTo(typedOther.isSetState());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetState()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.state,
typedOther.state);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot) throws
org.apache.blur.thirdparty.thrift_0_9_0.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot) throws
org.apache.blur.thirdparty.thrift_0_9_0.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("CommandStatus(");
+    boolean first = true;
+
+    sb.append("executionId:");
+    if (this.executionId == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.executionId);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("table:");
+    if (this.table == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.table);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("commandName:");
+    if (this.commandName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.commandName);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("arguments:");
+    if (this.arguments == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.arguments);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("state:");
+    if (this.state == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.state);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+    // check for required fields
+    // check for sub-struct validity
+    if (arguments != null) {
+      arguments.validate();
+    }
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(out)));
+    } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
+    try {
+      read(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(in)));
+    } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private static class CommandStatusStandardSchemeFactory implements SchemeFactory {
+    public CommandStatusStandardScheme getScheme() {
+      return new CommandStatusStandardScheme();
+    }
+  }
+
+  private static class CommandStatusStandardScheme extends StandardScheme<CommandStatus>
{
+
+    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot, CommandStatus
struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STOP)
{ 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // EXECUTION_ID
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING)
{
+              struct.executionId = iprot.readString();
+              struct.setExecutionIdIsSet(true);
+            } else { 
+              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
+            }
+            break;
+          case 2: // TABLE
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING)
{
+              struct.table = iprot.readString();
+              struct.setTableIsSet(true);
+            } else { 
+              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
+            }
+            break;
+          case 3: // COMMAND_NAME
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING)
{
+              struct.commandName = iprot.readString();
+              struct.setCommandNameIsSet(true);
+            } else { 
+              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
+            }
+            break;
+          case 4: // ARGUMENTS
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT)
{
+              struct.arguments = new Arguments();
+              struct.arguments.read(iprot);
+              struct.setArgumentsIsSet(true);
+            } else { 
+              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
+            }
+            break;
+          case 5: // STATE
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I32)
{
+              struct.state = CommandStatusState.findByValue(iprot.readI32());
+              struct.setStateIsSet(true);
+            } else { 
+              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
+            }
+            break;
+          default:
+            org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate
method
+      struct.validate();
+    }
+
+    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot, CommandStatus
struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.executionId != null) {
+        oprot.writeFieldBegin(EXECUTION_ID_FIELD_DESC);
+        oprot.writeString(struct.executionId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.table != null) {
+        oprot.writeFieldBegin(TABLE_FIELD_DESC);
+        oprot.writeString(struct.table);
+        oprot.writeFieldEnd();
+      }
+      if (struct.commandName != null) {
+        oprot.writeFieldBegin(COMMAND_NAME_FIELD_DESC);
+        oprot.writeString(struct.commandName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.arguments != null) {
+        oprot.writeFieldBegin(ARGUMENTS_FIELD_DESC);
+        struct.arguments.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.state != null) {
+        oprot.writeFieldBegin(STATE_FIELD_DESC);
+        oprot.writeI32(struct.state.getValue());
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class CommandStatusTupleSchemeFactory implements SchemeFactory {
+    public CommandStatusTupleScheme getScheme() {
+      return new CommandStatusTupleScheme();
+    }
+  }
+
+  private static class CommandStatusTupleScheme extends TupleScheme<CommandStatus>
{
+
+    @Override
+    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, CommandStatus
struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetExecutionId()) {
+        optionals.set(0);
+      }
+      if (struct.isSetTable()) {
+        optionals.set(1);
+      }
+      if (struct.isSetCommandName()) {
+        optionals.set(2);
+      }
+      if (struct.isSetArguments()) {
+        optionals.set(3);
+      }
+      if (struct.isSetState()) {
+        optionals.set(4);
+      }
+      oprot.writeBitSet(optionals, 5);
+      if (struct.isSetExecutionId()) {
+        oprot.writeString(struct.executionId);
+      }
+      if (struct.isSetTable()) {
+        oprot.writeString(struct.table);
+      }
+      if (struct.isSetCommandName()) {
+        oprot.writeString(struct.commandName);
+      }
+      if (struct.isSetArguments()) {
+        struct.arguments.write(oprot);
+      }
+      if (struct.isSetState()) {
+        oprot.writeI32(struct.state.getValue());
+      }
+    }
+
+    @Override
+    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, CommandStatus
struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(5);
+      if (incoming.get(0)) {
+        struct.executionId = iprot.readString();
+        struct.setExecutionIdIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.table = iprot.readString();
+        struct.setTableIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.commandName = iprot.readString();
+        struct.setCommandNameIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.arguments = new Arguments();
+        struct.arguments.read(iprot);
+        struct.setArgumentsIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.state = CommandStatusState.findByValue(iprot.readI32());
+        struct.setStateIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/77a4f849/blur-thrift/src/main/java/org/apache/blur/thrift/generated/CommandStatusState.java
----------------------------------------------------------------------
diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/CommandStatusState.java
b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/CommandStatusState.java
new file mode 100644
index 0000000..4acdf8f
--- /dev/null
+++ b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/CommandStatusState.java
@@ -0,0 +1,70 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.blur.thrift.generated;
+
+/**
+ * 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.
+ */
+
+
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.blur.thirdparty.thrift_0_9_0.TEnum;
+
+public enum CommandStatusState implements org.apache.blur.thirdparty.thrift_0_9_0.TEnum {
+  RUNNING(0),
+  INTERRUPTED(1),
+  COMPLETE(2),
+  BACK_PRESSURE_INTERRUPTED(3);
+
+  private final int value;
+
+  private CommandStatusState(int value) {
+    this.value = value;
+  }
+
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
+  public int getValue() {
+    return value;
+  }
+
+  /**
+   * Find a the enum type by its integer value, as defined in the Thrift IDL.
+   * @return null if the value is not found.
+   */
+  public static CommandStatusState findByValue(int value) { 
+    switch (value) {
+      case 0:
+        return RUNNING;
+      case 1:
+        return INTERRUPTED;
+      case 2:
+        return COMPLETE;
+      case 3:
+        return BACK_PRESSURE_INTERRUPTED;
+      default:
+        return null;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/77a4f849/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SafeClientGen.java
----------------------------------------------------------------------
diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SafeClientGen.java
b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SafeClientGen.java
index 6286a5c..e39461b 100644
--- a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SafeClientGen.java
+++ b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SafeClientGen.java
@@ -76,6 +76,27 @@ public void cancelQuery(java.lang.String arg0, java.lang.String arg1) throws
org
 }
 
 @Override
+public void commandCancel(java.lang.String arg0) throws org.apache.blur.thrift.generated.BlurException,
org.apache.blur.thirdparty.thrift_0_9_0.TException {
+  _lock.errorFailLock(); try {
+    super.commandCancel(arg0);
+  } finally {_lock.unlock();}
+}
+
+@Override
+public org.apache.blur.thrift.generated.CommandStatus commandStatus(java.lang.String arg0)
throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException
{
+  _lock.errorFailLock(); try {
+    return super.commandStatus(arg0);
+  } finally {_lock.unlock();}
+}
+
+@Override
+public java.util.List commandStatusList(int arg0, short arg1, org.apache.blur.thrift.generated.CommandStatusState
arg2) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException
{
+  _lock.errorFailLock(); try {
+    return super.commandStatusList(arg0, arg1, arg2);
+  } finally {_lock.unlock();}
+}
+
+@Override
 public java.util.Map configuration() throws org.apache.blur.thrift.generated.BlurException,
org.apache.blur.thirdparty.thrift_0_9_0.TException {
   _lock.errorFailLock(); try {
     return super.configuration();
@@ -272,6 +293,27 @@ public void recv_cancelQuery() throws org.apache.blur.thrift.generated.BlurExcep
 }
 
 @Override
+public void recv_commandCancel() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException
{
+  _lock.errorFailLock(); try {
+    super.recv_commandCancel();
+  } finally {_lock.unlock();}
+}
+
+@Override
+public org.apache.blur.thrift.generated.CommandStatus recv_commandStatus() throws org.apache.blur.thrift.generated.BlurException,
org.apache.blur.thirdparty.thrift_0_9_0.TException {
+  _lock.errorFailLock(); try {
+    return super.recv_commandStatus();
+  } finally {_lock.unlock();}
+}
+
+@Override
+public java.util.List recv_commandStatusList() throws org.apache.blur.thrift.generated.BlurException,
org.apache.blur.thirdparty.thrift_0_9_0.TException {
+  _lock.errorFailLock(); try {
+    return super.recv_commandStatusList();
+  } finally {_lock.unlock();}
+}
+
+@Override
 public java.util.Map recv_configuration() throws org.apache.blur.thrift.generated.BlurException,
org.apache.blur.thirdparty.thrift_0_9_0.TException {
   _lock.errorFailLock(); try {
     return super.recv_configuration();
@@ -615,6 +657,27 @@ public void send_cancelQuery(java.lang.String arg0, java.lang.String
arg1) throw
 }
 
 @Override
+public void send_commandCancel(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException
{
+  _lock.errorFailLock(); try {
+    super.send_commandCancel(arg0);
+  } finally {_lock.unlock();}
+}
+
+@Override
+public void send_commandStatus(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException
{
+  _lock.errorFailLock(); try {
+    super.send_commandStatus(arg0);
+  } finally {_lock.unlock();}
+}
+
+@Override
+public void send_commandStatusList(int arg0, short arg1, org.apache.blur.thrift.generated.CommandStatusState
arg2) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+  _lock.errorFailLock(); try {
+    super.send_commandStatusList(arg0, arg1, arg2);
+  } finally {_lock.unlock();}
+}
+
+@Override
 public void send_configuration() throws org.apache.blur.thirdparty.thrift_0_9_0.TException
{
   _lock.errorFailLock(); try {
     super.send_configuration();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/77a4f849/distribution/src/main/scripts/interface/Blur.thrift
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/Blur.thrift b/distribution/src/main/scripts/interface/Blur.thrift
index 590d1fc..4ba3ce1 100644
--- a/distribution/src/main/scripts/interface/Blur.thrift
+++ b/distribution/src/main/scripts/interface/Blur.thrift
@@ -883,6 +883,21 @@ struct Arguments {
   1:map<string, ValueObject> values
 }
 
+enum CommandStatusState {
+  RUNNING,
+  INTERRUPTED,
+  COMPLETE,
+  BACK_PRESSURE_INTERRUPTED
+}
+
+struct CommandStatus {
+  1:string executionId,
+  2:string table,
+  3:string commandName,
+  4:Arguments arguments,
+  5:CommandStatusState state
+}
+
 /**
  * The Blur service API.  This API is the same for both controller servers as well as 
  * shards servers.  Each of the methods are documented.
@@ -904,6 +919,21 @@ service Blur {
   Response reconnect(1:string executionId) throws (1:BlurException bex, 2:TimeoutException
tex)
 
   /**
+   * Fetches the command status ids in the order they were submitted.
+   */
+  list<string> commandStatusList(1:i32 startingAt, 2:i16 fetch, 3:CommandStatusState
state) throws (1:BlurException ex)
+
+  /**
+   * Retrieves the command status by the given execution id.
+   */
+  CommandStatus commandStatus(1:string executionId) throws (1:BlurException ex)
+
+  /**
+   * Cancels the command with the given execution id.
+   */
+  void commandCancel(1:string executionId) throws (1:BlurException ex)
+
+  /**
    * Releases and refreshes the read snapshots of the indexes in the session for the 
    * current connection.
    */

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/77a4f849/distribution/src/main/scripts/interface/gen-html/Blur.html
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-html/Blur.html b/distribution/src/main/scripts/interface/gen-html/Blur.html
index a73aa48..f883aaf 100644
--- a/distribution/src/main/scripts/interface/gen-html/Blur.html
+++ b/distribution/src/main/scripts/interface/gen-html/Blur.html
@@ -13,6 +13,9 @@
 <ul>
 <li><a href="Blur.html#Fn_Blur_addColumnDefinition">addColumnDefinition</a></li>
 <li><a href="Blur.html#Fn_Blur_cancelQuery">cancelQuery</a></li>
+<li><a href="Blur.html#Fn_Blur_commandCancel">commandCancel</a></li>
+<li><a href="Blur.html#Fn_Blur_commandStatus">commandStatus</a></li>
+<li><a href="Blur.html#Fn_Blur_commandStatusList">commandStatusList</a></li>
 <li><a href="Blur.html#Fn_Blur_configuration">configuration</a></li>
 <li><a href="Blur.html#Fn_Blur_controllerServerList">controllerServerList</a></li>
 <li><a href="Blur.html#Fn_Blur_createSnapshot">createSnapshot</a></li>
@@ -70,6 +73,8 @@
 <a href="Blur.html#Struct_BlurResults">BlurResults</a><br/>
 <a href="Blur.html#Struct_Column">Column</a><br/>
 <a href="Blur.html#Struct_ColumnDefinition">ColumnDefinition</a><br/>
+<a href="Blur.html#Struct_CommandStatus">CommandStatus</a><br/>
+<a href="Blur.html#Enum_CommandStatusState">CommandStatusState</a><br/>
 <a href="Blur.html#Struct_CpuTime">CpuTime</a><br/>
 <a href="Blur.html#Enum_ErrorType">ErrorType</a><br/>
 <a href="Blur.html#Struct_Facet">Facet</a><br/>
@@ -222,6 +227,13 @@ Logging level enum used to change the logging levels at runtime.
 <tr><td><code>NAME</code></td><td><code>2</code></td></tr>
 <tr><td><code>VALUE</code></td><td><code>3</code></td></tr>
 </table></div>
+<div class="definition"><h3 id="Enum_CommandStatusState">Enumeration: CommandStatusState</h3>
+<br/><table class="table-bordered table-striped table-condensed">
+<tr><td><code>RUNNING</code></td><td><code>0</code></td></tr>
+<tr><td><code>INTERRUPTED</code></td><td><code>1</code></td></tr>
+<tr><td><code>COMPLETE</code></td><td><code>2</code></td></tr>
+<tr><td><code>BACK_PRESSURE_INTERRUPTED</code></td><td><code>3</code></td></tr>
+</table></div>
 <hr/><h2 id="Structs">Data structures</h2>
 <div class="definition"><h3 id="Struct_BlurException">Exception: BlurException</h3>
 <table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default
value</th></thead>
@@ -632,6 +644,13 @@ be family dot column, "family.column".
 </table><br/></div><div class="definition"><h3 id="Struct_Arguments">Struct:
Arguments</h3>
 <table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default
value</th></thead>
 <tr><td>1</td><td>values</td><td><code>map&lt;<code>string</code>,
<code><a href="Blur.html#Struct_ValueObject">ValueObject</a></code>&gt;</code></td><td></td><td>default</td><td></td></tr>
+</table><br/></div><div class="definition"><h3 id="Struct_CommandStatus">Struct:
CommandStatus</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default
value</th></thead>
+<tr><td>1</td><td>executionId</td><td><code>string</code></td><td></td><td>default</td><td></td></tr>
+<tr><td>2</td><td>table</td><td><code>string</code></td><td></td><td>default</td><td></td></tr>
+<tr><td>3</td><td>commandName</td><td><code>string</code></td><td></td><td>default</td><td></td></tr>
+<tr><td>4</td><td>arguments</td><td><code><a
href="Blur.html#Struct_Arguments">Arguments</a></code></td><td></td><td>default</td><td></td></tr>
+<tr><td>5</td><td>state</td><td><code><a href="Blur.html#Enum_CommandStatusState">CommandStatusState</a></code></td><td></td><td>default</td><td></td></tr>
 </table><br/></div><hr/><h2 id="Services">Services</h2>
 <h3 id="Svc_Blur">Service: Blur</h3>
 The Blur service API.  This API is the same for both controller servers as well as
@@ -648,6 +667,20 @@ shards servers.  Each of the methods are documented.
 </pre>If the execute command times out due to command taking longer than the configured
 network tcp timeout this method allows the client to reconnect to the already
 executing command.
+<br/></div><div class="definition"><h4 id="Fn_Blur_commandStatusList">Function:
Blur.commandStatusList</h4>
+<pre><code>list&lt;<code>string</code>&gt;</code> commandStatusList(<code>i32</code>
startingAt,
+                               <code>i16</code> fetch,
+                               <code><a href="Blur.html#Enum_CommandStatusState">CommandStatusState</a></code>
state)
+    throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
+</pre>Fetches the command status ids in the order they were submitted.
+<br/></div><div class="definition"><h4 id="Fn_Blur_commandStatus">Function:
Blur.commandStatus</h4>
+<pre><code><a href="Blur.html#Struct_CommandStatus">CommandStatus</a></code>
commandStatus(<code>string</code> executionId)
+    throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
+</pre>Retrieves the command status by the given execution id.
+<br/></div><div class="definition"><h4 id="Fn_Blur_commandCancel">Function:
Blur.commandCancel</h4>
+<pre><code>void</code> commandCancel(<code>string</code> executionId)
+    throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
+</pre>Cancels the command with the given execution id.
 <br/></div><div class="definition"><h4 id="Fn_Blur_refresh">Function:
Blur.refresh</h4>
 <pre><code>void</code> refresh()
 </pre>Releases and refreshes the read snapshots of the indexes in the session for the

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/77a4f849/distribution/src/main/scripts/interface/gen-html/index.html
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-html/index.html b/distribution/src/main/scripts/interface/gen-html/index.html
index 80db661..42ef7c7 100644
--- a/distribution/src/main/scripts/interface/gen-html/index.html
+++ b/distribution/src/main/scripts/interface/gen-html/index.html
@@ -9,6 +9,9 @@
 <ul>
 <li><a href="Blur.html#Fn_Blur_addColumnDefinition">addColumnDefinition</a></li>
 <li><a href="Blur.html#Fn_Blur_cancelQuery">cancelQuery</a></li>
+<li><a href="Blur.html#Fn_Blur_commandCancel">commandCancel</a></li>
+<li><a href="Blur.html#Fn_Blur_commandStatus">commandStatus</a></li>
+<li><a href="Blur.html#Fn_Blur_commandStatusList">commandStatusList</a></li>
 <li><a href="Blur.html#Fn_Blur_configuration">configuration</a></li>
 <li><a href="Blur.html#Fn_Blur_controllerServerList">controllerServerList</a></li>
 <li><a href="Blur.html#Fn_Blur_createSnapshot">createSnapshot</a></li>
@@ -66,6 +69,8 @@
 <a href="Blur.html#Struct_BlurResults">BlurResults</a><br/>
 <a href="Blur.html#Struct_Column">Column</a><br/>
 <a href="Blur.html#Struct_ColumnDefinition">ColumnDefinition</a><br/>
+<a href="Blur.html#Struct_CommandStatus">CommandStatus</a><br/>
+<a href="Blur.html#Enum_CommandStatusState">CommandStatusState</a><br/>
 <a href="Blur.html#Struct_CpuTime">CpuTime</a><br/>
 <a href="Blur.html#Enum_ErrorType">ErrorType</a><br/>
 <a href="Blur.html#Struct_Facet">Facet</a><br/>


Mime
View raw message