You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by nz...@apache.org on 2010/12/09 19:31:09 UTC

svn commit: r1044070 [19/29] - in /hive/trunk: ./ eclipse-templates/ ivy/ lib/ metastore/ metastore/if/ metastore/src/gen-cpp/ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ metastore/src/gen-php/ metastore/src/gen-py/hive_metastore/ ...

Added: hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java?rev=1044070&view=auto
==============================================================================
--- hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java (added)
+++ hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java Thu Dec  9 18:30:58 2010
@@ -0,0 +1,513 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.hive.ql.plan.api;
+
+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;
+
+import org.apache.thrift.*;
+import org.apache.thrift.async.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+
+public class QueryPlan implements TBase<QueryPlan, QueryPlan._Fields>, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("QueryPlan");
+
+  private static final TField QUERIES_FIELD_DESC = new TField("queries", TType.LIST, (short)1);
+  private static final TField DONE_FIELD_DESC = new TField("done", TType.BOOL, (short)2);
+  private static final TField STARTED_FIELD_DESC = new TField("started", TType.BOOL, (short)3);
+
+  private List<Query> queries;
+  private boolean done;
+  private boolean started;
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements TFieldIdEnum {
+    QUERIES((short)1, "queries"),
+    DONE((short)2, "done"),
+    STARTED((short)3, "started");
+
+    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: // QUERIES
+          return QUERIES;
+        case 2: // DONE
+          return DONE;
+        case 3: // STARTED
+          return STARTED;
+        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
+  private static final int __DONE_ISSET_ID = 0;
+  private static final int __STARTED_ISSET_ID = 1;
+  private BitSet __isset_bit_vector = new BitSet(2);
+
+  public static final Map<_Fields, FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.QUERIES, new FieldMetaData("queries", TFieldRequirementType.DEFAULT, 
+        new ListMetaData(TType.LIST, 
+            new StructMetaData(TType.STRUCT, Query.class))));
+    tmpMap.put(_Fields.DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.BOOL)));
+    tmpMap.put(_Fields.STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.BOOL)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    FieldMetaData.addStructMetaDataMap(QueryPlan.class, metaDataMap);
+  }
+
+  public QueryPlan() {
+  }
+
+  public QueryPlan(
+    List<Query> queries,
+    boolean done,
+    boolean started)
+  {
+    this();
+    this.queries = queries;
+    this.done = done;
+    setDoneIsSet(true);
+    this.started = started;
+    setStartedIsSet(true);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public QueryPlan(QueryPlan other) {
+    __isset_bit_vector.clear();
+    __isset_bit_vector.or(other.__isset_bit_vector);
+    if (other.isSetQueries()) {
+      List<Query> __this__queries = new ArrayList<Query>();
+      for (Query other_element : other.queries) {
+        __this__queries.add(new Query(other_element));
+      }
+      this.queries = __this__queries;
+    }
+    this.done = other.done;
+    this.started = other.started;
+  }
+
+  public QueryPlan deepCopy() {
+    return new QueryPlan(this);
+  }
+
+  @Override
+  public void clear() {
+    this.queries = null;
+    setDoneIsSet(false);
+    this.done = false;
+    setStartedIsSet(false);
+    this.started = false;
+  }
+
+  public int getQueriesSize() {
+    return (this.queries == null) ? 0 : this.queries.size();
+  }
+
+  public java.util.Iterator<Query> getQueriesIterator() {
+    return (this.queries == null) ? null : this.queries.iterator();
+  }
+
+  public void addToQueries(Query elem) {
+    if (this.queries == null) {
+      this.queries = new ArrayList<Query>();
+    }
+    this.queries.add(elem);
+  }
+
+  public List<Query> getQueries() {
+    return this.queries;
+  }
+
+  public void setQueries(List<Query> queries) {
+    this.queries = queries;
+  }
+
+  public void unsetQueries() {
+    this.queries = null;
+  }
+
+  /** Returns true if field queries is set (has been asigned a value) and false otherwise */
+  public boolean isSetQueries() {
+    return this.queries != null;
+  }
+
+  public void setQueriesIsSet(boolean value) {
+    if (!value) {
+      this.queries = null;
+    }
+  }
+
+  public boolean isDone() {
+    return this.done;
+  }
+
+  public void setDone(boolean done) {
+    this.done = done;
+    setDoneIsSet(true);
+  }
+
+  public void unsetDone() {
+    __isset_bit_vector.clear(__DONE_ISSET_ID);
+  }
+
+  /** Returns true if field done is set (has been asigned a value) and false otherwise */
+  public boolean isSetDone() {
+    return __isset_bit_vector.get(__DONE_ISSET_ID);
+  }
+
+  public void setDoneIsSet(boolean value) {
+    __isset_bit_vector.set(__DONE_ISSET_ID, value);
+  }
+
+  public boolean isStarted() {
+    return this.started;
+  }
+
+  public void setStarted(boolean started) {
+    this.started = started;
+    setStartedIsSet(true);
+  }
+
+  public void unsetStarted() {
+    __isset_bit_vector.clear(__STARTED_ISSET_ID);
+  }
+
+  /** Returns true if field started is set (has been asigned a value) and false otherwise */
+  public boolean isSetStarted() {
+    return __isset_bit_vector.get(__STARTED_ISSET_ID);
+  }
+
+  public void setStartedIsSet(boolean value) {
+    __isset_bit_vector.set(__STARTED_ISSET_ID, value);
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case QUERIES:
+      if (value == null) {
+        unsetQueries();
+      } else {
+        setQueries((List<Query>)value);
+      }
+      break;
+
+    case DONE:
+      if (value == null) {
+        unsetDone();
+      } else {
+        setDone((Boolean)value);
+      }
+      break;
+
+    case STARTED:
+      if (value == null) {
+        unsetStarted();
+      } else {
+        setStarted((Boolean)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case QUERIES:
+      return getQueries();
+
+    case DONE:
+      return new Boolean(isDone());
+
+    case STARTED:
+      return new Boolean(isStarted());
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case QUERIES:
+      return isSetQueries();
+    case DONE:
+      return isSetDone();
+    case STARTED:
+      return isSetStarted();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof QueryPlan)
+      return this.equals((QueryPlan)that);
+    return false;
+  }
+
+  public boolean equals(QueryPlan that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_queries = true && this.isSetQueries();
+    boolean that_present_queries = true && that.isSetQueries();
+    if (this_present_queries || that_present_queries) {
+      if (!(this_present_queries && that_present_queries))
+        return false;
+      if (!this.queries.equals(that.queries))
+        return false;
+    }
+
+    boolean this_present_done = true;
+    boolean that_present_done = true;
+    if (this_present_done || that_present_done) {
+      if (!(this_present_done && that_present_done))
+        return false;
+      if (this.done != that.done)
+        return false;
+    }
+
+    boolean this_present_started = true;
+    boolean that_present_started = true;
+    if (this_present_started || that_present_started) {
+      if (!(this_present_started && that_present_started))
+        return false;
+      if (this.started != that.started)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(QueryPlan other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    QueryPlan typedOther = (QueryPlan)other;
+
+    lastComparison = Boolean.valueOf(isSetQueries()).compareTo(typedOther.isSetQueries());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetQueries()) {
+      lastComparison = TBaseHelper.compareTo(this.queries, typedOther.queries);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetDone()).compareTo(typedOther.isSetDone());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDone()) {
+      lastComparison = TBaseHelper.compareTo(this.done, typedOther.done);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetStarted()).compareTo(typedOther.isSetStarted());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetStarted()) {
+      lastComparison = TBaseHelper.compareTo(this.started, typedOther.started);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id) {
+        case 1: // QUERIES
+          if (field.type == TType.LIST) {
+            {
+              TList _list64 = iprot.readListBegin();
+              this.queries = new ArrayList<Query>(_list64.size);
+              for (int _i65 = 0; _i65 < _list64.size; ++_i65)
+              {
+                Query _elem66;
+                _elem66 = new Query();
+                _elem66.read(iprot);
+                this.queries.add(_elem66);
+              }
+              iprot.readListEnd();
+            }
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 2: // DONE
+          if (field.type == TType.BOOL) {
+            this.done = iprot.readBool();
+            setDoneIsSet(true);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 3: // STARTED
+          if (field.type == TType.BOOL) {
+            this.started = iprot.readBool();
+            setStartedIsSet(true);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+    validate();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.queries != null) {
+      oprot.writeFieldBegin(QUERIES_FIELD_DESC);
+      {
+        oprot.writeListBegin(new TList(TType.STRUCT, this.queries.size()));
+        for (Query _iter67 : this.queries)
+        {
+          _iter67.write(oprot);
+        }
+        oprot.writeListEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldBegin(DONE_FIELD_DESC);
+    oprot.writeBool(this.done);
+    oprot.writeFieldEnd();
+    oprot.writeFieldBegin(STARTED_FIELD_DESC);
+    oprot.writeBool(this.started);
+    oprot.writeFieldEnd();
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("QueryPlan(");
+    boolean first = true;
+
+    sb.append("queries:");
+    if (this.queries == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.queries);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("done:");
+    sb.append(this.done);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("started:");
+    sb.append(this.started);
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+  }
+
+}
+

Added: hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java?rev=1044070&view=auto
==============================================================================
--- hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java (added)
+++ hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java Thu Dec  9 18:30:58 2010
@@ -0,0 +1,967 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.hive.ql.plan.api;
+
+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;
+
+import org.apache.thrift.*;
+import org.apache.thrift.async.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+
+public class Stage implements TBase<Stage, Stage._Fields>, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("Stage");
+
+  private static final TField STAGE_ID_FIELD_DESC = new TField("stageId", TType.STRING, (short)1);
+  private static final TField STAGE_TYPE_FIELD_DESC = new TField("stageType", TType.I32, (short)2);
+  private static final TField STAGE_ATTRIBUTES_FIELD_DESC = new TField("stageAttributes", TType.MAP, (short)3);
+  private static final TField STAGE_COUNTERS_FIELD_DESC = new TField("stageCounters", TType.MAP, (short)4);
+  private static final TField TASK_LIST_FIELD_DESC = new TField("taskList", TType.LIST, (short)5);
+  private static final TField DONE_FIELD_DESC = new TField("done", TType.BOOL, (short)6);
+  private static final TField STARTED_FIELD_DESC = new TField("started", TType.BOOL, (short)7);
+
+  private String stageId;
+  private StageType stageType;
+  private Map<String,String> stageAttributes;
+  private Map<String,Long> stageCounters;
+  private List<Task> taskList;
+  private boolean done;
+  private boolean started;
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements TFieldIdEnum {
+    STAGE_ID((short)1, "stageId"),
+    /**
+     * 
+     * @see StageType
+     */
+    STAGE_TYPE((short)2, "stageType"),
+    STAGE_ATTRIBUTES((short)3, "stageAttributes"),
+    STAGE_COUNTERS((short)4, "stageCounters"),
+    TASK_LIST((short)5, "taskList"),
+    DONE((short)6, "done"),
+    STARTED((short)7, "started");
+
+    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: // STAGE_ID
+          return STAGE_ID;
+        case 2: // STAGE_TYPE
+          return STAGE_TYPE;
+        case 3: // STAGE_ATTRIBUTES
+          return STAGE_ATTRIBUTES;
+        case 4: // STAGE_COUNTERS
+          return STAGE_COUNTERS;
+        case 5: // TASK_LIST
+          return TASK_LIST;
+        case 6: // DONE
+          return DONE;
+        case 7: // STARTED
+          return STARTED;
+        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
+  private static final int __DONE_ISSET_ID = 0;
+  private static final int __STARTED_ISSET_ID = 1;
+  private BitSet __isset_bit_vector = new BitSet(2);
+
+  public static final Map<_Fields, FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.STAGE_ID, new FieldMetaData("stageId", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.STRING)));
+    tmpMap.put(_Fields.STAGE_TYPE, new FieldMetaData("stageType", TFieldRequirementType.DEFAULT, 
+        new EnumMetaData(TType.ENUM, StageType.class)));
+    tmpMap.put(_Fields.STAGE_ATTRIBUTES, new FieldMetaData("stageAttributes", TFieldRequirementType.DEFAULT, 
+        new MapMetaData(TType.MAP, 
+            new FieldValueMetaData(TType.STRING), 
+            new FieldValueMetaData(TType.STRING))));
+    tmpMap.put(_Fields.STAGE_COUNTERS, new FieldMetaData("stageCounters", TFieldRequirementType.DEFAULT, 
+        new MapMetaData(TType.MAP, 
+            new FieldValueMetaData(TType.STRING), 
+            new FieldValueMetaData(TType.I64))));
+    tmpMap.put(_Fields.TASK_LIST, new FieldMetaData("taskList", TFieldRequirementType.DEFAULT, 
+        new ListMetaData(TType.LIST, 
+            new StructMetaData(TType.STRUCT, Task.class))));
+    tmpMap.put(_Fields.DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.BOOL)));
+    tmpMap.put(_Fields.STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.BOOL)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    FieldMetaData.addStructMetaDataMap(Stage.class, metaDataMap);
+  }
+
+  public Stage() {
+  }
+
+  public Stage(
+    String stageId,
+    StageType stageType,
+    Map<String,String> stageAttributes,
+    Map<String,Long> stageCounters,
+    List<Task> taskList,
+    boolean done,
+    boolean started)
+  {
+    this();
+    this.stageId = stageId;
+    this.stageType = stageType;
+    this.stageAttributes = stageAttributes;
+    this.stageCounters = stageCounters;
+    this.taskList = taskList;
+    this.done = done;
+    setDoneIsSet(true);
+    this.started = started;
+    setStartedIsSet(true);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Stage(Stage other) {
+    __isset_bit_vector.clear();
+    __isset_bit_vector.or(other.__isset_bit_vector);
+    if (other.isSetStageId()) {
+      this.stageId = other.stageId;
+    }
+    if (other.isSetStageType()) {
+      this.stageType = other.stageType;
+    }
+    if (other.isSetStageAttributes()) {
+      Map<String,String> __this__stageAttributes = new HashMap<String,String>();
+      for (Map.Entry<String, String> other_element : other.stageAttributes.entrySet()) {
+
+        String other_element_key = other_element.getKey();
+        String other_element_value = other_element.getValue();
+
+        String __this__stageAttributes_copy_key = other_element_key;
+
+        String __this__stageAttributes_copy_value = other_element_value;
+
+        __this__stageAttributes.put(__this__stageAttributes_copy_key, __this__stageAttributes_copy_value);
+      }
+      this.stageAttributes = __this__stageAttributes;
+    }
+    if (other.isSetStageCounters()) {
+      Map<String,Long> __this__stageCounters = new HashMap<String,Long>();
+      for (Map.Entry<String, Long> other_element : other.stageCounters.entrySet()) {
+
+        String other_element_key = other_element.getKey();
+        Long other_element_value = other_element.getValue();
+
+        String __this__stageCounters_copy_key = other_element_key;
+
+        Long __this__stageCounters_copy_value = other_element_value;
+
+        __this__stageCounters.put(__this__stageCounters_copy_key, __this__stageCounters_copy_value);
+      }
+      this.stageCounters = __this__stageCounters;
+    }
+    if (other.isSetTaskList()) {
+      List<Task> __this__taskList = new ArrayList<Task>();
+      for (Task other_element : other.taskList) {
+        __this__taskList.add(new Task(other_element));
+      }
+      this.taskList = __this__taskList;
+    }
+    this.done = other.done;
+    this.started = other.started;
+  }
+
+  public Stage deepCopy() {
+    return new Stage(this);
+  }
+
+  @Override
+  public void clear() {
+    this.stageId = null;
+    this.stageType = null;
+    this.stageAttributes = null;
+    this.stageCounters = null;
+    this.taskList = null;
+    setDoneIsSet(false);
+    this.done = false;
+    setStartedIsSet(false);
+    this.started = false;
+  }
+
+  public String getStageId() {
+    return this.stageId;
+  }
+
+  public void setStageId(String stageId) {
+    this.stageId = stageId;
+  }
+
+  public void unsetStageId() {
+    this.stageId = null;
+  }
+
+  /** Returns true if field stageId is set (has been asigned a value) and false otherwise */
+  public boolean isSetStageId() {
+    return this.stageId != null;
+  }
+
+  public void setStageIdIsSet(boolean value) {
+    if (!value) {
+      this.stageId = null;
+    }
+  }
+
+  /**
+   * 
+   * @see StageType
+   */
+  public StageType getStageType() {
+    return this.stageType;
+  }
+
+  /**
+   * 
+   * @see StageType
+   */
+  public void setStageType(StageType stageType) {
+    this.stageType = stageType;
+  }
+
+  public void unsetStageType() {
+    this.stageType = null;
+  }
+
+  /** Returns true if field stageType is set (has been asigned a value) and false otherwise */
+  public boolean isSetStageType() {
+    return this.stageType != null;
+  }
+
+  public void setStageTypeIsSet(boolean value) {
+    if (!value) {
+      this.stageType = null;
+    }
+  }
+
+  public int getStageAttributesSize() {
+    return (this.stageAttributes == null) ? 0 : this.stageAttributes.size();
+  }
+
+  public void putToStageAttributes(String key, String val) {
+    if (this.stageAttributes == null) {
+      this.stageAttributes = new HashMap<String,String>();
+    }
+    this.stageAttributes.put(key, val);
+  }
+
+  public Map<String,String> getStageAttributes() {
+    return this.stageAttributes;
+  }
+
+  public void setStageAttributes(Map<String,String> stageAttributes) {
+    this.stageAttributes = stageAttributes;
+  }
+
+  public void unsetStageAttributes() {
+    this.stageAttributes = null;
+  }
+
+  /** Returns true if field stageAttributes is set (has been asigned a value) and false otherwise */
+  public boolean isSetStageAttributes() {
+    return this.stageAttributes != null;
+  }
+
+  public void setStageAttributesIsSet(boolean value) {
+    if (!value) {
+      this.stageAttributes = null;
+    }
+  }
+
+  public int getStageCountersSize() {
+    return (this.stageCounters == null) ? 0 : this.stageCounters.size();
+  }
+
+  public void putToStageCounters(String key, long val) {
+    if (this.stageCounters == null) {
+      this.stageCounters = new HashMap<String,Long>();
+    }
+    this.stageCounters.put(key, val);
+  }
+
+  public Map<String,Long> getStageCounters() {
+    return this.stageCounters;
+  }
+
+  public void setStageCounters(Map<String,Long> stageCounters) {
+    this.stageCounters = stageCounters;
+  }
+
+  public void unsetStageCounters() {
+    this.stageCounters = null;
+  }
+
+  /** Returns true if field stageCounters is set (has been asigned a value) and false otherwise */
+  public boolean isSetStageCounters() {
+    return this.stageCounters != null;
+  }
+
+  public void setStageCountersIsSet(boolean value) {
+    if (!value) {
+      this.stageCounters = null;
+    }
+  }
+
+  public int getTaskListSize() {
+    return (this.taskList == null) ? 0 : this.taskList.size();
+  }
+
+  public java.util.Iterator<Task> getTaskListIterator() {
+    return (this.taskList == null) ? null : this.taskList.iterator();
+  }
+
+  public void addToTaskList(Task elem) {
+    if (this.taskList == null) {
+      this.taskList = new ArrayList<Task>();
+    }
+    this.taskList.add(elem);
+  }
+
+  public List<Task> getTaskList() {
+    return this.taskList;
+  }
+
+  public void setTaskList(List<Task> taskList) {
+    this.taskList = taskList;
+  }
+
+  public void unsetTaskList() {
+    this.taskList = null;
+  }
+
+  /** Returns true if field taskList is set (has been asigned a value) and false otherwise */
+  public boolean isSetTaskList() {
+    return this.taskList != null;
+  }
+
+  public void setTaskListIsSet(boolean value) {
+    if (!value) {
+      this.taskList = null;
+    }
+  }
+
+  public boolean isDone() {
+    return this.done;
+  }
+
+  public void setDone(boolean done) {
+    this.done = done;
+    setDoneIsSet(true);
+  }
+
+  public void unsetDone() {
+    __isset_bit_vector.clear(__DONE_ISSET_ID);
+  }
+
+  /** Returns true if field done is set (has been asigned a value) and false otherwise */
+  public boolean isSetDone() {
+    return __isset_bit_vector.get(__DONE_ISSET_ID);
+  }
+
+  public void setDoneIsSet(boolean value) {
+    __isset_bit_vector.set(__DONE_ISSET_ID, value);
+  }
+
+  public boolean isStarted() {
+    return this.started;
+  }
+
+  public void setStarted(boolean started) {
+    this.started = started;
+    setStartedIsSet(true);
+  }
+
+  public void unsetStarted() {
+    __isset_bit_vector.clear(__STARTED_ISSET_ID);
+  }
+
+  /** Returns true if field started is set (has been asigned a value) and false otherwise */
+  public boolean isSetStarted() {
+    return __isset_bit_vector.get(__STARTED_ISSET_ID);
+  }
+
+  public void setStartedIsSet(boolean value) {
+    __isset_bit_vector.set(__STARTED_ISSET_ID, value);
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case STAGE_ID:
+      if (value == null) {
+        unsetStageId();
+      } else {
+        setStageId((String)value);
+      }
+      break;
+
+    case STAGE_TYPE:
+      if (value == null) {
+        unsetStageType();
+      } else {
+        setStageType((StageType)value);
+      }
+      break;
+
+    case STAGE_ATTRIBUTES:
+      if (value == null) {
+        unsetStageAttributes();
+      } else {
+        setStageAttributes((Map<String,String>)value);
+      }
+      break;
+
+    case STAGE_COUNTERS:
+      if (value == null) {
+        unsetStageCounters();
+      } else {
+        setStageCounters((Map<String,Long>)value);
+      }
+      break;
+
+    case TASK_LIST:
+      if (value == null) {
+        unsetTaskList();
+      } else {
+        setTaskList((List<Task>)value);
+      }
+      break;
+
+    case DONE:
+      if (value == null) {
+        unsetDone();
+      } else {
+        setDone((Boolean)value);
+      }
+      break;
+
+    case STARTED:
+      if (value == null) {
+        unsetStarted();
+      } else {
+        setStarted((Boolean)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case STAGE_ID:
+      return getStageId();
+
+    case STAGE_TYPE:
+      return getStageType();
+
+    case STAGE_ATTRIBUTES:
+      return getStageAttributes();
+
+    case STAGE_COUNTERS:
+      return getStageCounters();
+
+    case TASK_LIST:
+      return getTaskList();
+
+    case DONE:
+      return new Boolean(isDone());
+
+    case STARTED:
+      return new Boolean(isStarted());
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case STAGE_ID:
+      return isSetStageId();
+    case STAGE_TYPE:
+      return isSetStageType();
+    case STAGE_ATTRIBUTES:
+      return isSetStageAttributes();
+    case STAGE_COUNTERS:
+      return isSetStageCounters();
+    case TASK_LIST:
+      return isSetTaskList();
+    case DONE:
+      return isSetDone();
+    case STARTED:
+      return isSetStarted();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Stage)
+      return this.equals((Stage)that);
+    return false;
+  }
+
+  public boolean equals(Stage that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_stageId = true && this.isSetStageId();
+    boolean that_present_stageId = true && that.isSetStageId();
+    if (this_present_stageId || that_present_stageId) {
+      if (!(this_present_stageId && that_present_stageId))
+        return false;
+      if (!this.stageId.equals(that.stageId))
+        return false;
+    }
+
+    boolean this_present_stageType = true && this.isSetStageType();
+    boolean that_present_stageType = true && that.isSetStageType();
+    if (this_present_stageType || that_present_stageType) {
+      if (!(this_present_stageType && that_present_stageType))
+        return false;
+      if (!this.stageType.equals(that.stageType))
+        return false;
+    }
+
+    boolean this_present_stageAttributes = true && this.isSetStageAttributes();
+    boolean that_present_stageAttributes = true && that.isSetStageAttributes();
+    if (this_present_stageAttributes || that_present_stageAttributes) {
+      if (!(this_present_stageAttributes && that_present_stageAttributes))
+        return false;
+      if (!this.stageAttributes.equals(that.stageAttributes))
+        return false;
+    }
+
+    boolean this_present_stageCounters = true && this.isSetStageCounters();
+    boolean that_present_stageCounters = true && that.isSetStageCounters();
+    if (this_present_stageCounters || that_present_stageCounters) {
+      if (!(this_present_stageCounters && that_present_stageCounters))
+        return false;
+      if (!this.stageCounters.equals(that.stageCounters))
+        return false;
+    }
+
+    boolean this_present_taskList = true && this.isSetTaskList();
+    boolean that_present_taskList = true && that.isSetTaskList();
+    if (this_present_taskList || that_present_taskList) {
+      if (!(this_present_taskList && that_present_taskList))
+        return false;
+      if (!this.taskList.equals(that.taskList))
+        return false;
+    }
+
+    boolean this_present_done = true;
+    boolean that_present_done = true;
+    if (this_present_done || that_present_done) {
+      if (!(this_present_done && that_present_done))
+        return false;
+      if (this.done != that.done)
+        return false;
+    }
+
+    boolean this_present_started = true;
+    boolean that_present_started = true;
+    if (this_present_started || that_present_started) {
+      if (!(this_present_started && that_present_started))
+        return false;
+      if (this.started != that.started)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(Stage other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    Stage typedOther = (Stage)other;
+
+    lastComparison = Boolean.valueOf(isSetStageId()).compareTo(typedOther.isSetStageId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetStageId()) {
+      lastComparison = TBaseHelper.compareTo(this.stageId, typedOther.stageId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetStageType()).compareTo(typedOther.isSetStageType());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetStageType()) {
+      lastComparison = TBaseHelper.compareTo(this.stageType, typedOther.stageType);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetStageAttributes()).compareTo(typedOther.isSetStageAttributes());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetStageAttributes()) {
+      lastComparison = TBaseHelper.compareTo(this.stageAttributes, typedOther.stageAttributes);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetStageCounters()).compareTo(typedOther.isSetStageCounters());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetStageCounters()) {
+      lastComparison = TBaseHelper.compareTo(this.stageCounters, typedOther.stageCounters);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetTaskList()).compareTo(typedOther.isSetTaskList());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTaskList()) {
+      lastComparison = TBaseHelper.compareTo(this.taskList, typedOther.taskList);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetDone()).compareTo(typedOther.isSetDone());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDone()) {
+      lastComparison = TBaseHelper.compareTo(this.done, typedOther.done);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetStarted()).compareTo(typedOther.isSetStarted());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetStarted()) {
+      lastComparison = TBaseHelper.compareTo(this.started, typedOther.started);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id) {
+        case 1: // STAGE_ID
+          if (field.type == TType.STRING) {
+            this.stageId = iprot.readString();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 2: // STAGE_TYPE
+          if (field.type == TType.I32) {
+            this.stageType = StageType.findByValue(iprot.readI32());
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 3: // STAGE_ATTRIBUTES
+          if (field.type == TType.MAP) {
+            {
+              TMap _map36 = iprot.readMapBegin();
+              this.stageAttributes = new HashMap<String,String>(2*_map36.size);
+              for (int _i37 = 0; _i37 < _map36.size; ++_i37)
+              {
+                String _key38;
+                String _val39;
+                _key38 = iprot.readString();
+                _val39 = iprot.readString();
+                this.stageAttributes.put(_key38, _val39);
+              }
+              iprot.readMapEnd();
+            }
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 4: // STAGE_COUNTERS
+          if (field.type == TType.MAP) {
+            {
+              TMap _map40 = iprot.readMapBegin();
+              this.stageCounters = new HashMap<String,Long>(2*_map40.size);
+              for (int _i41 = 0; _i41 < _map40.size; ++_i41)
+              {
+                String _key42;
+                long _val43;
+                _key42 = iprot.readString();
+                _val43 = iprot.readI64();
+                this.stageCounters.put(_key42, _val43);
+              }
+              iprot.readMapEnd();
+            }
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 5: // TASK_LIST
+          if (field.type == TType.LIST) {
+            {
+              TList _list44 = iprot.readListBegin();
+              this.taskList = new ArrayList<Task>(_list44.size);
+              for (int _i45 = 0; _i45 < _list44.size; ++_i45)
+              {
+                Task _elem46;
+                _elem46 = new Task();
+                _elem46.read(iprot);
+                this.taskList.add(_elem46);
+              }
+              iprot.readListEnd();
+            }
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 6: // DONE
+          if (field.type == TType.BOOL) {
+            this.done = iprot.readBool();
+            setDoneIsSet(true);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 7: // STARTED
+          if (field.type == TType.BOOL) {
+            this.started = iprot.readBool();
+            setStartedIsSet(true);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+    validate();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.stageId != null) {
+      oprot.writeFieldBegin(STAGE_ID_FIELD_DESC);
+      oprot.writeString(this.stageId);
+      oprot.writeFieldEnd();
+    }
+    if (this.stageType != null) {
+      oprot.writeFieldBegin(STAGE_TYPE_FIELD_DESC);
+      oprot.writeI32(this.stageType.getValue());
+      oprot.writeFieldEnd();
+    }
+    if (this.stageAttributes != null) {
+      oprot.writeFieldBegin(STAGE_ATTRIBUTES_FIELD_DESC);
+      {
+        oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.stageAttributes.size()));
+        for (Map.Entry<String, String> _iter47 : this.stageAttributes.entrySet())
+        {
+          oprot.writeString(_iter47.getKey());
+          oprot.writeString(_iter47.getValue());
+        }
+        oprot.writeMapEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    if (this.stageCounters != null) {
+      oprot.writeFieldBegin(STAGE_COUNTERS_FIELD_DESC);
+      {
+        oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.stageCounters.size()));
+        for (Map.Entry<String, Long> _iter48 : this.stageCounters.entrySet())
+        {
+          oprot.writeString(_iter48.getKey());
+          oprot.writeI64(_iter48.getValue());
+        }
+        oprot.writeMapEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    if (this.taskList != null) {
+      oprot.writeFieldBegin(TASK_LIST_FIELD_DESC);
+      {
+        oprot.writeListBegin(new TList(TType.STRUCT, this.taskList.size()));
+        for (Task _iter49 : this.taskList)
+        {
+          _iter49.write(oprot);
+        }
+        oprot.writeListEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldBegin(DONE_FIELD_DESC);
+    oprot.writeBool(this.done);
+    oprot.writeFieldEnd();
+    oprot.writeFieldBegin(STARTED_FIELD_DESC);
+    oprot.writeBool(this.started);
+    oprot.writeFieldEnd();
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Stage(");
+    boolean first = true;
+
+    sb.append("stageId:");
+    if (this.stageId == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.stageId);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("stageType:");
+    if (this.stageType == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.stageType);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("stageAttributes:");
+    if (this.stageAttributes == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.stageAttributes);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("stageCounters:");
+    if (this.stageCounters == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.stageCounters);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("taskList:");
+    if (this.taskList == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.taskList);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("done:");
+    sb.append(this.done);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("started:");
+    sb.append(this.started);
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+  }
+
+}
+

Added: hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java?rev=1044070&view=auto
==============================================================================
--- hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java (added)
+++ hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java Thu Dec  9 18:30:58 2010
@@ -0,0 +1,68 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.hive.ql.plan.api;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum StageType implements TEnum {
+  CONDITIONAL(0),
+  COPY(1),
+  DDL(2),
+  MAPRED(3),
+  EXPLAIN(4),
+  FETCH(5),
+  FUNC(6),
+  MAPREDLOCAL(7),
+  MOVE(8),
+  STATS(9);
+
+  private final int value;
+
+  private StageType(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 StageType findByValue(int value) { 
+    switch (value) {
+      case 0:
+        return CONDITIONAL;
+      case 1:
+        return COPY;
+      case 2:
+        return DDL;
+      case 3:
+        return MAPRED;
+      case 4:
+        return EXPLAIN;
+      case 5:
+        return FETCH;
+      case 6:
+        return FUNC;
+      case 7:
+        return MAPREDLOCAL;
+      case 8:
+        return MOVE;
+      case 9:
+        return STATS;
+      default:
+        return null;
+    }
+  }
+}

Added: hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java?rev=1044070&view=auto
==============================================================================
--- hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java (added)
+++ hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java Thu Dec  9 18:30:58 2010
@@ -0,0 +1,1060 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.hive.ql.plan.api;
+
+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;
+
+import org.apache.thrift.*;
+import org.apache.thrift.async.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+
+public class Task implements TBase<Task, Task._Fields>, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("Task");
+
+  private static final TField TASK_ID_FIELD_DESC = new TField("taskId", TType.STRING, (short)1);
+  private static final TField TASK_TYPE_FIELD_DESC = new TField("taskType", TType.I32, (short)2);
+  private static final TField TASK_ATTRIBUTES_FIELD_DESC = new TField("taskAttributes", TType.MAP, (short)3);
+  private static final TField TASK_COUNTERS_FIELD_DESC = new TField("taskCounters", TType.MAP, (short)4);
+  private static final TField OPERATOR_GRAPH_FIELD_DESC = new TField("operatorGraph", TType.STRUCT, (short)5);
+  private static final TField OPERATOR_LIST_FIELD_DESC = new TField("operatorList", TType.LIST, (short)6);
+  private static final TField DONE_FIELD_DESC = new TField("done", TType.BOOL, (short)7);
+  private static final TField STARTED_FIELD_DESC = new TField("started", TType.BOOL, (short)8);
+
+  private String taskId;
+  private TaskType taskType;
+  private Map<String,String> taskAttributes;
+  private Map<String,Long> taskCounters;
+  private Graph operatorGraph;
+  private List<Operator> operatorList;
+  private boolean done;
+  private boolean started;
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements TFieldIdEnum {
+    TASK_ID((short)1, "taskId"),
+    /**
+     * 
+     * @see TaskType
+     */
+    TASK_TYPE((short)2, "taskType"),
+    TASK_ATTRIBUTES((short)3, "taskAttributes"),
+    TASK_COUNTERS((short)4, "taskCounters"),
+    OPERATOR_GRAPH((short)5, "operatorGraph"),
+    OPERATOR_LIST((short)6, "operatorList"),
+    DONE((short)7, "done"),
+    STARTED((short)8, "started");
+
+    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: // TASK_ID
+          return TASK_ID;
+        case 2: // TASK_TYPE
+          return TASK_TYPE;
+        case 3: // TASK_ATTRIBUTES
+          return TASK_ATTRIBUTES;
+        case 4: // TASK_COUNTERS
+          return TASK_COUNTERS;
+        case 5: // OPERATOR_GRAPH
+          return OPERATOR_GRAPH;
+        case 6: // OPERATOR_LIST
+          return OPERATOR_LIST;
+        case 7: // DONE
+          return DONE;
+        case 8: // STARTED
+          return STARTED;
+        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
+  private static final int __DONE_ISSET_ID = 0;
+  private static final int __STARTED_ISSET_ID = 1;
+  private BitSet __isset_bit_vector = new BitSet(2);
+
+  public static final Map<_Fields, FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.TASK_ID, new FieldMetaData("taskId", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.STRING)));
+    tmpMap.put(_Fields.TASK_TYPE, new FieldMetaData("taskType", TFieldRequirementType.DEFAULT, 
+        new EnumMetaData(TType.ENUM, TaskType.class)));
+    tmpMap.put(_Fields.TASK_ATTRIBUTES, new FieldMetaData("taskAttributes", TFieldRequirementType.DEFAULT, 
+        new MapMetaData(TType.MAP, 
+            new FieldValueMetaData(TType.STRING), 
+            new FieldValueMetaData(TType.STRING))));
+    tmpMap.put(_Fields.TASK_COUNTERS, new FieldMetaData("taskCounters", TFieldRequirementType.DEFAULT, 
+        new MapMetaData(TType.MAP, 
+            new FieldValueMetaData(TType.STRING), 
+            new FieldValueMetaData(TType.I64))));
+    tmpMap.put(_Fields.OPERATOR_GRAPH, new FieldMetaData("operatorGraph", TFieldRequirementType.OPTIONAL, 
+        new StructMetaData(TType.STRUCT, Graph.class)));
+    tmpMap.put(_Fields.OPERATOR_LIST, new FieldMetaData("operatorList", TFieldRequirementType.OPTIONAL, 
+        new ListMetaData(TType.LIST, 
+            new StructMetaData(TType.STRUCT, Operator.class))));
+    tmpMap.put(_Fields.DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.BOOL)));
+    tmpMap.put(_Fields.STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.BOOL)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    FieldMetaData.addStructMetaDataMap(Task.class, metaDataMap);
+  }
+
+  public Task() {
+  }
+
+  public Task(
+    String taskId,
+    TaskType taskType,
+    Map<String,String> taskAttributes,
+    Map<String,Long> taskCounters,
+    boolean done,
+    boolean started)
+  {
+    this();
+    this.taskId = taskId;
+    this.taskType = taskType;
+    this.taskAttributes = taskAttributes;
+    this.taskCounters = taskCounters;
+    this.done = done;
+    setDoneIsSet(true);
+    this.started = started;
+    setStartedIsSet(true);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Task(Task other) {
+    __isset_bit_vector.clear();
+    __isset_bit_vector.or(other.__isset_bit_vector);
+    if (other.isSetTaskId()) {
+      this.taskId = other.taskId;
+    }
+    if (other.isSetTaskType()) {
+      this.taskType = other.taskType;
+    }
+    if (other.isSetTaskAttributes()) {
+      Map<String,String> __this__taskAttributes = new HashMap<String,String>();
+      for (Map.Entry<String, String> other_element : other.taskAttributes.entrySet()) {
+
+        String other_element_key = other_element.getKey();
+        String other_element_value = other_element.getValue();
+
+        String __this__taskAttributes_copy_key = other_element_key;
+
+        String __this__taskAttributes_copy_value = other_element_value;
+
+        __this__taskAttributes.put(__this__taskAttributes_copy_key, __this__taskAttributes_copy_value);
+      }
+      this.taskAttributes = __this__taskAttributes;
+    }
+    if (other.isSetTaskCounters()) {
+      Map<String,Long> __this__taskCounters = new HashMap<String,Long>();
+      for (Map.Entry<String, Long> other_element : other.taskCounters.entrySet()) {
+
+        String other_element_key = other_element.getKey();
+        Long other_element_value = other_element.getValue();
+
+        String __this__taskCounters_copy_key = other_element_key;
+
+        Long __this__taskCounters_copy_value = other_element_value;
+
+        __this__taskCounters.put(__this__taskCounters_copy_key, __this__taskCounters_copy_value);
+      }
+      this.taskCounters = __this__taskCounters;
+    }
+    if (other.isSetOperatorGraph()) {
+      this.operatorGraph = new Graph(other.operatorGraph);
+    }
+    if (other.isSetOperatorList()) {
+      List<Operator> __this__operatorList = new ArrayList<Operator>();
+      for (Operator other_element : other.operatorList) {
+        __this__operatorList.add(new Operator(other_element));
+      }
+      this.operatorList = __this__operatorList;
+    }
+    this.done = other.done;
+    this.started = other.started;
+  }
+
+  public Task deepCopy() {
+    return new Task(this);
+  }
+
+  @Override
+  public void clear() {
+    this.taskId = null;
+    this.taskType = null;
+    this.taskAttributes = null;
+    this.taskCounters = null;
+    this.operatorGraph = null;
+    this.operatorList = null;
+    setDoneIsSet(false);
+    this.done = false;
+    setStartedIsSet(false);
+    this.started = false;
+  }
+
+  public String getTaskId() {
+    return this.taskId;
+  }
+
+  public void setTaskId(String taskId) {
+    this.taskId = taskId;
+  }
+
+  public void unsetTaskId() {
+    this.taskId = null;
+  }
+
+  /** Returns true if field taskId is set (has been asigned a value) and false otherwise */
+  public boolean isSetTaskId() {
+    return this.taskId != null;
+  }
+
+  public void setTaskIdIsSet(boolean value) {
+    if (!value) {
+      this.taskId = null;
+    }
+  }
+
+  /**
+   * 
+   * @see TaskType
+   */
+  public TaskType getTaskType() {
+    return this.taskType;
+  }
+
+  /**
+   * 
+   * @see TaskType
+   */
+  public void setTaskType(TaskType taskType) {
+    this.taskType = taskType;
+  }
+
+  public void unsetTaskType() {
+    this.taskType = null;
+  }
+
+  /** Returns true if field taskType is set (has been asigned a value) and false otherwise */
+  public boolean isSetTaskType() {
+    return this.taskType != null;
+  }
+
+  public void setTaskTypeIsSet(boolean value) {
+    if (!value) {
+      this.taskType = null;
+    }
+  }
+
+  public int getTaskAttributesSize() {
+    return (this.taskAttributes == null) ? 0 : this.taskAttributes.size();
+  }
+
+  public void putToTaskAttributes(String key, String val) {
+    if (this.taskAttributes == null) {
+      this.taskAttributes = new HashMap<String,String>();
+    }
+    this.taskAttributes.put(key, val);
+  }
+
+  public Map<String,String> getTaskAttributes() {
+    return this.taskAttributes;
+  }
+
+  public void setTaskAttributes(Map<String,String> taskAttributes) {
+    this.taskAttributes = taskAttributes;
+  }
+
+  public void unsetTaskAttributes() {
+    this.taskAttributes = null;
+  }
+
+  /** Returns true if field taskAttributes is set (has been asigned a value) and false otherwise */
+  public boolean isSetTaskAttributes() {
+    return this.taskAttributes != null;
+  }
+
+  public void setTaskAttributesIsSet(boolean value) {
+    if (!value) {
+      this.taskAttributes = null;
+    }
+  }
+
+  public int getTaskCountersSize() {
+    return (this.taskCounters == null) ? 0 : this.taskCounters.size();
+  }
+
+  public void putToTaskCounters(String key, long val) {
+    if (this.taskCounters == null) {
+      this.taskCounters = new HashMap<String,Long>();
+    }
+    this.taskCounters.put(key, val);
+  }
+
+  public Map<String,Long> getTaskCounters() {
+    return this.taskCounters;
+  }
+
+  public void setTaskCounters(Map<String,Long> taskCounters) {
+    this.taskCounters = taskCounters;
+  }
+
+  public void unsetTaskCounters() {
+    this.taskCounters = null;
+  }
+
+  /** Returns true if field taskCounters is set (has been asigned a value) and false otherwise */
+  public boolean isSetTaskCounters() {
+    return this.taskCounters != null;
+  }
+
+  public void setTaskCountersIsSet(boolean value) {
+    if (!value) {
+      this.taskCounters = null;
+    }
+  }
+
+  public Graph getOperatorGraph() {
+    return this.operatorGraph;
+  }
+
+  public void setOperatorGraph(Graph operatorGraph) {
+    this.operatorGraph = operatorGraph;
+  }
+
+  public void unsetOperatorGraph() {
+    this.operatorGraph = null;
+  }
+
+  /** Returns true if field operatorGraph is set (has been asigned a value) and false otherwise */
+  public boolean isSetOperatorGraph() {
+    return this.operatorGraph != null;
+  }
+
+  public void setOperatorGraphIsSet(boolean value) {
+    if (!value) {
+      this.operatorGraph = null;
+    }
+  }
+
+  public int getOperatorListSize() {
+    return (this.operatorList == null) ? 0 : this.operatorList.size();
+  }
+
+  public java.util.Iterator<Operator> getOperatorListIterator() {
+    return (this.operatorList == null) ? null : this.operatorList.iterator();
+  }
+
+  public void addToOperatorList(Operator elem) {
+    if (this.operatorList == null) {
+      this.operatorList = new ArrayList<Operator>();
+    }
+    this.operatorList.add(elem);
+  }
+
+  public List<Operator> getOperatorList() {
+    return this.operatorList;
+  }
+
+  public void setOperatorList(List<Operator> operatorList) {
+    this.operatorList = operatorList;
+  }
+
+  public void unsetOperatorList() {
+    this.operatorList = null;
+  }
+
+  /** Returns true if field operatorList is set (has been asigned a value) and false otherwise */
+  public boolean isSetOperatorList() {
+    return this.operatorList != null;
+  }
+
+  public void setOperatorListIsSet(boolean value) {
+    if (!value) {
+      this.operatorList = null;
+    }
+  }
+
+  public boolean isDone() {
+    return this.done;
+  }
+
+  public void setDone(boolean done) {
+    this.done = done;
+    setDoneIsSet(true);
+  }
+
+  public void unsetDone() {
+    __isset_bit_vector.clear(__DONE_ISSET_ID);
+  }
+
+  /** Returns true if field done is set (has been asigned a value) and false otherwise */
+  public boolean isSetDone() {
+    return __isset_bit_vector.get(__DONE_ISSET_ID);
+  }
+
+  public void setDoneIsSet(boolean value) {
+    __isset_bit_vector.set(__DONE_ISSET_ID, value);
+  }
+
+  public boolean isStarted() {
+    return this.started;
+  }
+
+  public void setStarted(boolean started) {
+    this.started = started;
+    setStartedIsSet(true);
+  }
+
+  public void unsetStarted() {
+    __isset_bit_vector.clear(__STARTED_ISSET_ID);
+  }
+
+  /** Returns true if field started is set (has been asigned a value) and false otherwise */
+  public boolean isSetStarted() {
+    return __isset_bit_vector.get(__STARTED_ISSET_ID);
+  }
+
+  public void setStartedIsSet(boolean value) {
+    __isset_bit_vector.set(__STARTED_ISSET_ID, value);
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case TASK_ID:
+      if (value == null) {
+        unsetTaskId();
+      } else {
+        setTaskId((String)value);
+      }
+      break;
+
+    case TASK_TYPE:
+      if (value == null) {
+        unsetTaskType();
+      } else {
+        setTaskType((TaskType)value);
+      }
+      break;
+
+    case TASK_ATTRIBUTES:
+      if (value == null) {
+        unsetTaskAttributes();
+      } else {
+        setTaskAttributes((Map<String,String>)value);
+      }
+      break;
+
+    case TASK_COUNTERS:
+      if (value == null) {
+        unsetTaskCounters();
+      } else {
+        setTaskCounters((Map<String,Long>)value);
+      }
+      break;
+
+    case OPERATOR_GRAPH:
+      if (value == null) {
+        unsetOperatorGraph();
+      } else {
+        setOperatorGraph((Graph)value);
+      }
+      break;
+
+    case OPERATOR_LIST:
+      if (value == null) {
+        unsetOperatorList();
+      } else {
+        setOperatorList((List<Operator>)value);
+      }
+      break;
+
+    case DONE:
+      if (value == null) {
+        unsetDone();
+      } else {
+        setDone((Boolean)value);
+      }
+      break;
+
+    case STARTED:
+      if (value == null) {
+        unsetStarted();
+      } else {
+        setStarted((Boolean)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case TASK_ID:
+      return getTaskId();
+
+    case TASK_TYPE:
+      return getTaskType();
+
+    case TASK_ATTRIBUTES:
+      return getTaskAttributes();
+
+    case TASK_COUNTERS:
+      return getTaskCounters();
+
+    case OPERATOR_GRAPH:
+      return getOperatorGraph();
+
+    case OPERATOR_LIST:
+      return getOperatorList();
+
+    case DONE:
+      return new Boolean(isDone());
+
+    case STARTED:
+      return new Boolean(isStarted());
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case TASK_ID:
+      return isSetTaskId();
+    case TASK_TYPE:
+      return isSetTaskType();
+    case TASK_ATTRIBUTES:
+      return isSetTaskAttributes();
+    case TASK_COUNTERS:
+      return isSetTaskCounters();
+    case OPERATOR_GRAPH:
+      return isSetOperatorGraph();
+    case OPERATOR_LIST:
+      return isSetOperatorList();
+    case DONE:
+      return isSetDone();
+    case STARTED:
+      return isSetStarted();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Task)
+      return this.equals((Task)that);
+    return false;
+  }
+
+  public boolean equals(Task that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_taskId = true && this.isSetTaskId();
+    boolean that_present_taskId = true && that.isSetTaskId();
+    if (this_present_taskId || that_present_taskId) {
+      if (!(this_present_taskId && that_present_taskId))
+        return false;
+      if (!this.taskId.equals(that.taskId))
+        return false;
+    }
+
+    boolean this_present_taskType = true && this.isSetTaskType();
+    boolean that_present_taskType = true && that.isSetTaskType();
+    if (this_present_taskType || that_present_taskType) {
+      if (!(this_present_taskType && that_present_taskType))
+        return false;
+      if (!this.taskType.equals(that.taskType))
+        return false;
+    }
+
+    boolean this_present_taskAttributes = true && this.isSetTaskAttributes();
+    boolean that_present_taskAttributes = true && that.isSetTaskAttributes();
+    if (this_present_taskAttributes || that_present_taskAttributes) {
+      if (!(this_present_taskAttributes && that_present_taskAttributes))
+        return false;
+      if (!this.taskAttributes.equals(that.taskAttributes))
+        return false;
+    }
+
+    boolean this_present_taskCounters = true && this.isSetTaskCounters();
+    boolean that_present_taskCounters = true && that.isSetTaskCounters();
+    if (this_present_taskCounters || that_present_taskCounters) {
+      if (!(this_present_taskCounters && that_present_taskCounters))
+        return false;
+      if (!this.taskCounters.equals(that.taskCounters))
+        return false;
+    }
+
+    boolean this_present_operatorGraph = true && this.isSetOperatorGraph();
+    boolean that_present_operatorGraph = true && that.isSetOperatorGraph();
+    if (this_present_operatorGraph || that_present_operatorGraph) {
+      if (!(this_present_operatorGraph && that_present_operatorGraph))
+        return false;
+      if (!this.operatorGraph.equals(that.operatorGraph))
+        return false;
+    }
+
+    boolean this_present_operatorList = true && this.isSetOperatorList();
+    boolean that_present_operatorList = true && that.isSetOperatorList();
+    if (this_present_operatorList || that_present_operatorList) {
+      if (!(this_present_operatorList && that_present_operatorList))
+        return false;
+      if (!this.operatorList.equals(that.operatorList))
+        return false;
+    }
+
+    boolean this_present_done = true;
+    boolean that_present_done = true;
+    if (this_present_done || that_present_done) {
+      if (!(this_present_done && that_present_done))
+        return false;
+      if (this.done != that.done)
+        return false;
+    }
+
+    boolean this_present_started = true;
+    boolean that_present_started = true;
+    if (this_present_started || that_present_started) {
+      if (!(this_present_started && that_present_started))
+        return false;
+      if (this.started != that.started)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(Task other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    Task typedOther = (Task)other;
+
+    lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(typedOther.isSetTaskId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTaskId()) {
+      lastComparison = TBaseHelper.compareTo(this.taskId, typedOther.taskId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetTaskType()).compareTo(typedOther.isSetTaskType());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTaskType()) {
+      lastComparison = TBaseHelper.compareTo(this.taskType, typedOther.taskType);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetTaskAttributes()).compareTo(typedOther.isSetTaskAttributes());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTaskAttributes()) {
+      lastComparison = TBaseHelper.compareTo(this.taskAttributes, typedOther.taskAttributes);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetTaskCounters()).compareTo(typedOther.isSetTaskCounters());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTaskCounters()) {
+      lastComparison = TBaseHelper.compareTo(this.taskCounters, typedOther.taskCounters);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetOperatorGraph()).compareTo(typedOther.isSetOperatorGraph());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetOperatorGraph()) {
+      lastComparison = TBaseHelper.compareTo(this.operatorGraph, typedOther.operatorGraph);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetOperatorList()).compareTo(typedOther.isSetOperatorList());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetOperatorList()) {
+      lastComparison = TBaseHelper.compareTo(this.operatorList, typedOther.operatorList);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetDone()).compareTo(typedOther.isSetDone());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDone()) {
+      lastComparison = TBaseHelper.compareTo(this.done, typedOther.done);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetStarted()).compareTo(typedOther.isSetStarted());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetStarted()) {
+      lastComparison = TBaseHelper.compareTo(this.started, typedOther.started);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id) {
+        case 1: // TASK_ID
+          if (field.type == TType.STRING) {
+            this.taskId = iprot.readString();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 2: // TASK_TYPE
+          if (field.type == TType.I32) {
+            this.taskType = TaskType.findByValue(iprot.readI32());
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 3: // TASK_ATTRIBUTES
+          if (field.type == TType.MAP) {
+            {
+              TMap _map22 = iprot.readMapBegin();
+              this.taskAttributes = new HashMap<String,String>(2*_map22.size);
+              for (int _i23 = 0; _i23 < _map22.size; ++_i23)
+              {
+                String _key24;
+                String _val25;
+                _key24 = iprot.readString();
+                _val25 = iprot.readString();
+                this.taskAttributes.put(_key24, _val25);
+              }
+              iprot.readMapEnd();
+            }
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 4: // TASK_COUNTERS
+          if (field.type == TType.MAP) {
+            {
+              TMap _map26 = iprot.readMapBegin();
+              this.taskCounters = new HashMap<String,Long>(2*_map26.size);
+              for (int _i27 = 0; _i27 < _map26.size; ++_i27)
+              {
+                String _key28;
+                long _val29;
+                _key28 = iprot.readString();
+                _val29 = iprot.readI64();
+                this.taskCounters.put(_key28, _val29);
+              }
+              iprot.readMapEnd();
+            }
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 5: // OPERATOR_GRAPH
+          if (field.type == TType.STRUCT) {
+            this.operatorGraph = new Graph();
+            this.operatorGraph.read(iprot);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 6: // OPERATOR_LIST
+          if (field.type == TType.LIST) {
+            {
+              TList _list30 = iprot.readListBegin();
+              this.operatorList = new ArrayList<Operator>(_list30.size);
+              for (int _i31 = 0; _i31 < _list30.size; ++_i31)
+              {
+                Operator _elem32;
+                _elem32 = new Operator();
+                _elem32.read(iprot);
+                this.operatorList.add(_elem32);
+              }
+              iprot.readListEnd();
+            }
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 7: // DONE
+          if (field.type == TType.BOOL) {
+            this.done = iprot.readBool();
+            setDoneIsSet(true);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 8: // STARTED
+          if (field.type == TType.BOOL) {
+            this.started = iprot.readBool();
+            setStartedIsSet(true);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+    validate();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.taskId != null) {
+      oprot.writeFieldBegin(TASK_ID_FIELD_DESC);
+      oprot.writeString(this.taskId);
+      oprot.writeFieldEnd();
+    }
+    if (this.taskType != null) {
+      oprot.writeFieldBegin(TASK_TYPE_FIELD_DESC);
+      oprot.writeI32(this.taskType.getValue());
+      oprot.writeFieldEnd();
+    }
+    if (this.taskAttributes != null) {
+      oprot.writeFieldBegin(TASK_ATTRIBUTES_FIELD_DESC);
+      {
+        oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.taskAttributes.size()));
+        for (Map.Entry<String, String> _iter33 : this.taskAttributes.entrySet())
+        {
+          oprot.writeString(_iter33.getKey());
+          oprot.writeString(_iter33.getValue());
+        }
+        oprot.writeMapEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    if (this.taskCounters != null) {
+      oprot.writeFieldBegin(TASK_COUNTERS_FIELD_DESC);
+      {
+        oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.taskCounters.size()));
+        for (Map.Entry<String, Long> _iter34 : this.taskCounters.entrySet())
+        {
+          oprot.writeString(_iter34.getKey());
+          oprot.writeI64(_iter34.getValue());
+        }
+        oprot.writeMapEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    if (this.operatorGraph != null) {
+      if (isSetOperatorGraph()) {
+        oprot.writeFieldBegin(OPERATOR_GRAPH_FIELD_DESC);
+        this.operatorGraph.write(oprot);
+        oprot.writeFieldEnd();
+      }
+    }
+    if (this.operatorList != null) {
+      if (isSetOperatorList()) {
+        oprot.writeFieldBegin(OPERATOR_LIST_FIELD_DESC);
+        {
+          oprot.writeListBegin(new TList(TType.STRUCT, this.operatorList.size()));
+          for (Operator _iter35 : this.operatorList)
+          {
+            _iter35.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+    }
+    oprot.writeFieldBegin(DONE_FIELD_DESC);
+    oprot.writeBool(this.done);
+    oprot.writeFieldEnd();
+    oprot.writeFieldBegin(STARTED_FIELD_DESC);
+    oprot.writeBool(this.started);
+    oprot.writeFieldEnd();
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Task(");
+    boolean first = true;
+
+    sb.append("taskId:");
+    if (this.taskId == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.taskId);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("taskType:");
+    if (this.taskType == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.taskType);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("taskAttributes:");
+    if (this.taskAttributes == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.taskAttributes);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("taskCounters:");
+    if (this.taskCounters == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.taskCounters);
+    }
+    first = false;
+    if (isSetOperatorGraph()) {
+      if (!first) sb.append(", ");
+      sb.append("operatorGraph:");
+      if (this.operatorGraph == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.operatorGraph);
+      }
+      first = false;
+    }
+    if (isSetOperatorList()) {
+      if (!first) sb.append(", ");
+      sb.append("operatorList:");
+      if (this.operatorList == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.operatorList);
+      }
+      first = false;
+    }
+    if (!first) sb.append(", ");
+    sb.append("done:");
+    sb.append(this.done);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("started:");
+    sb.append(this.started);
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+  }
+
+}
+

Added: hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java?rev=1044070&view=auto
==============================================================================
--- hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java (added)
+++ hive/trunk/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java Thu Dec  9 18:30:58 2010
@@ -0,0 +1,47 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.hive.ql.plan.api;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum TaskType implements TEnum {
+  MAP(0),
+  REDUCE(1),
+  OTHER(2);
+
+  private final int value;
+
+  private TaskType(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 TaskType findByValue(int value) { 
+    switch (value) {
+      case 0:
+        return MAP;
+      case 1:
+        return REDUCE;
+      case 2:
+        return OTHER;
+      default:
+        return null;
+    }
+  }
+}