incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [15/51] [partial] Fixed BLUR-126.
Date Thu, 06 Jun 2013 18:57:47 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b0e26648/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurQueryStatus.java
----------------------------------------------------------------------
diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurQueryStatus.java b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurQueryStatus.java
new file mode 100644
index 0000000..ca5cb69
--- /dev/null
+++ b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurQueryStatus.java
@@ -0,0 +1,1062 @@
+/**
+ * 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;
+
+/**
+ * The BlurQueryStatus object hold the status of BlurQueries.  The state of the query
+ * (QueryState), the number of shards the query is executing against, the number of
+ * shards that are complete, etc.
+ */
+public class BlurQueryStatus implements org.apache.blur.thirdparty.thrift_0_9_0.TBase<BlurQueryStatus, BlurQueryStatus._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("BlurQueryStatus");
+
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField QUERY_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("query", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, (short)1);
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField CPU_TIMES_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("cpuTimes", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, (short)2);
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField COMPLETE_SHARDS_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("completeShards", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I32, (short)3);
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField TOTAL_SHARDS_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("totalShards", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I32, (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 org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField UUID_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("uuid", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I64, (short)6);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new BlurQueryStatusStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new BlurQueryStatusTupleSchemeFactory());
+  }
+
+  /**
+   * The original query.
+   */
+  public BlurQuery query; // required
+  /**
+   * A map of shard names to CpuTime, one for each shard in the table.
+   */
+  public Map<String,CpuTime> cpuTimes; // required
+  /**
+   * The number of completed shards.  The shard server will respond with
+   * how many are complete on that server, while the controller will aggregate
+   * all the shard server completed totals together.
+   */
+  public int completeShards; // required
+  /**
+   * The total number of shards that the query is executing against.  The shard
+   * server will respond with how many shards are being queried on that server, while
+   * the controller will aggregate all the shard server totals together.
+   */
+  public int totalShards; // required
+  /**
+   * The state of the query.  e.g. RUNNING, INTERRUPTED, COMPLETE
+   * 
+   * @see QueryState
+   */
+  public QueryState state; // required
+  /**
+   * The uuid of the query.
+   */
+  public long uuid; // 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 {
+    /**
+     * The original query.
+     */
+    QUERY((short)1, "query"),
+    /**
+     * A map of shard names to CpuTime, one for each shard in the table.
+     */
+    CPU_TIMES((short)2, "cpuTimes"),
+    /**
+     * The number of completed shards.  The shard server will respond with
+     * how many are complete on that server, while the controller will aggregate
+     * all the shard server completed totals together.
+     */
+    COMPLETE_SHARDS((short)3, "completeShards"),
+    /**
+     * The total number of shards that the query is executing against.  The shard
+     * server will respond with how many shards are being queried on that server, while
+     * the controller will aggregate all the shard server totals together.
+     */
+    TOTAL_SHARDS((short)4, "totalShards"),
+    /**
+     * The state of the query.  e.g. RUNNING, INTERRUPTED, COMPLETE
+     * 
+     * @see QueryState
+     */
+    STATE((short)5, "state"),
+    /**
+     * The uuid of the query.
+     */
+    UUID((short)6, "uuid");
+
+    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: // QUERY
+          return QUERY;
+        case 2: // CPU_TIMES
+          return CPU_TIMES;
+        case 3: // COMPLETE_SHARDS
+          return COMPLETE_SHARDS;
+        case 4: // TOTAL_SHARDS
+          return TOTAL_SHARDS;
+        case 5: // STATE
+          return STATE;
+        case 6: // UUID
+          return UUID;
+        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 __COMPLETESHARDS_ISSET_ID = 0;
+  private static final int __TOTALSHARDS_ISSET_ID = 1;
+  private static final int __UUID_ISSET_ID = 2;
+  private byte __isset_bitfield = 0;
+  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.QUERY, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("query", 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, BlurQuery.class)));
+    tmpMap.put(_Fields.CPU_TIMES, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("cpuTimes", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, 
+        new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.MapMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, 
+            new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING), 
+            new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.StructMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, CpuTime.class))));
+    tmpMap.put(_Fields.COMPLETE_SHARDS, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("completeShards", 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.I32)));
+    tmpMap.put(_Fields.TOTAL_SHARDS, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("totalShards", 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.I32)));
+    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, QueryState.class)));
+    tmpMap.put(_Fields.UUID, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("uuid", 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.I64)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData.addStructMetaDataMap(BlurQueryStatus.class, metaDataMap);
+  }
+
+  public BlurQueryStatus() {
+  }
+
+  public BlurQueryStatus(
+    BlurQuery query,
+    Map<String,CpuTime> cpuTimes,
+    int completeShards,
+    int totalShards,
+    QueryState state,
+    long uuid)
+  {
+    this();
+    this.query = query;
+    this.cpuTimes = cpuTimes;
+    this.completeShards = completeShards;
+    setCompleteShardsIsSet(true);
+    this.totalShards = totalShards;
+    setTotalShardsIsSet(true);
+    this.state = state;
+    this.uuid = uuid;
+    setUuidIsSet(true);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public BlurQueryStatus(BlurQueryStatus other) {
+    __isset_bitfield = other.__isset_bitfield;
+    if (other.isSetQuery()) {
+      this.query = new BlurQuery(other.query);
+    }
+    if (other.isSetCpuTimes()) {
+      Map<String,CpuTime> __this__cpuTimes = new HashMap<String,CpuTime>();
+      for (Map.Entry<String, CpuTime> other_element : other.cpuTimes.entrySet()) {
+
+        String other_element_key = other_element.getKey();
+        CpuTime other_element_value = other_element.getValue();
+
+        String __this__cpuTimes_copy_key = other_element_key;
+
+        CpuTime __this__cpuTimes_copy_value = new CpuTime(other_element_value);
+
+        __this__cpuTimes.put(__this__cpuTimes_copy_key, __this__cpuTimes_copy_value);
+      }
+      this.cpuTimes = __this__cpuTimes;
+    }
+    this.completeShards = other.completeShards;
+    this.totalShards = other.totalShards;
+    if (other.isSetState()) {
+      this.state = other.state;
+    }
+    this.uuid = other.uuid;
+  }
+
+  public BlurQueryStatus deepCopy() {
+    return new BlurQueryStatus(this);
+  }
+
+  @Override
+  public void clear() {
+    this.query = null;
+    this.cpuTimes = null;
+    setCompleteShardsIsSet(false);
+    this.completeShards = 0;
+    setTotalShardsIsSet(false);
+    this.totalShards = 0;
+    this.state = null;
+    setUuidIsSet(false);
+    this.uuid = 0;
+  }
+
+  /**
+   * The original query.
+   */
+  public BlurQuery getQuery() {
+    return this.query;
+  }
+
+  /**
+   * The original query.
+   */
+  public BlurQueryStatus setQuery(BlurQuery query) {
+    this.query = query;
+    return this;
+  }
+
+  public void unsetQuery() {
+    this.query = null;
+  }
+
+  /** Returns true if field query is set (has been assigned a value) and false otherwise */
+  public boolean isSetQuery() {
+    return this.query != null;
+  }
+
+  public void setQueryIsSet(boolean value) {
+    if (!value) {
+      this.query = null;
+    }
+  }
+
+  public int getCpuTimesSize() {
+    return (this.cpuTimes == null) ? 0 : this.cpuTimes.size();
+  }
+
+  public void putToCpuTimes(String key, CpuTime val) {
+    if (this.cpuTimes == null) {
+      this.cpuTimes = new HashMap<String,CpuTime>();
+    }
+    this.cpuTimes.put(key, val);
+  }
+
+  /**
+   * A map of shard names to CpuTime, one for each shard in the table.
+   */
+  public Map<String,CpuTime> getCpuTimes() {
+    return this.cpuTimes;
+  }
+
+  /**
+   * A map of shard names to CpuTime, one for each shard in the table.
+   */
+  public BlurQueryStatus setCpuTimes(Map<String,CpuTime> cpuTimes) {
+    this.cpuTimes = cpuTimes;
+    return this;
+  }
+
+  public void unsetCpuTimes() {
+    this.cpuTimes = null;
+  }
+
+  /** Returns true if field cpuTimes is set (has been assigned a value) and false otherwise */
+  public boolean isSetCpuTimes() {
+    return this.cpuTimes != null;
+  }
+
+  public void setCpuTimesIsSet(boolean value) {
+    if (!value) {
+      this.cpuTimes = null;
+    }
+  }
+
+  /**
+   * The number of completed shards.  The shard server will respond with
+   * how many are complete on that server, while the controller will aggregate
+   * all the shard server completed totals together.
+   */
+  public int getCompleteShards() {
+    return this.completeShards;
+  }
+
+  /**
+   * The number of completed shards.  The shard server will respond with
+   * how many are complete on that server, while the controller will aggregate
+   * all the shard server completed totals together.
+   */
+  public BlurQueryStatus setCompleteShards(int completeShards) {
+    this.completeShards = completeShards;
+    setCompleteShardsIsSet(true);
+    return this;
+  }
+
+  public void unsetCompleteShards() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COMPLETESHARDS_ISSET_ID);
+  }
+
+  /** Returns true if field completeShards is set (has been assigned a value) and false otherwise */
+  public boolean isSetCompleteShards() {
+    return EncodingUtils.testBit(__isset_bitfield, __COMPLETESHARDS_ISSET_ID);
+  }
+
+  public void setCompleteShardsIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COMPLETESHARDS_ISSET_ID, value);
+  }
+
+  /**
+   * The total number of shards that the query is executing against.  The shard
+   * server will respond with how many shards are being queried on that server, while
+   * the controller will aggregate all the shard server totals together.
+   */
+  public int getTotalShards() {
+    return this.totalShards;
+  }
+
+  /**
+   * The total number of shards that the query is executing against.  The shard
+   * server will respond with how many shards are being queried on that server, while
+   * the controller will aggregate all the shard server totals together.
+   */
+  public BlurQueryStatus setTotalShards(int totalShards) {
+    this.totalShards = totalShards;
+    setTotalShardsIsSet(true);
+    return this;
+  }
+
+  public void unsetTotalShards() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTALSHARDS_ISSET_ID);
+  }
+
+  /** Returns true if field totalShards is set (has been assigned a value) and false otherwise */
+  public boolean isSetTotalShards() {
+    return EncodingUtils.testBit(__isset_bitfield, __TOTALSHARDS_ISSET_ID);
+  }
+
+  public void setTotalShardsIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTALSHARDS_ISSET_ID, value);
+  }
+
+  /**
+   * The state of the query.  e.g. RUNNING, INTERRUPTED, COMPLETE
+   * 
+   * @see QueryState
+   */
+  public QueryState getState() {
+    return this.state;
+  }
+
+  /**
+   * The state of the query.  e.g. RUNNING, INTERRUPTED, COMPLETE
+   * 
+   * @see QueryState
+   */
+  public BlurQueryStatus setState(QueryState 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;
+    }
+  }
+
+  /**
+   * The uuid of the query.
+   */
+  public long getUuid() {
+    return this.uuid;
+  }
+
+  /**
+   * The uuid of the query.
+   */
+  public BlurQueryStatus setUuid(long uuid) {
+    this.uuid = uuid;
+    setUuidIsSet(true);
+    return this;
+  }
+
+  public void unsetUuid() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UUID_ISSET_ID);
+  }
+
+  /** Returns true if field uuid is set (has been assigned a value) and false otherwise */
+  public boolean isSetUuid() {
+    return EncodingUtils.testBit(__isset_bitfield, __UUID_ISSET_ID);
+  }
+
+  public void setUuidIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UUID_ISSET_ID, value);
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case QUERY:
+      if (value == null) {
+        unsetQuery();
+      } else {
+        setQuery((BlurQuery)value);
+      }
+      break;
+
+    case CPU_TIMES:
+      if (value == null) {
+        unsetCpuTimes();
+      } else {
+        setCpuTimes((Map<String,CpuTime>)value);
+      }
+      break;
+
+    case COMPLETE_SHARDS:
+      if (value == null) {
+        unsetCompleteShards();
+      } else {
+        setCompleteShards((Integer)value);
+      }
+      break;
+
+    case TOTAL_SHARDS:
+      if (value == null) {
+        unsetTotalShards();
+      } else {
+        setTotalShards((Integer)value);
+      }
+      break;
+
+    case STATE:
+      if (value == null) {
+        unsetState();
+      } else {
+        setState((QueryState)value);
+      }
+      break;
+
+    case UUID:
+      if (value == null) {
+        unsetUuid();
+      } else {
+        setUuid((Long)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case QUERY:
+      return getQuery();
+
+    case CPU_TIMES:
+      return getCpuTimes();
+
+    case COMPLETE_SHARDS:
+      return Integer.valueOf(getCompleteShards());
+
+    case TOTAL_SHARDS:
+      return Integer.valueOf(getTotalShards());
+
+    case STATE:
+      return getState();
+
+    case UUID:
+      return Long.valueOf(getUuid());
+
+    }
+    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 QUERY:
+      return isSetQuery();
+    case CPU_TIMES:
+      return isSetCpuTimes();
+    case COMPLETE_SHARDS:
+      return isSetCompleteShards();
+    case TOTAL_SHARDS:
+      return isSetTotalShards();
+    case STATE:
+      return isSetState();
+    case UUID:
+      return isSetUuid();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof BlurQueryStatus)
+      return this.equals((BlurQueryStatus)that);
+    return false;
+  }
+
+  public boolean equals(BlurQueryStatus that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_query = true && this.isSetQuery();
+    boolean that_present_query = true && that.isSetQuery();
+    if (this_present_query || that_present_query) {
+      if (!(this_present_query && that_present_query))
+        return false;
+      if (!this.query.equals(that.query))
+        return false;
+    }
+
+    boolean this_present_cpuTimes = true && this.isSetCpuTimes();
+    boolean that_present_cpuTimes = true && that.isSetCpuTimes();
+    if (this_present_cpuTimes || that_present_cpuTimes) {
+      if (!(this_present_cpuTimes && that_present_cpuTimes))
+        return false;
+      if (!this.cpuTimes.equals(that.cpuTimes))
+        return false;
+    }
+
+    boolean this_present_completeShards = true;
+    boolean that_present_completeShards = true;
+    if (this_present_completeShards || that_present_completeShards) {
+      if (!(this_present_completeShards && that_present_completeShards))
+        return false;
+      if (this.completeShards != that.completeShards)
+        return false;
+    }
+
+    boolean this_present_totalShards = true;
+    boolean that_present_totalShards = true;
+    if (this_present_totalShards || that_present_totalShards) {
+      if (!(this_present_totalShards && that_present_totalShards))
+        return false;
+      if (this.totalShards != that.totalShards)
+        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;
+    }
+
+    boolean this_present_uuid = true;
+    boolean that_present_uuid = true;
+    if (this_present_uuid || that_present_uuid) {
+      if (!(this_present_uuid && that_present_uuid))
+        return false;
+      if (this.uuid != that.uuid)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(BlurQueryStatus other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    BlurQueryStatus typedOther = (BlurQueryStatus)other;
+
+    lastComparison = Boolean.valueOf(isSetQuery()).compareTo(typedOther.isSetQuery());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetQuery()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.query, typedOther.query);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetCpuTimes()).compareTo(typedOther.isSetCpuTimes());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCpuTimes()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.cpuTimes, typedOther.cpuTimes);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetCompleteShards()).compareTo(typedOther.isSetCompleteShards());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCompleteShards()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.completeShards, typedOther.completeShards);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetTotalShards()).compareTo(typedOther.isSetTotalShards());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTotalShards()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.totalShards, typedOther.totalShards);
+      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;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetUuid()).compareTo(typedOther.isSetUuid());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetUuid()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.uuid, typedOther.uuid);
+      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("BlurQueryStatus(");
+    boolean first = true;
+
+    sb.append("query:");
+    if (this.query == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.query);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("cpuTimes:");
+    if (this.cpuTimes == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.cpuTimes);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("completeShards:");
+    sb.append(this.completeShards);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("totalShards:");
+    sb.append(this.totalShards);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("state:");
+    if (this.state == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.state);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("uuid:");
+    sb.append(this.uuid);
+    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 (query != null) {
+      query.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 {
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+      __isset_bitfield = 0;
+      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 BlurQueryStatusStandardSchemeFactory implements SchemeFactory {
+    public BlurQueryStatusStandardScheme getScheme() {
+      return new BlurQueryStatusStandardScheme();
+    }
+  }
+
+  private static class BlurQueryStatusStandardScheme extends StandardScheme<BlurQueryStatus> {
+
+    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot, BlurQueryStatus 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: // QUERY
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT) {
+              struct.query = new BlurQuery();
+              struct.query.read(iprot);
+              struct.setQueryIsSet(true);
+            } else { 
+              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // CPU_TIMES
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP) {
+              {
+                org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map100 = iprot.readMapBegin();
+                struct.cpuTimes = new HashMap<String,CpuTime>(2*_map100.size);
+                for (int _i101 = 0; _i101 < _map100.size; ++_i101)
+                {
+                  String _key102; // required
+                  CpuTime _val103; // optional
+                  _key102 = iprot.readString();
+                  _val103 = new CpuTime();
+                  _val103.read(iprot);
+                  struct.cpuTimes.put(_key102, _val103);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setCpuTimesIsSet(true);
+            } else { 
+              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // COMPLETE_SHARDS
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I32) {
+              struct.completeShards = iprot.readI32();
+              struct.setCompleteShardsIsSet(true);
+            } else { 
+              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // TOTAL_SHARDS
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I32) {
+              struct.totalShards = iprot.readI32();
+              struct.setTotalShardsIsSet(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 = QueryState.findByValue(iprot.readI32());
+              struct.setStateIsSet(true);
+            } else { 
+              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // UUID
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.I64) {
+              struct.uuid = iprot.readI64();
+              struct.setUuidIsSet(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, BlurQueryStatus struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.query != null) {
+        oprot.writeFieldBegin(QUERY_FIELD_DESC);
+        struct.query.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.cpuTimes != null) {
+        oprot.writeFieldBegin(CPU_TIMES_FIELD_DESC);
+        {
+          oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, struct.cpuTimes.size()));
+          for (Map.Entry<String, CpuTime> _iter104 : struct.cpuTimes.entrySet())
+          {
+            oprot.writeString(_iter104.getKey());
+            _iter104.getValue().write(oprot);
+          }
+          oprot.writeMapEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(COMPLETE_SHARDS_FIELD_DESC);
+      oprot.writeI32(struct.completeShards);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(TOTAL_SHARDS_FIELD_DESC);
+      oprot.writeI32(struct.totalShards);
+      oprot.writeFieldEnd();
+      if (struct.state != null) {
+        oprot.writeFieldBegin(STATE_FIELD_DESC);
+        oprot.writeI32(struct.state.getValue());
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(UUID_FIELD_DESC);
+      oprot.writeI64(struct.uuid);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class BlurQueryStatusTupleSchemeFactory implements SchemeFactory {
+    public BlurQueryStatusTupleScheme getScheme() {
+      return new BlurQueryStatusTupleScheme();
+    }
+  }
+
+  private static class BlurQueryStatusTupleScheme extends TupleScheme<BlurQueryStatus> {
+
+    @Override
+    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, BlurQueryStatus struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetQuery()) {
+        optionals.set(0);
+      }
+      if (struct.isSetCpuTimes()) {
+        optionals.set(1);
+      }
+      if (struct.isSetCompleteShards()) {
+        optionals.set(2);
+      }
+      if (struct.isSetTotalShards()) {
+        optionals.set(3);
+      }
+      if (struct.isSetState()) {
+        optionals.set(4);
+      }
+      if (struct.isSetUuid()) {
+        optionals.set(5);
+      }
+      oprot.writeBitSet(optionals, 6);
+      if (struct.isSetQuery()) {
+        struct.query.write(oprot);
+      }
+      if (struct.isSetCpuTimes()) {
+        {
+          oprot.writeI32(struct.cpuTimes.size());
+          for (Map.Entry<String, CpuTime> _iter105 : struct.cpuTimes.entrySet())
+          {
+            oprot.writeString(_iter105.getKey());
+            _iter105.getValue().write(oprot);
+          }
+        }
+      }
+      if (struct.isSetCompleteShards()) {
+        oprot.writeI32(struct.completeShards);
+      }
+      if (struct.isSetTotalShards()) {
+        oprot.writeI32(struct.totalShards);
+      }
+      if (struct.isSetState()) {
+        oprot.writeI32(struct.state.getValue());
+      }
+      if (struct.isSetUuid()) {
+        oprot.writeI64(struct.uuid);
+      }
+    }
+
+    @Override
+    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, BlurQueryStatus struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(6);
+      if (incoming.get(0)) {
+        struct.query = new BlurQuery();
+        struct.query.read(iprot);
+        struct.setQueryIsSet(true);
+      }
+      if (incoming.get(1)) {
+        {
+          org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map106 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, iprot.readI32());
+          struct.cpuTimes = new HashMap<String,CpuTime>(2*_map106.size);
+          for (int _i107 = 0; _i107 < _map106.size; ++_i107)
+          {
+            String _key108; // required
+            CpuTime _val109; // optional
+            _key108 = iprot.readString();
+            _val109 = new CpuTime();
+            _val109.read(iprot);
+            struct.cpuTimes.put(_key108, _val109);
+          }
+        }
+        struct.setCpuTimesIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.completeShards = iprot.readI32();
+        struct.setCompleteShardsIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.totalShards = iprot.readI32();
+        struct.setTotalShardsIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.state = QueryState.findByValue(iprot.readI32());
+        struct.setStateIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.uuid = iprot.readI64();
+        struct.setUuidIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b0e26648/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurResult.java
----------------------------------------------------------------------
diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurResult.java b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurResult.java
new file mode 100644
index 0000000..aaba1d5
--- /dev/null
+++ b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurResult.java
@@ -0,0 +1,647 @@
+/**
+ * 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 BlurResult implements org.apache.blur.thirdparty.thrift_0_9_0.TBase<BlurResult, BlurResult._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("BlurResult");
+
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField LOCATION_ID_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("locationId", 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 SCORE_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("score", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.DOUBLE, (short)2);
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField FETCH_RESULT_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("fetchResult", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, (short)3);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new BlurResultStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new BlurResultTupleSchemeFactory());
+  }
+
+  /**
+   * WARNING: This is an internal only attribute and is not intended for use by clients.
+   */
+  public String locationId; // required
+  /**
+   * 
+   */
+  public double score; // required
+  /**
+   * 
+   */
+  public FetchResult fetchResult; // 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 {
+    /**
+     * WARNING: This is an internal only attribute and is not intended for use by clients.
+     */
+    LOCATION_ID((short)1, "locationId"),
+    /**
+     * 
+     */
+    SCORE((short)2, "score"),
+    /**
+     * 
+     */
+    FETCH_RESULT((short)3, "fetchResult");
+
+    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: // LOCATION_ID
+          return LOCATION_ID;
+        case 2: // SCORE
+          return SCORE;
+        case 3: // FETCH_RESULT
+          return FETCH_RESULT;
+        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 __SCORE_ISSET_ID = 0;
+  private byte __isset_bitfield = 0;
+  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.LOCATION_ID, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("locationId", 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.SCORE, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("score", 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.DOUBLE)));
+    tmpMap.put(_Fields.FETCH_RESULT, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("fetchResult", 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, FetchResult.class)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData.addStructMetaDataMap(BlurResult.class, metaDataMap);
+  }
+
+  public BlurResult() {
+  }
+
+  public BlurResult(
+    String locationId,
+    double score,
+    FetchResult fetchResult)
+  {
+    this();
+    this.locationId = locationId;
+    this.score = score;
+    setScoreIsSet(true);
+    this.fetchResult = fetchResult;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public BlurResult(BlurResult other) {
+    __isset_bitfield = other.__isset_bitfield;
+    if (other.isSetLocationId()) {
+      this.locationId = other.locationId;
+    }
+    this.score = other.score;
+    if (other.isSetFetchResult()) {
+      this.fetchResult = new FetchResult(other.fetchResult);
+    }
+  }
+
+  public BlurResult deepCopy() {
+    return new BlurResult(this);
+  }
+
+  @Override
+  public void clear() {
+    this.locationId = null;
+    setScoreIsSet(false);
+    this.score = 0.0;
+    this.fetchResult = null;
+  }
+
+  /**
+   * WARNING: This is an internal only attribute and is not intended for use by clients.
+   */
+  public String getLocationId() {
+    return this.locationId;
+  }
+
+  /**
+   * WARNING: This is an internal only attribute and is not intended for use by clients.
+   */
+  public BlurResult setLocationId(String locationId) {
+    this.locationId = locationId;
+    return this;
+  }
+
+  public void unsetLocationId() {
+    this.locationId = null;
+  }
+
+  /** Returns true if field locationId is set (has been assigned a value) and false otherwise */
+  public boolean isSetLocationId() {
+    return this.locationId != null;
+  }
+
+  public void setLocationIdIsSet(boolean value) {
+    if (!value) {
+      this.locationId = null;
+    }
+  }
+
+  /**
+   * 
+   */
+  public double getScore() {
+    return this.score;
+  }
+
+  /**
+   * 
+   */
+  public BlurResult setScore(double score) {
+    this.score = score;
+    setScoreIsSet(true);
+    return this;
+  }
+
+  public void unsetScore() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCORE_ISSET_ID);
+  }
+
+  /** Returns true if field score is set (has been assigned a value) and false otherwise */
+  public boolean isSetScore() {
+    return EncodingUtils.testBit(__isset_bitfield, __SCORE_ISSET_ID);
+  }
+
+  public void setScoreIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCORE_ISSET_ID, value);
+  }
+
+  /**
+   * 
+   */
+  public FetchResult getFetchResult() {
+    return this.fetchResult;
+  }
+
+  /**
+   * 
+   */
+  public BlurResult setFetchResult(FetchResult fetchResult) {
+    this.fetchResult = fetchResult;
+    return this;
+  }
+
+  public void unsetFetchResult() {
+    this.fetchResult = null;
+  }
+
+  /** Returns true if field fetchResult is set (has been assigned a value) and false otherwise */
+  public boolean isSetFetchResult() {
+    return this.fetchResult != null;
+  }
+
+  public void setFetchResultIsSet(boolean value) {
+    if (!value) {
+      this.fetchResult = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case LOCATION_ID:
+      if (value == null) {
+        unsetLocationId();
+      } else {
+        setLocationId((String)value);
+      }
+      break;
+
+    case SCORE:
+      if (value == null) {
+        unsetScore();
+      } else {
+        setScore((Double)value);
+      }
+      break;
+
+    case FETCH_RESULT:
+      if (value == null) {
+        unsetFetchResult();
+      } else {
+        setFetchResult((FetchResult)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case LOCATION_ID:
+      return getLocationId();
+
+    case SCORE:
+      return Double.valueOf(getScore());
+
+    case FETCH_RESULT:
+      return getFetchResult();
+
+    }
+    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 LOCATION_ID:
+      return isSetLocationId();
+    case SCORE:
+      return isSetScore();
+    case FETCH_RESULT:
+      return isSetFetchResult();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof BlurResult)
+      return this.equals((BlurResult)that);
+    return false;
+  }
+
+  public boolean equals(BlurResult that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_locationId = true && this.isSetLocationId();
+    boolean that_present_locationId = true && that.isSetLocationId();
+    if (this_present_locationId || that_present_locationId) {
+      if (!(this_present_locationId && that_present_locationId))
+        return false;
+      if (!this.locationId.equals(that.locationId))
+        return false;
+    }
+
+    boolean this_present_score = true;
+    boolean that_present_score = true;
+    if (this_present_score || that_present_score) {
+      if (!(this_present_score && that_present_score))
+        return false;
+      if (this.score != that.score)
+        return false;
+    }
+
+    boolean this_present_fetchResult = true && this.isSetFetchResult();
+    boolean that_present_fetchResult = true && that.isSetFetchResult();
+    if (this_present_fetchResult || that_present_fetchResult) {
+      if (!(this_present_fetchResult && that_present_fetchResult))
+        return false;
+      if (!this.fetchResult.equals(that.fetchResult))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(BlurResult other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    BlurResult typedOther = (BlurResult)other;
+
+    lastComparison = Boolean.valueOf(isSetLocationId()).compareTo(typedOther.isSetLocationId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetLocationId()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.locationId, typedOther.locationId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetScore()).compareTo(typedOther.isSetScore());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetScore()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.score, typedOther.score);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetFetchResult()).compareTo(typedOther.isSetFetchResult());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetFetchResult()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.fetchResult, typedOther.fetchResult);
+      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("BlurResult(");
+    boolean first = true;
+
+    sb.append("locationId:");
+    if (this.locationId == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.locationId);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("score:");
+    sb.append(this.score);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("fetchResult:");
+    if (this.fetchResult == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.fetchResult);
+    }
+    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 (fetchResult != null) {
+      fetchResult.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 {
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+      __isset_bitfield = 0;
+      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 BlurResultStandardSchemeFactory implements SchemeFactory {
+    public BlurResultStandardScheme getScheme() {
+      return new BlurResultStandardScheme();
+    }
+  }
+
+  private static class BlurResultStandardScheme extends StandardScheme<BlurResult> {
+
+    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot, BlurResult 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: // LOCATION_ID
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING) {
+              struct.locationId = iprot.readString();
+              struct.setLocationIdIsSet(true);
+            } else { 
+              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // SCORE
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.DOUBLE) {
+              struct.score = iprot.readDouble();
+              struct.setScoreIsSet(true);
+            } else { 
+              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // FETCH_RESULT
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT) {
+              struct.fetchResult = new FetchResult();
+              struct.fetchResult.read(iprot);
+              struct.setFetchResultIsSet(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, BlurResult struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.locationId != null) {
+        oprot.writeFieldBegin(LOCATION_ID_FIELD_DESC);
+        oprot.writeString(struct.locationId);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(SCORE_FIELD_DESC);
+      oprot.writeDouble(struct.score);
+      oprot.writeFieldEnd();
+      if (struct.fetchResult != null) {
+        oprot.writeFieldBegin(FETCH_RESULT_FIELD_DESC);
+        struct.fetchResult.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class BlurResultTupleSchemeFactory implements SchemeFactory {
+    public BlurResultTupleScheme getScheme() {
+      return new BlurResultTupleScheme();
+    }
+  }
+
+  private static class BlurResultTupleScheme extends TupleScheme<BlurResult> {
+
+    @Override
+    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, BlurResult struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetLocationId()) {
+        optionals.set(0);
+      }
+      if (struct.isSetScore()) {
+        optionals.set(1);
+      }
+      if (struct.isSetFetchResult()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetLocationId()) {
+        oprot.writeString(struct.locationId);
+      }
+      if (struct.isSetScore()) {
+        oprot.writeDouble(struct.score);
+      }
+      if (struct.isSetFetchResult()) {
+        struct.fetchResult.write(oprot);
+      }
+    }
+
+    @Override
+    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, BlurResult struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.locationId = iprot.readString();
+        struct.setLocationIdIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.score = iprot.readDouble();
+        struct.setScoreIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.fetchResult = new FetchResult();
+        struct.fetchResult.read(iprot);
+        struct.setFetchResultIsSet(true);
+      }
+    }
+  }
+
+}
+


Mime
View raw message