incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [3/8] Updates to the thrift api to support shard or server responses in the Response object.
Date Mon, 01 Sep 2014 12:43:12 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b434b067/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Response.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Response.java b/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Response.java
index bbe28de..2291733 100644
--- a/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Response.java
+++ b/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Response.java
@@ -52,12 +52,14 @@ import java.util.Arrays;
 public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Response, Response._Fields> {
   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("Response");
   private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField SHARD_TO_VALUE_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("shardToValue", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, (short)1);
-  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField VALUE_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("value", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, (short)2);
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField SERVER_TO_VALUE_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("serverToValue", 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 VALUE_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("value", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, (short)3);
 
   /** 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 {
     SHARD_TO_VALUE((short)1, "shardToValue"),
-    VALUE((short)2, "value");
+    SERVER_TO_VALUE((short)2, "serverToValue"),
+    VALUE((short)3, "value");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -74,7 +76,9 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res
       switch(fieldId) {
         case 1: // SHARD_TO_VALUE
           return SHARD_TO_VALUE;
-        case 2: // VALUE
+        case 2: // SERVER_TO_VALUE
+          return SERVER_TO_VALUE;
+        case 3: // VALUE
           return VALUE;
         default:
           return null;
@@ -120,7 +124,11 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res
     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.SHARD_TO_VALUE, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("shardToValue", 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, Shard.class), 
+            new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.StructMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, Value.class))));
+    tmpMap.put(_Fields.SERVER_TO_VALUE, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("serverToValue", 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.StructMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, Server.class), 
             new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.StructMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, Value.class))));
     tmpMap.put(_Fields.VALUE, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("value", 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, Value.class)));
@@ -143,12 +151,18 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res
     return new Response(this);
   }
 
-  public static Response shardToValue(Map<String,Value> value) {
+  public static Response shardToValue(Map<Shard,Value> value) {
     Response x = new Response();
     x.setShardToValue(value);
     return x;
   }
 
+  public static Response serverToValue(Map<Server,Value> value) {
+    Response x = new Response();
+    x.setServerToValue(value);
+    return x;
+  }
+
   public static Response value(Value value) {
     Response x = new Response();
     x.setValue(value);
@@ -163,7 +177,12 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res
         if (value instanceof Map) {
           break;
         }
-        throw new ClassCastException("Was expecting value of type Map<String,Value> for field 'shardToValue', but got " + value.getClass().getSimpleName());
+        throw new ClassCastException("Was expecting value of type Map<Shard,Value> for field 'shardToValue', but got " + value.getClass().getSimpleName());
+      case SERVER_TO_VALUE:
+        if (value instanceof Map) {
+          break;
+        }
+        throw new ClassCastException("Was expecting value of type Map<Server,Value> for field 'serverToValue', but got " + value.getClass().getSimpleName());
       case VALUE:
         if (value instanceof Value) {
           break;
@@ -181,15 +200,16 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res
       switch (setField) {
         case SHARD_TO_VALUE:
           if (field.type == SHARD_TO_VALUE_FIELD_DESC.type) {
-            Map<String,Value> shardToValue;
+            Map<Shard,Value> shardToValue;
             {
               org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map232 = iprot.readMapBegin();
-              shardToValue = new HashMap<String,Value>(2*_map232.size);
+              shardToValue = new HashMap<Shard,Value>(2*_map232.size);
               for (int _i233 = 0; _i233 < _map232.size; ++_i233)
               {
-                String _key234; // optional
+                Shard _key234; // optional
                 Value _val235; // required
-                _key234 = iprot.readString();
+                _key234 = new Shard();
+                _key234.read(iprot);
                 _val235 = new Value();
                 _val235.read(iprot);
                 shardToValue.put(_key234, _val235);
@@ -201,6 +221,29 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res
             org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, field.type);
             return null;
           }
+        case SERVER_TO_VALUE:
+          if (field.type == SERVER_TO_VALUE_FIELD_DESC.type) {
+            Map<Server,Value> serverToValue;
+            {
+              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map236 = iprot.readMapBegin();
+              serverToValue = new HashMap<Server,Value>(2*_map236.size);
+              for (int _i237 = 0; _i237 < _map236.size; ++_i237)
+              {
+                Server _key238; // optional
+                Value _val239; // required
+                _key238 = new Server();
+                _key238.read(iprot);
+                _val239 = new Value();
+                _val239.read(iprot);
+                serverToValue.put(_key238, _val239);
+              }
+              iprot.readMapEnd();
+            }
+            return serverToValue;
+          } else {
+            org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, field.type);
+            return null;
+          }
         case VALUE:
           if (field.type == VALUE_FIELD_DESC.type) {
             Value value;
@@ -223,13 +266,25 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res
   protected void standardSchemeWriteValue(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
     switch (setField_) {
       case SHARD_TO_VALUE:
-        Map<String,Value> shardToValue = (Map<String,Value>)value_;
+        Map<Shard,Value> shardToValue = (Map<Shard,Value>)value_;
+        {
+          oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, shardToValue.size()));
+          for (Map.Entry<Shard, Value> _iter240 : shardToValue.entrySet())
+          {
+            _iter240.getKey().write(oprot);
+            _iter240.getValue().write(oprot);
+          }
+          oprot.writeMapEnd();
+        }
+        return;
+      case SERVER_TO_VALUE:
+        Map<Server,Value> serverToValue = (Map<Server,Value>)value_;
         {
-          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, shardToValue.size()));
-          for (Map.Entry<String, Value> _iter236 : shardToValue.entrySet())
+          oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, serverToValue.size()));
+          for (Map.Entry<Server, Value> _iter241 : serverToValue.entrySet())
           {
-            oprot.writeString(_iter236.getKey());
-            _iter236.getValue().write(oprot);
+            _iter241.getKey().write(oprot);
+            _iter241.getValue().write(oprot);
           }
           oprot.writeMapEnd();
         }
@@ -249,22 +304,41 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res
     if (setField != null) {
       switch (setField) {
         case SHARD_TO_VALUE:
-          Map<String,Value> shardToValue;
+          Map<Shard,Value> shardToValue;
           {
-            org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map237 = iprot.readMapBegin();
-            shardToValue = new HashMap<String,Value>(2*_map237.size);
-            for (int _i238 = 0; _i238 < _map237.size; ++_i238)
+            org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map242 = iprot.readMapBegin();
+            shardToValue = new HashMap<Shard,Value>(2*_map242.size);
+            for (int _i243 = 0; _i243 < _map242.size; ++_i243)
             {
-              String _key239; // optional
-              Value _val240; // required
-              _key239 = iprot.readString();
-              _val240 = new Value();
-              _val240.read(iprot);
-              shardToValue.put(_key239, _val240);
+              Shard _key244; // optional
+              Value _val245; // required
+              _key244 = new Shard();
+              _key244.read(iprot);
+              _val245 = new Value();
+              _val245.read(iprot);
+              shardToValue.put(_key244, _val245);
             }
             iprot.readMapEnd();
           }
           return shardToValue;
+        case SERVER_TO_VALUE:
+          Map<Server,Value> serverToValue;
+          {
+            org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map246 = iprot.readMapBegin();
+            serverToValue = new HashMap<Server,Value>(2*_map246.size);
+            for (int _i247 = 0; _i247 < _map246.size; ++_i247)
+            {
+              Server _key248; // optional
+              Value _val249; // required
+              _key248 = new Server();
+              _key248.read(iprot);
+              _val249 = new Value();
+              _val249.read(iprot);
+              serverToValue.put(_key248, _val249);
+            }
+            iprot.readMapEnd();
+          }
+          return serverToValue;
         case VALUE:
           Value value;
           value = new Value();
@@ -282,13 +356,25 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res
   protected void tupleSchemeWriteValue(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
     switch (setField_) {
       case SHARD_TO_VALUE:
-        Map<String,Value> shardToValue = (Map<String,Value>)value_;
+        Map<Shard,Value> shardToValue = (Map<Shard,Value>)value_;
         {
-          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, shardToValue.size()));
-          for (Map.Entry<String, Value> _iter241 : shardToValue.entrySet())
+          oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, shardToValue.size()));
+          for (Map.Entry<Shard, Value> _iter250 : shardToValue.entrySet())
           {
-            oprot.writeString(_iter241.getKey());
-            _iter241.getValue().write(oprot);
+            _iter250.getKey().write(oprot);
+            _iter250.getValue().write(oprot);
+          }
+          oprot.writeMapEnd();
+        }
+        return;
+      case SERVER_TO_VALUE:
+        Map<Server,Value> serverToValue = (Map<Server,Value>)value_;
+        {
+          oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, serverToValue.size()));
+          for (Map.Entry<Server, Value> _iter251 : serverToValue.entrySet())
+          {
+            _iter251.getKey().write(oprot);
+            _iter251.getValue().write(oprot);
           }
           oprot.writeMapEnd();
         }
@@ -307,6 +393,8 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res
     switch (setField) {
       case SHARD_TO_VALUE:
         return SHARD_TO_VALUE_FIELD_DESC;
+      case SERVER_TO_VALUE:
+        return SERVER_TO_VALUE_FIELD_DESC;
       case VALUE:
         return VALUE_FIELD_DESC;
       default:
@@ -329,20 +417,34 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res
   }
 
 
-  public Map<String,Value> getShardToValue() {
+  public Map<Shard,Value> getShardToValue() {
     if (getSetField() == _Fields.SHARD_TO_VALUE) {
-      return (Map<String,Value>)getFieldValue();
+      return (Map<Shard,Value>)getFieldValue();
     } else {
       throw new RuntimeException("Cannot get field 'shardToValue' because union is currently set to " + getFieldDesc(getSetField()).name);
     }
   }
 
-  public void setShardToValue(Map<String,Value> value) {
+  public void setShardToValue(Map<Shard,Value> value) {
     if (value == null) throw new NullPointerException();
     setField_ = _Fields.SHARD_TO_VALUE;
     value_ = value;
   }
 
+  public Map<Server,Value> getServerToValue() {
+    if (getSetField() == _Fields.SERVER_TO_VALUE) {
+      return (Map<Server,Value>)getFieldValue();
+    } else {
+      throw new RuntimeException("Cannot get field 'serverToValue' because union is currently set to " + getFieldDesc(getSetField()).name);
+    }
+  }
+
+  public void setServerToValue(Map<Server,Value> value) {
+    if (value == null) throw new NullPointerException();
+    setField_ = _Fields.SERVER_TO_VALUE;
+    value_ = value;
+  }
+
   public Value getValue() {
     if (getSetField() == _Fields.VALUE) {
       return (Value)getFieldValue();
@@ -362,6 +464,11 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res
   }
 
 
+  public boolean isSetServerToValue() {
+    return setField_ == _Fields.SERVER_TO_VALUE;
+  }
+
+
   public boolean isSetValue() {
     return setField_ == _Fields.VALUE;
   }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b434b067/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Server.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Server.java b/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Server.java
new file mode 100644
index 0000000..5b0e5fd
--- /dev/null
+++ b/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Server.java
@@ -0,0 +1,405 @@
+/**
+ * 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 Server implements org.apache.blur.thirdparty.thrift_0_9_0.TBase<Server, Server._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("Server");
+
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField SERVER_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("server", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, (short)1);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new ServerStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new ServerTupleSchemeFactory());
+  }
+
+  public String server; // 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 {
+    SERVER((short)1, "server");
+
+    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: // SERVER
+          return SERVER;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  public static final Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.SERVER, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("server", 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)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData.addStructMetaDataMap(Server.class, metaDataMap);
+  }
+
+  public Server() {
+  }
+
+  public Server(
+    String server)
+  {
+    this();
+    this.server = server;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Server(Server other) {
+    if (other.isSetServer()) {
+      this.server = other.server;
+    }
+  }
+
+  public Server deepCopy() {
+    return new Server(this);
+  }
+
+  @Override
+  public void clear() {
+    this.server = null;
+  }
+
+  public String getServer() {
+    return this.server;
+  }
+
+  public Server setServer(String server) {
+    this.server = server;
+    return this;
+  }
+
+  public void unsetServer() {
+    this.server = null;
+  }
+
+  /** Returns true if field server is set (has been assigned a value) and false otherwise */
+  public boolean isSetServer() {
+    return this.server != null;
+  }
+
+  public void setServerIsSet(boolean value) {
+    if (!value) {
+      this.server = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case SERVER:
+      if (value == null) {
+        unsetServer();
+      } else {
+        setServer((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case SERVER:
+      return getServer();
+
+    }
+    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 SERVER:
+      return isSetServer();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Server)
+      return this.equals((Server)that);
+    return false;
+  }
+
+  public boolean equals(Server that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_server = true && this.isSetServer();
+    boolean that_present_server = true && that.isSetServer();
+    if (this_present_server || that_present_server) {
+      if (!(this_present_server && that_present_server))
+        return false;
+      if (!this.server.equals(that.server))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(Server other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    Server typedOther = (Server)other;
+
+    lastComparison = Boolean.valueOf(isSetServer()).compareTo(typedOther.isSetServer());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetServer()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.server, typedOther.server);
+      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("Server(");
+    boolean first = true;
+
+    sb.append("server:");
+    if (this.server == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.server);
+    }
+    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
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(out)));
+    } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      read(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(in)));
+    } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private static class ServerStandardSchemeFactory implements SchemeFactory {
+    public ServerStandardScheme getScheme() {
+      return new ServerStandardScheme();
+    }
+  }
+
+  private static class ServerStandardScheme extends StandardScheme<Server> {
+
+    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot, Server 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: // SERVER
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING) {
+              struct.server = iprot.readString();
+              struct.setServerIsSet(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, Server struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.server != null) {
+        oprot.writeFieldBegin(SERVER_FIELD_DESC);
+        oprot.writeString(struct.server);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class ServerTupleSchemeFactory implements SchemeFactory {
+    public ServerTupleScheme getScheme() {
+      return new ServerTupleScheme();
+    }
+  }
+
+  private static class ServerTupleScheme extends TupleScheme<Server> {
+
+    @Override
+    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Server struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetServer()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetServer()) {
+        oprot.writeString(struct.server);
+      }
+    }
+
+    @Override
+    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Server struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.server = iprot.readString();
+        struct.setServerIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b434b067/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Shard.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Shard.java b/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Shard.java
new file mode 100644
index 0000000..751be40
--- /dev/null
+++ b/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Shard.java
@@ -0,0 +1,405 @@
+/**
+ * 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 Shard implements org.apache.blur.thirdparty.thrift_0_9_0.TBase<Shard, Shard._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("Shard");
+
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField SHARD_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("shard", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, (short)1);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new ShardStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new ShardTupleSchemeFactory());
+  }
+
+  public String shard; // 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 {
+    SHARD((short)1, "shard");
+
+    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: // SHARD
+          return SHARD;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  public static final Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.SHARD, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("shard", 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)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData.addStructMetaDataMap(Shard.class, metaDataMap);
+  }
+
+  public Shard() {
+  }
+
+  public Shard(
+    String shard)
+  {
+    this();
+    this.shard = shard;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Shard(Shard other) {
+    if (other.isSetShard()) {
+      this.shard = other.shard;
+    }
+  }
+
+  public Shard deepCopy() {
+    return new Shard(this);
+  }
+
+  @Override
+  public void clear() {
+    this.shard = null;
+  }
+
+  public String getShard() {
+    return this.shard;
+  }
+
+  public Shard setShard(String shard) {
+    this.shard = shard;
+    return this;
+  }
+
+  public void unsetShard() {
+    this.shard = null;
+  }
+
+  /** Returns true if field shard is set (has been assigned a value) and false otherwise */
+  public boolean isSetShard() {
+    return this.shard != null;
+  }
+
+  public void setShardIsSet(boolean value) {
+    if (!value) {
+      this.shard = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case SHARD:
+      if (value == null) {
+        unsetShard();
+      } else {
+        setShard((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case SHARD:
+      return getShard();
+
+    }
+    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 SHARD:
+      return isSetShard();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Shard)
+      return this.equals((Shard)that);
+    return false;
+  }
+
+  public boolean equals(Shard that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_shard = true && this.isSetShard();
+    boolean that_present_shard = true && that.isSetShard();
+    if (this_present_shard || that_present_shard) {
+      if (!(this_present_shard && that_present_shard))
+        return false;
+      if (!this.shard.equals(that.shard))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(Shard other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    Shard typedOther = (Shard)other;
+
+    lastComparison = Boolean.valueOf(isSetShard()).compareTo(typedOther.isSetShard());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetShard()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.shard, typedOther.shard);
+      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("Shard(");
+    boolean first = true;
+
+    sb.append("shard:");
+    if (this.shard == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.shard);
+    }
+    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
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(out)));
+    } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      read(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(in)));
+    } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private static class ShardStandardSchemeFactory implements SchemeFactory {
+    public ShardStandardScheme getScheme() {
+      return new ShardStandardScheme();
+    }
+  }
+
+  private static class ShardStandardScheme extends StandardScheme<Shard> {
+
+    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot, Shard 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: // SHARD
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING) {
+              struct.shard = iprot.readString();
+              struct.setShardIsSet(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, Shard struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.shard != null) {
+        oprot.writeFieldBegin(SHARD_FIELD_DESC);
+        oprot.writeString(struct.shard);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class ShardTupleSchemeFactory implements SchemeFactory {
+    public ShardTupleScheme getScheme() {
+      return new ShardTupleScheme();
+    }
+  }
+
+  private static class ShardTupleScheme extends TupleScheme<Shard> {
+
+    @Override
+    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Shard struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetShard()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetShard()) {
+        oprot.writeString(struct.shard);
+      }
+    }
+
+    @Override
+    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Shard struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.shard = iprot.readString();
+        struct.setShardIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b434b067/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/TimeoutException.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/TimeoutException.java b/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/TimeoutException.java
new file mode 100644
index 0000000..335eaa3
--- /dev/null
+++ b/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/TimeoutException.java
@@ -0,0 +1,409 @@
+/**
+ * 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;
+
+/**
+ * TimeoutException occurs before the network connection timeout
+ * happens so that the client can reconnect.
+ */
+public class TimeoutException extends TException implements org.apache.blur.thirdparty.thrift_0_9_0.TBase<TimeoutException, TimeoutException._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("TimeoutException");
+
+  private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField EXECUTION_ID_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("executionId", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, (short)1);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new TimeoutExceptionStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new TimeoutExceptionTupleSchemeFactory());
+  }
+
+  public String executionId; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.blur.thirdparty.thrift_0_9_0.TFieldIdEnum {
+    EXECUTION_ID((short)1, "executionId");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // EXECUTION_ID
+          return EXECUTION_ID;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  public static final Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.EXECUTION_ID, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("executionId", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, 
+        new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData.addStructMetaDataMap(TimeoutException.class, metaDataMap);
+  }
+
+  public TimeoutException() {
+  }
+
+  public TimeoutException(
+    String executionId)
+  {
+    this();
+    this.executionId = executionId;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public TimeoutException(TimeoutException other) {
+    if (other.isSetExecutionId()) {
+      this.executionId = other.executionId;
+    }
+  }
+
+  public TimeoutException deepCopy() {
+    return new TimeoutException(this);
+  }
+
+  @Override
+  public void clear() {
+    this.executionId = null;
+  }
+
+  public String getExecutionId() {
+    return this.executionId;
+  }
+
+  public TimeoutException setExecutionId(String executionId) {
+    this.executionId = executionId;
+    return this;
+  }
+
+  public void unsetExecutionId() {
+    this.executionId = null;
+  }
+
+  /** Returns true if field executionId is set (has been assigned a value) and false otherwise */
+  public boolean isSetExecutionId() {
+    return this.executionId != null;
+  }
+
+  public void setExecutionIdIsSet(boolean value) {
+    if (!value) {
+      this.executionId = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case EXECUTION_ID:
+      if (value == null) {
+        unsetExecutionId();
+      } else {
+        setExecutionId((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case EXECUTION_ID:
+      return getExecutionId();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case EXECUTION_ID:
+      return isSetExecutionId();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof TimeoutException)
+      return this.equals((TimeoutException)that);
+    return false;
+  }
+
+  public boolean equals(TimeoutException that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_executionId = true && this.isSetExecutionId();
+    boolean that_present_executionId = true && that.isSetExecutionId();
+    if (this_present_executionId || that_present_executionId) {
+      if (!(this_present_executionId && that_present_executionId))
+        return false;
+      if (!this.executionId.equals(that.executionId))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(TimeoutException other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    TimeoutException typedOther = (TimeoutException)other;
+
+    lastComparison = Boolean.valueOf(isSetExecutionId()).compareTo(typedOther.isSetExecutionId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetExecutionId()) {
+      lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.executionId, typedOther.executionId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    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("TimeoutException(");
+    boolean first = true;
+
+    sb.append("executionId:");
+    if (this.executionId == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.executionId);
+    }
+    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
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(out)));
+    } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      read(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(in)));
+    } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private static class TimeoutExceptionStandardSchemeFactory implements SchemeFactory {
+    public TimeoutExceptionStandardScheme getScheme() {
+      return new TimeoutExceptionStandardScheme();
+    }
+  }
+
+  private static class TimeoutExceptionStandardScheme extends StandardScheme<TimeoutException> {
+
+    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot, TimeoutException struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // EXECUTION_ID
+            if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING) {
+              struct.executionId = iprot.readString();
+              struct.setExecutionIdIsSet(true);
+            } else { 
+              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          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, TimeoutException struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.executionId != null) {
+        oprot.writeFieldBegin(EXECUTION_ID_FIELD_DESC);
+        oprot.writeString(struct.executionId);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class TimeoutExceptionTupleSchemeFactory implements SchemeFactory {
+    public TimeoutExceptionTupleScheme getScheme() {
+      return new TimeoutExceptionTupleScheme();
+    }
+  }
+
+  private static class TimeoutExceptionTupleScheme extends TupleScheme<TimeoutException> {
+
+    @Override
+    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, TimeoutException struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetExecutionId()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetExecutionId()) {
+        oprot.writeString(struct.executionId);
+      }
+    }
+
+    @Override
+    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, TimeoutException struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.executionId = iprot.readString();
+        struct.setExecutionIdIsSet(true);
+      }
+    }
+  }
+
+}
+


Mime
View raw message