incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [2/2] git commit: Schema call on blur server now works as well as the command in the blur shell.
Date Fri, 18 Jan 2013 14:16:00 GMT
Updated Branches:
  refs/heads/0.2-dev a0821c6ea -> 688e5bcfa


Schema call on blur server now works as well as the command in the blur shell.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/688e5bcf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/688e5bcf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/688e5bcf

Branch: refs/heads/0.2-dev
Commit: 688e5bcfae990716c72bd6b79965c9063fad9cdf
Parents: a0821c6
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Fri Jan 18 09:15:14 2013 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Fri Jan 18 09:15:14 2013 -0500

----------------------------------------------------------------------
 .../indexserver/DistributedIndexServer.java        |    4 +-
 .../blur/manager/writer/TransactionRecorder.java   |    8 +-
 .../java/org/apache/blur/server/BlurServer.java    |   21 +-
 .../java/org/apache/blur/server/TableContext.java  |    6 +-
 .../java/org/apache/blur/server/TypeChecker.java   |   47 ---
 .../java/org/apache/blur/server/TypeManager.java   |   55 ++++
 .../apache/blur/server/ZooKeeperTypeChecker.java   |   63 ----
 .../apache/blur/server/ZooKeeperTypeManager.java   |   77 +++++
 .../apache/blur/utils/ThriftLuceneConversion.java  |   22 +-
 .../src/main/java/org/apache/blur/shell/Main.java  |    2 +-
 .../org/apache/blur/shell/SchemaTableCommand.java  |   23 ++-
 .../java/org/apache/blur/shell/SearchCommand.java  |   12 +-
 .../src/main/java/org/apache/blur/shell/Util.java  |   14 +
 .../org/apache/blur/thrift/generated/Blur.java     |  184 +-----------
 .../apache/blur/thrift/generated/FieldSchema.java  |  230 +--------------
 .../src/main/java/org/apache/blur/CachedMap.java   |   10 +
 .../org/apache/blur/zookeeper/ZkCachedMap.java     |   44 +++-
 .../src/main/scripts/interface/Blur.thrift         |   16 +-
 .../src/main/scripts/interface/gen-html/Blur.html  |   11 +-
 .../org/apache/blur/thrift/generated/Blur.java     |  184 +-----------
 .../apache/blur/thrift/generated/FieldSchema.java  |  230 +--------------
 .../main/scripts/interface/gen-perl/Blur/Blur.pm   |   49 +---
 .../main/scripts/interface/gen-perl/Blur/Types.pm  |   32 +--
 .../src/main/scripts/interface/gen-rb/blur.rb      |   14 +-
 .../main/scripts/interface/gen-rb/blur_types.rb    |   11 +-
 25 files changed, 309 insertions(+), 1060 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java b/src/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
index 525f81a..320c2c4 100644
--- a/src/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
+++ b/src/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
@@ -54,7 +54,7 @@ import org.apache.blur.manager.writer.BlurNRTIndex;
 import org.apache.blur.metrics.BlurMetrics;
 import org.apache.blur.server.ShardContext;
 import org.apache.blur.server.TableContext;
-import org.apache.blur.server.ZooKeeperTypeChecker;
+import org.apache.blur.server.ZooKeeperTypeManager;
 import org.apache.blur.store.blockcache.BlockDirectory;
 import org.apache.blur.store.blockcache.Cache;
 import org.apache.blur.store.hdfs.BlurLockFactory;
@@ -368,7 +368,7 @@ public class DistributedIndexServer extends AbstractIndexServer {
   @Override
   public TableContext getTableContext(String table) throws IOException {
     TableDescriptor tableDescriptor = _clusterStatus.getTableDescriptor(false, table);
-    return TableContext.create(tableDescriptor, new ZooKeeperTypeChecker(_zookeeper, ZookeeperPathConstants.getTablePath(_cluster, table), table));
+    return TableContext.create(tableDescriptor, new ZooKeeperTypeManager(_zookeeper, ZookeeperPathConstants.getTablePath(_cluster, table), table));
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java b/src/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java
index 1f3ee22..f05fbe8 100644
--- a/src/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java
+++ b/src/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java
@@ -142,14 +142,14 @@ public class TransactionRecorder {
       switch (lookup) {
       case ADD_DOCUMENTS:
         List<org.apache.blur.thrift.generated.Document> documents = readAddDocumentsFromWal(dataInputStream);
-        writer.addDocuments(toLucene(documents, tableContext.getTypeChecker()));
+        writer.addDocuments(toLucene(documents, tableContext.getTypeManager()));
         addDocumentCount += documents.size();
         break;
       case UPDATE_DOCUMENTS:
         List<org.apache.blur.thrift.generated.UpdatePackage> updatePackages = readUpdatePackagesFromWal(dataInputStream);
         for (UpdatePackage updatePackage : updatePackages) {
           List<org.apache.blur.thrift.generated.Document> docs = updatePackage.getDocuments();
-          writer.updateDocuments(toLucene(updatePackage.getTerm()), toLucene(docs, tableContext.getTypeChecker()));
+          writer.updateDocuments(toLucene(updatePackage.getTerm()), toLucene(docs, tableContext.getTypeManager()));
           updateDocumentCount += docs.size();
         }
         break;
@@ -295,7 +295,7 @@ public class TransactionRecorder {
     if (wal) {
       writeAddDocumentsToWal(documents);
     }
-    return writer.addDocuments(toLucene(documents, tableContext.getTypeChecker()));
+    return writer.addDocuments(toLucene(documents, tableContext.getTypeManager()));
   }
 
   public long deleteDocuments(boolean wal, org.apache.blur.thrift.generated.Term[] deleteTerms, TrackingIndexWriter writer) throws IOException {
@@ -322,7 +322,7 @@ public class TransactionRecorder {
     }
     long generation = -1;
     for (UpdatePackage updatePackage : updatePackages) {
-      generation = writer.updateDocuments(toLucene(updatePackage.getTerm()), toLucene(updatePackage.getDocuments(), tableContext.getTypeChecker()));
+      generation = writer.updateDocuments(toLucene(updatePackage.getTerm()), toLucene(updatePackage.getDocuments(), tableContext.getTypeManager()));
     }
     return generation;
   }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/blur-core/src/main/java/org/apache/blur/server/BlurServer.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/server/BlurServer.java b/src/blur-core/src/main/java/org/apache/blur/server/BlurServer.java
index ec77ebf..91dd5fc 100644
--- a/src/blur-core/src/main/java/org/apache/blur/server/BlurServer.java
+++ b/src/blur-core/src/main/java/org/apache/blur/server/BlurServer.java
@@ -55,6 +55,7 @@ import org.apache.blur.thrift.generated.Blur.Client;
 import org.apache.blur.thrift.generated.Blur.Iface;
 import org.apache.blur.thrift.generated.BlurException;
 import org.apache.blur.thrift.generated.Document;
+import org.apache.blur.thrift.generated.FieldSchema;
 import org.apache.blur.thrift.generated.Generation;
 import org.apache.blur.thrift.generated.MutateOptions;
 import org.apache.blur.thrift.generated.Query;
@@ -333,7 +334,7 @@ public class BlurServer extends TableAdmin implements Iface {
           result.addAll(forwardDoc(session, shardIndex, docLocation, fieldsToLoad));
         } else {
           org.apache.lucene.document.Document document = searcher.document(docId, fieldsToLoad);
-          result.add(toThrift(document, context.getTypeChecker()));
+          result.add(toThrift(document, context.getTypeManager()));
         }
       }
       return result;
@@ -529,10 +530,22 @@ public class BlurServer extends TableAdmin implements Iface {
   }
 
   @Override
-  public TableSchema schema(Session session, List<Integer> shardIds) throws BlurException, TException {
+  public TableSchema schema(Session session) throws BlurException, TException {
     SessionInfo info = getSessionInfo(session);
-
-    throw new BlurException("Not implemented", null);
+    String name = info.getTableDescriptor().getName();
+    try {
+      TableContext tableContext = _indexServer.getTableContext(name);
+      TypeManager typeManager = tableContext.getTypeManager();
+      Map<String, org.apache.blur.thrift.generated.TYPE> typeMap = typeManager.getTypeMap();
+      TableSchema tableSchema = new TableSchema();
+      for (Entry<String, org.apache.blur.thrift.generated.TYPE> entry : typeMap.entrySet()) {
+        tableSchema.addToFields(new FieldSchema(entry.getKey(), entry.getValue()));  
+      }
+      return tableSchema;
+    } catch (IOException e) {
+      LOG.error("Unknown error while trying to get the schema for the table [{0}].", e, name);
+      throw new BException(e.getMessage(), e);
+    }
   }
 
   public TableLayout getLayout() {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/blur-core/src/main/java/org/apache/blur/server/TableContext.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/server/TableContext.java b/src/blur-core/src/main/java/org/apache/blur/server/TableContext.java
index a2ecd67..23c384e 100644
--- a/src/blur-core/src/main/java/org/apache/blur/server/TableContext.java
+++ b/src/blur-core/src/main/java/org/apache/blur/server/TableContext.java
@@ -57,9 +57,9 @@ public class TableContext {
   private TableDescriptor descriptor;
   private long timeBetweenCommits;
   private long timeBetweenRefreshs;
-  private TypeChecker typeChecker;
+  private TypeManager typeChecker;
 
-  public TypeChecker getTypeChecker() {
+  public TypeManager getTypeManager() {
     return typeChecker;
   }
 
@@ -67,7 +67,7 @@ public class TableContext {
 
   }
 
-  public static TableContext create(TableDescriptor tableDescriptor, TypeChecker typeChecker) {
+  public static TableContext create(TableDescriptor tableDescriptor, TypeManager typeChecker) {
     LOG.info("Creating table context for table [{0}]", tableDescriptor.getName());
     Configuration configuration = new Configuration();
     Map<String, String> properties = tableDescriptor.getProperties();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/blur-core/src/main/java/org/apache/blur/server/TypeChecker.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/server/TypeChecker.java b/src/blur-core/src/main/java/org/apache/blur/server/TypeChecker.java
deleted file mode 100644
index 9772501..0000000
--- a/src/blur-core/src/main/java/org/apache/blur/server/TypeChecker.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.apache.blur.server;
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import java.io.IOException;
-
-import org.apache.blur.thrift.generated.Field;
-import org.apache.blur.thrift.generated.TYPE;
-
-public abstract class TypeChecker {
-
-  /**
-   * Validates that the type for the given field (by name) is correct. If the
-   * field (by name) is missing then the type is recorded and every check for
-   * that field thereafter will throw an exception if the type does not match
-   * the original type. In other words the first type for a given field wins.
-   * 
-   * @param field
-   *          the field to validate.
-   * @throws IOException
-   *           throws an IOException if the type is incorrect.
-   */
-  public abstract void validate(Field field) throws IOException;
-
-  /**
-   * Finds the type for the given name.
-   * @param name the field name.
-   * @return the TYPE of the field.
-   * @throws IOException 
-   */
-  public abstract TYPE getType(String name) throws IOException;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/blur-core/src/main/java/org/apache/blur/server/TypeManager.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/server/TypeManager.java b/src/blur-core/src/main/java/org/apache/blur/server/TypeManager.java
new file mode 100644
index 0000000..4044e2c
--- /dev/null
+++ b/src/blur-core/src/main/java/org/apache/blur/server/TypeManager.java
@@ -0,0 +1,55 @@
+package org.apache.blur.server;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.blur.thrift.generated.Field;
+import org.apache.blur.thrift.generated.TYPE;
+
+public abstract class TypeManager {
+
+  /**
+   * Validates that the type for the given field (by name) is correct. If the
+   * field (by name) is missing then the type is recorded and every check for
+   * that field thereafter will throw an exception if the type does not match
+   * the original type. In other words the first type for a given field wins.
+   * 
+   * @param field
+   *          the field to validate.
+   * @throws IOException
+   *           throws an IOException if the type is incorrect.
+   */
+  public abstract void validate(Field field) throws IOException;
+
+  /**
+   * Finds the type for the given name.
+   * @param name the field name.
+   * @return the TYPE of the field.
+   * @throws IOException 
+   */
+  public abstract TYPE getType(String name) throws IOException;
+
+  /**
+   * Returns all the know fields and their types in a map.
+   * @return the map of names to types.
+   * @throws IOException 
+   */
+  public abstract Map<String,TYPE> getTypeMap() throws IOException;
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/blur-core/src/main/java/org/apache/blur/server/ZooKeeperTypeChecker.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/server/ZooKeeperTypeChecker.java b/src/blur-core/src/main/java/org/apache/blur/server/ZooKeeperTypeChecker.java
deleted file mode 100644
index 87c63b3..0000000
--- a/src/blur-core/src/main/java/org/apache/blur/server/ZooKeeperTypeChecker.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.apache.blur.server;
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import java.io.IOException;
-
-import org.apache.blur.log.Log;
-import org.apache.blur.log.LogFactory;
-import org.apache.blur.thrift.generated.Field;
-import org.apache.blur.thrift.generated.TYPE;
-import org.apache.blur.zookeeper.ZkCachedMap;
-import org.apache.zookeeper.ZooKeeper;
-
-public class ZooKeeperTypeChecker extends TypeChecker {
-
-  private final static Log LOG = LogFactory.getLog(ZooKeeperTypeChecker.class);
-
-  private ZkCachedMap cachedMap;
-  private String _table;
-
-  public ZooKeeperTypeChecker(ZooKeeper zooKeeper, String tablePath, String tableName) {
-    cachedMap = new ZkCachedMap(zooKeeper, tablePath);
-    _table = tableName;
-  }
-
-  @Override
-  public void validate(Field field) throws IOException {
-    String fieldType = field.getType().name();
-    String fieldName = field.getName();
-    String existingType = cachedMap.get(fieldName);
-    if (existingType == null) {
-      LOG.info("Trying to record new type [{0}] for field [{1}] in table [{2}]", fieldType, fieldName, _table);
-      if (!cachedMap.putIfMissing(fieldName, fieldType)) {
-        LOG.info("Another node recorded new type for field [{0}] in table [{1}], re-reading from source.", fieldName, _table);
-      }
-      existingType = cachedMap.get(fieldName);
-    }
-    if (!existingType.equals(fieldType)) {
-      LOG.error("The field type [{0}] for field [{1}] does not match the table type of [{2}] for table [{3}]", fieldType, fieldName, existingType, _table);
-      throw new IOException("The field type [" + fieldType + "] for field [" + fieldName + "] does not match the table type of [" + existingType + "] for table [" + _table + "]");
-    }
-  }
-
-  @Override
-  public TYPE getType(String name) throws IOException {
-    String type = cachedMap.get(name);
-    return TYPE.valueOf(type);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/blur-core/src/main/java/org/apache/blur/server/ZooKeeperTypeManager.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/server/ZooKeeperTypeManager.java b/src/blur-core/src/main/java/org/apache/blur/server/ZooKeeperTypeManager.java
new file mode 100644
index 0000000..9439463
--- /dev/null
+++ b/src/blur-core/src/main/java/org/apache/blur/server/ZooKeeperTypeManager.java
@@ -0,0 +1,77 @@
+package org.apache.blur.server;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import java.io.IOException;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.TreeMap;
+
+import org.apache.blur.CachedMap;
+import org.apache.blur.log.Log;
+import org.apache.blur.log.LogFactory;
+import org.apache.blur.thrift.generated.Field;
+import org.apache.blur.thrift.generated.TYPE;
+import org.apache.blur.zookeeper.ZkCachedMap;
+import org.apache.zookeeper.ZooKeeper;
+
+public class ZooKeeperTypeManager extends TypeManager {
+
+  private final static Log LOG = LogFactory.getLog(ZooKeeperTypeManager.class);
+
+  private CachedMap cachedMap;
+  private String _table;
+
+  public ZooKeeperTypeManager(ZooKeeper zooKeeper, String tablePath, String tableName) {
+    cachedMap = new ZkCachedMap(zooKeeper, tablePath);
+    _table = tableName;
+  }
+
+  @Override
+  public void validate(Field field) throws IOException {
+    String fieldType = field.getType().name();
+    String fieldName = field.getName();
+    String existingType = cachedMap.get(fieldName);
+    if (existingType == null) {
+      LOG.info("Trying to record new type [{0}] for field [{1}] in table [{2}]", fieldType, fieldName, _table);
+      if (!cachedMap.putIfMissing(fieldName, fieldType)) {
+        LOG.info("Another node recorded new type for field [{0}] in table [{1}], re-reading from source.", fieldName, _table);
+      }
+      existingType = cachedMap.get(fieldName);
+    }
+    if (!existingType.equals(fieldType)) {
+      LOG.error("The field type [{0}] for field [{1}] does not match the table type of [{2}] for table [{3}]", fieldType, fieldName, existingType, _table);
+      throw new IOException("The field type [" + fieldType + "] for field [" + fieldName + "] does not match the table type of [" + existingType + "] for table [" + _table + "]");
+    }
+  }
+
+  @Override
+  public TYPE getType(String name) throws IOException {
+    String type = cachedMap.get(name);
+    return TYPE.valueOf(type);
+  }
+
+  @Override
+  public Map<String, TYPE> getTypeMap() throws IOException {
+    Map<String, TYPE> result = new TreeMap<String, TYPE>();
+    Map<String, String> fetchAllFromSource = cachedMap.fetchAllFromSource();
+    for (Entry<String, String> entry : fetchAllFromSource.entrySet()) {
+      result.put(entry.getKey(), TYPE.valueOf(entry.getValue()));
+    }
+    return result;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/blur-core/src/main/java/org/apache/blur/utils/ThriftLuceneConversion.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/utils/ThriftLuceneConversion.java b/src/blur-core/src/main/java/org/apache/blur/utils/ThriftLuceneConversion.java
index 8f1aaa7..b121855 100644
--- a/src/blur-core/src/main/java/org/apache/blur/utils/ThriftLuceneConversion.java
+++ b/src/blur-core/src/main/java/org/apache/blur/utils/ThriftLuceneConversion.java
@@ -8,7 +8,7 @@ import java.util.List;
 import org.apache.blur.log.Log;
 import org.apache.blur.log.LogFactory;
 import org.apache.blur.lucene.serializer.QueryWritable;
-import org.apache.blur.server.TypeChecker;
+import org.apache.blur.server.TypeManager;
 import org.apache.blur.thrift.generated.Field;
 import org.apache.blur.thrift.generated.QueryArgs;
 import org.apache.blur.thrift.generated.ScoreDoc;
@@ -79,17 +79,17 @@ public class ThriftLuceneConversion {
     return new org.apache.lucene.search.ScoreDoc(BlurUtil.getDocumentId(docLocation), (float) scoreDoc.score, BlurUtil.getShardIndex(docLocation));
   }
 
-  public static org.apache.blur.thrift.generated.Document toThrift(org.apache.lucene.document.Document document, TypeChecker typeChecker) throws IOException {
+  public static org.apache.blur.thrift.generated.Document toThrift(org.apache.lucene.document.Document document, TypeManager typeManager) throws IOException {
     org.apache.blur.thrift.generated.Document result = new org.apache.blur.thrift.generated.Document();
     List<IndexableField> fields = document.getFields();
     for (IndexableField field : fields) {
-      result.addToFields(toThrift(field, typeChecker));
+      result.addToFields(toThrift(field, typeManager));
     }
     return result;
   }
 
-  public static Field toThrift(IndexableField field, TypeChecker typeChecker) throws IOException {
-    TYPE type = typeChecker.getType(field.name());
+  public static Field toThrift(IndexableField field, TypeManager typeManager) throws IOException {
+    TYPE type = typeManager.getType(field.name());
     switch (type) {
     case STRING:
       return new org.apache.blur.thrift.StringField(field.name(), field.stringValue(), field.boost());
@@ -217,17 +217,17 @@ public class ThriftLuceneConversion {
     }
   }
 
-  public static Document toLucene(org.apache.blur.thrift.generated.Document document, TypeChecker typeChecker) throws IOException {
+  public static Document toLucene(org.apache.blur.thrift.generated.Document document, TypeManager typeManager) throws IOException {
     Document result = new Document();
     List<Field> fields = document.getFields();
     for (Field field : fields) {
-      result.add(toLucene(field, typeChecker));
+      result.add(toLucene(field, typeManager));
     }
     return result;
   }
 
-  public static IndexableField toLucene(Field field, TypeChecker typeChecker) throws IOException {
-    typeChecker.validate(field);
+  public static IndexableField toLucene(Field field, TypeManager typeManager) throws IOException {
+    typeManager.validate(field);
     TYPE type = field.getType();
     org.apache.lucene.document.Field result;
     switch (type) {
@@ -294,10 +294,10 @@ public class ThriftLuceneConversion {
     return result;
   }
 
-  public static List<Document> toLucene(List<org.apache.blur.thrift.generated.Document> documents, TypeChecker typeChecker) throws IOException {
+  public static List<Document> toLucene(List<org.apache.blur.thrift.generated.Document> documents, TypeManager typeManager) throws IOException {
     List<Document> docs = new ArrayList<Document>();
     for (org.apache.blur.thrift.generated.Document doc : documents) {
-      docs.add(toLucene(doc, typeChecker));
+      docs.add(toLucene(doc, typeManager));
     }
     return docs;
   }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/blur-shell/src/main/java/org/apache/blur/shell/Main.java
----------------------------------------------------------------------
diff --git a/src/blur-shell/src/main/java/org/apache/blur/shell/Main.java b/src/blur-shell/src/main/java/org/apache/blur/shell/Main.java
index 9f3addf..c9cd397 100644
--- a/src/blur-shell/src/main/java/org/apache/blur/shell/Main.java
+++ b/src/blur-shell/src/main/java/org/apache/blur/shell/Main.java
@@ -242,7 +242,7 @@ public class Main {
     add(builder, new RemoveTableCommand(client));
     add(builder, new DescribeCommand(client));
     // builder.put("tablestats", new TableStatsCommand());
-    // builder.put("schema", new SchemaTableCommand());
+    add(builder, new SchemaTableCommand(client));
     add(builder, new SearchCommand(client));
     add(builder, new AddCommand(client));
     //    add(builder, new UpdateCommand(client));

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/blur-shell/src/main/java/org/apache/blur/shell/SchemaTableCommand.java
----------------------------------------------------------------------
diff --git a/src/blur-shell/src/main/java/org/apache/blur/shell/SchemaTableCommand.java b/src/blur-shell/src/main/java/org/apache/blur/shell/SchemaTableCommand.java
index f98bfed..cb17d95 100644
--- a/src/blur-shell/src/main/java/org/apache/blur/shell/SchemaTableCommand.java
+++ b/src/blur-shell/src/main/java/org/apache/blur/shell/SchemaTableCommand.java
@@ -19,14 +19,19 @@
 package org.apache.blur.shell;
 
 import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.List;
 
 import jline.console.ConsoleReader;
 
 import org.apache.blur.thrift.generated.Blur.Iface;
 import org.apache.blur.thrift.generated.BlurException;
+import org.apache.blur.thrift.generated.FieldSchema;
+import org.apache.blur.thrift.generated.Session;
+import org.apache.blur.thrift.generated.TableSchema;
 import org.apache.thrift.TException;
 
-public class SchemaTableCommand extends Command {
+public class SchemaTableCommand extends TableSingleArgumentCommand {
   public SchemaTableCommand(Iface client) {
     super(client);
   }
@@ -39,7 +44,19 @@ public class SchemaTableCommand extends Command {
     }
     String tablename = args[1];
 
-//    out.println(client.schema(tablename));
+    Session session = client.openReadSession(tablename);
+    TableSchema schema = client.schema(session);
+    client.closeReadSession(session);
+    
+    List<FieldSchema> fields = schema.getFields();
+    List<String> fieldNames = new ArrayList<String>();
+    for (FieldSchema fieldSchema : fields) {
+      fieldNames.add(fieldSchema.getName());
+    }
+    int maxLength = Util.maxLength(fieldNames);
+    for (FieldSchema fieldSchema : fields) {
+      out.printf("%." + maxLength + "s | %s%n", fieldSchema.getName(), fieldSchema.getType().name());
+    }
   }
 
   @Override
@@ -49,6 +66,6 @@ public class SchemaTableCommand extends Command {
 
   @Override
   public String getName() {
-    return null;
+    return "schema";
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/blur-shell/src/main/java/org/apache/blur/shell/SearchCommand.java
----------------------------------------------------------------------
diff --git a/src/blur-shell/src/main/java/org/apache/blur/shell/SearchCommand.java b/src/blur-shell/src/main/java/org/apache/blur/shell/SearchCommand.java
index 842d238..53ce82c 100644
--- a/src/blur-shell/src/main/java/org/apache/blur/shell/SearchCommand.java
+++ b/src/blur-shell/src/main/java/org/apache/blur/shell/SearchCommand.java
@@ -181,9 +181,9 @@ public class SearchCommand extends TableSingleArgumentCommand {
       }
     }
 
-    int maxFieldNameLength = maxLength(fieldNames);
+    int maxFieldNameLength = Util.maxLength(fieldNames);
     int boostWidth = 4;
-    int typeNameWidth = maxLength(fieldTypes);
+    int typeNameWidth = Util.maxLength(fieldTypes);
     int fieldSep = 3;
     int valueMaxWidth;
     int metaDataWidth = maxFieldNameLength + fieldSep;
@@ -267,11 +267,5 @@ public class SearchCommand extends TableSingleArgumentCommand {
     }
   }
 
-  private int maxLength(List<String> fieldNames) {
-    int maxFieldNameLength = 0;
-    for (String fieldName : fieldNames) {
-      maxFieldNameLength = Math.max(maxFieldNameLength, fieldName.length());
-    }
-    return maxFieldNameLength;
-  }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/blur-shell/src/main/java/org/apache/blur/shell/Util.java
----------------------------------------------------------------------
diff --git a/src/blur-shell/src/main/java/org/apache/blur/shell/Util.java b/src/blur-shell/src/main/java/org/apache/blur/shell/Util.java
new file mode 100644
index 0000000..2d49105
--- /dev/null
+++ b/src/blur-shell/src/main/java/org/apache/blur/shell/Util.java
@@ -0,0 +1,14 @@
+package org.apache.blur.shell;
+
+import java.util.List;
+
+public class Util {
+  
+  public static int maxLength(List<String> fieldNames) {
+    int maxFieldNameLength = 0;
+    for (String fieldName : fieldNames) {
+      maxFieldNameLength = Math.max(maxFieldNameLength, fieldName.length());
+    }
+    return maxFieldNameLength;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Blur.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Blur.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Blur.java
index 8d2d0f3..47d8976 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Blur.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Blur.java
@@ -267,13 +267,11 @@ public class Blur {
     /**
      * Returns the the schema for the given session.
      * @param session the Session.
-     * @param list of shard ids to fetch the schema.
      * @return the table schema.
      * 
      * @param session
-     * @param shardsIds
      */
-    public TableSchema schema(Session session, List<Integer> shardsIds) throws BlurException, org.apache.thrift.TException;
+    public TableSchema schema(Session session) throws BlurException, org.apache.thrift.TException;
 
     public TableStats tableStats(String table) throws BlurException, org.apache.thrift.TException;
 
@@ -325,7 +323,7 @@ public class Blur {
 
     public void queryStatus(Session session, long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.queryStatus_call> resultHandler) throws org.apache.thrift.TException;
 
-    public void schema(Session session, List<Integer> shardsIds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.schema_call> resultHandler) throws org.apache.thrift.TException;
+    public void schema(Session session, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.schema_call> resultHandler) throws org.apache.thrift.TException;
 
     public void tableStats(String table, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.tableStats_call> resultHandler) throws org.apache.thrift.TException;
 
@@ -911,17 +909,16 @@ public class Blur {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "queryStatus failed: unknown result");
     }
 
-    public TableSchema schema(Session session, List<Integer> shardsIds) throws BlurException, org.apache.thrift.TException
+    public TableSchema schema(Session session) throws BlurException, org.apache.thrift.TException
     {
-      send_schema(session, shardsIds);
+      send_schema(session);
       return recv_schema();
     }
 
-    public void send_schema(Session session, List<Integer> shardsIds) throws org.apache.thrift.TException
+    public void send_schema(Session session) throws org.apache.thrift.TException
     {
       schema_args args = new schema_args();
       args.setSession(session);
-      args.setShardsIds(shardsIds);
       sendBase("schema", args);
     }
 
@@ -1713,27 +1710,24 @@ public class Blur {
       }
     }
 
-    public void schema(Session session, List<Integer> shardsIds, org.apache.thrift.async.AsyncMethodCallback<schema_call> resultHandler) throws org.apache.thrift.TException {
+    public void schema(Session session, org.apache.thrift.async.AsyncMethodCallback<schema_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      schema_call method_call = new schema_call(session, shardsIds, resultHandler, this, ___protocolFactory, ___transport);
+      schema_call method_call = new schema_call(session, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class schema_call extends org.apache.thrift.async.TAsyncMethodCall {
       private Session session;
-      private List<Integer> shardsIds;
-      public schema_call(Session session, List<Integer> shardsIds, org.apache.thrift.async.AsyncMethodCallback<schema_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public schema_call(Session session, org.apache.thrift.async.AsyncMethodCallback<schema_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.session = session;
-        this.shardsIds = shardsIds;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("schema", org.apache.thrift.protocol.TMessageType.CALL, 0));
         schema_args args = new schema_args();
         args.setSession(session);
-        args.setShardsIds(shardsIds);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -2365,7 +2359,7 @@ public class Blur {
       public schema_result getResult(I iface, schema_args args) throws org.apache.thrift.TException {
         schema_result result = new schema_result();
         try {
-          result.success = iface.schema(args.session, args.shardsIds);
+          result.success = iface.schema(args.session);
         } catch (BlurException ex) {
           result.ex = ex;
         }
@@ -21437,7 +21431,6 @@ public class Blur {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("schema_args");
 
     private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-    private static final org.apache.thrift.protocol.TField SHARDS_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("shardsIds", org.apache.thrift.protocol.TType.LIST, (short)2);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -21446,12 +21439,10 @@ public class Blur {
     }
 
     public Session session; // required
-    public List<Integer> shardsIds; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      SESSION((short)1, "session"),
-      SHARDS_IDS((short)2, "shardsIds");
+      SESSION((short)1, "session");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -21468,8 +21459,6 @@ public class Blur {
         switch(fieldId) {
           case 1: // SESSION
             return SESSION;
-          case 2: // SHARDS_IDS
-            return SHARDS_IDS;
           default:
             return null;
         }
@@ -21515,9 +21504,6 @@ public class Blur {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
       tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Session.class)));
-      tmpMap.put(_Fields.SHARDS_IDS, new org.apache.thrift.meta_data.FieldMetaData("shardsIds", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(schema_args.class, metaDataMap);
     }
@@ -21526,12 +21512,10 @@ public class Blur {
     }
 
     public schema_args(
-      Session session,
-      List<Integer> shardsIds)
+      Session session)
     {
       this();
       this.session = session;
-      this.shardsIds = shardsIds;
     }
 
     /**
@@ -21541,13 +21525,6 @@ public class Blur {
       if (other.isSetSession()) {
         this.session = new Session(other.session);
       }
-      if (other.isSetShardsIds()) {
-        List<Integer> __this__shardsIds = new ArrayList<Integer>();
-        for (Integer other_element : other.shardsIds) {
-          __this__shardsIds.add(other_element);
-        }
-        this.shardsIds = __this__shardsIds;
-      }
     }
 
     public schema_args deepCopy() {
@@ -21557,7 +21534,6 @@ public class Blur {
     @Override
     public void clear() {
       this.session = null;
-      this.shardsIds = null;
     }
 
     public Session getSession() {
@@ -21584,45 +21560,6 @@ public class Blur {
       }
     }
 
-    public int getShardsIdsSize() {
-      return (this.shardsIds == null) ? 0 : this.shardsIds.size();
-    }
-
-    public java.util.Iterator<Integer> getShardsIdsIterator() {
-      return (this.shardsIds == null) ? null : this.shardsIds.iterator();
-    }
-
-    public void addToShardsIds(int elem) {
-      if (this.shardsIds == null) {
-        this.shardsIds = new ArrayList<Integer>();
-      }
-      this.shardsIds.add(elem);
-    }
-
-    public List<Integer> getShardsIds() {
-      return this.shardsIds;
-    }
-
-    public schema_args setShardsIds(List<Integer> shardsIds) {
-      this.shardsIds = shardsIds;
-      return this;
-    }
-
-    public void unsetShardsIds() {
-      this.shardsIds = null;
-    }
-
-    /** Returns true if field shardsIds is set (has been assigned a value) and false otherwise */
-    public boolean isSetShardsIds() {
-      return this.shardsIds != null;
-    }
-
-    public void setShardsIdsIsSet(boolean value) {
-      if (!value) {
-        this.shardsIds = null;
-      }
-    }
-
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case SESSION:
@@ -21633,14 +21570,6 @@ public class Blur {
         }
         break;
 
-      case SHARDS_IDS:
-        if (value == null) {
-          unsetShardsIds();
-        } else {
-          setShardsIds((List<Integer>)value);
-        }
-        break;
-
       }
     }
 
@@ -21649,9 +21578,6 @@ public class Blur {
       case SESSION:
         return getSession();
 
-      case SHARDS_IDS:
-        return getShardsIds();
-
       }
       throw new IllegalStateException();
     }
@@ -21665,8 +21591,6 @@ public class Blur {
       switch (field) {
       case SESSION:
         return isSetSession();
-      case SHARDS_IDS:
-        return isSetShardsIds();
       }
       throw new IllegalStateException();
     }
@@ -21693,15 +21617,6 @@ public class Blur {
           return false;
       }
 
-      boolean this_present_shardsIds = true && this.isSetShardsIds();
-      boolean that_present_shardsIds = true && that.isSetShardsIds();
-      if (this_present_shardsIds || that_present_shardsIds) {
-        if (!(this_present_shardsIds && that_present_shardsIds))
-          return false;
-        if (!this.shardsIds.equals(that.shardsIds))
-          return false;
-      }
-
       return true;
     }
 
@@ -21728,16 +21643,6 @@ public class Blur {
           return lastComparison;
         }
       }
-      lastComparison = Boolean.valueOf(isSetShardsIds()).compareTo(typedOther.isSetShardsIds());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetShardsIds()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shardsIds, typedOther.shardsIds);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
       return 0;
     }
 
@@ -21765,14 +21670,6 @@ public class Blur {
         sb.append(this.session);
       }
       first = false;
-      if (!first) sb.append(", ");
-      sb.append("shardsIds:");
-      if (this.shardsIds == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.shardsIds);
-      }
-      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -21828,24 +21725,6 @@ public class Blur {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 2: // SHARDS_IDS
-              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
-                {
-                  org.apache.thrift.protocol.TList _list264 = iprot.readListBegin();
-                  struct.shardsIds = new ArrayList<Integer>(_list264.size);
-                  for (int _i265 = 0; _i265 < _list264.size; ++_i265)
-                  {
-                    int _elem266; // required
-                    _elem266 = iprot.readI32();
-                    struct.shardsIds.add(_elem266);
-                  }
-                  iprot.readListEnd();
-                }
-                struct.setShardsIdsIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -21866,18 +21745,6 @@ public class Blur {
           struct.session.write(oprot);
           oprot.writeFieldEnd();
         }
-        if (struct.shardsIds != null) {
-          oprot.writeFieldBegin(SHARDS_IDS_FIELD_DESC);
-          {
-            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.shardsIds.size()));
-            for (int _iter267 : struct.shardsIds)
-            {
-              oprot.writeI32(_iter267);
-            }
-            oprot.writeListEnd();
-          }
-          oprot.writeFieldEnd();
-        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
@@ -21899,46 +21766,21 @@ public class Blur {
         if (struct.isSetSession()) {
           optionals.set(0);
         }
-        if (struct.isSetShardsIds()) {
-          optionals.set(1);
-        }
-        oprot.writeBitSet(optionals, 2);
+        oprot.writeBitSet(optionals, 1);
         if (struct.isSetSession()) {
           struct.session.write(oprot);
         }
-        if (struct.isSetShardsIds()) {
-          {
-            oprot.writeI32(struct.shardsIds.size());
-            for (int _iter268 : struct.shardsIds)
-            {
-              oprot.writeI32(_iter268);
-            }
-          }
-        }
       }
 
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, schema_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(2);
+        BitSet incoming = iprot.readBitSet(1);
         if (incoming.get(0)) {
           struct.session = new Session();
           struct.session.read(iprot);
           struct.setSessionIsSet(true);
         }
-        if (incoming.get(1)) {
-          {
-            org.apache.thrift.protocol.TList _list269 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
-            struct.shardsIds = new ArrayList<Integer>(_list269.size);
-            for (int _i270 = 0; _i270 < _list269.size; ++_i270)
-            {
-              int _elem271; // required
-              _elem271 = iprot.readI32();
-              struct.shardsIds.add(_elem271);
-            }
-          }
-          struct.setShardsIdsIsSet(true);
-        }
       }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/FieldSchema.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/FieldSchema.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/FieldSchema.java
index 6953ca8..1aba6ef 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/FieldSchema.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/FieldSchema.java
@@ -50,15 +50,13 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * The field schema contains the name the type and some simple statistics about the field.
+ * The field schema contains the field's name and type.
  */
 public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSchema._Fields>, java.io.Serializable, Cloneable {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FieldSchema");
 
   private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)2);
-  private static final org.apache.thrift.protocol.TField NUMBER_OF_TERMS_ESTIMATE_FIELD_DESC = new org.apache.thrift.protocol.TField("numberOfTermsEstimate", org.apache.thrift.protocol.TType.I64, (short)3);
-  private static final org.apache.thrift.protocol.TField SHARD_EXISTENCE_FIELD_DESC = new org.apache.thrift.protocol.TField("shardExistence", org.apache.thrift.protocol.TType.I32, (short)4);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -76,15 +74,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
    * @see TYPE
    */
   public TYPE type; // required
-  /**
-   * This is an estimate of the number of terms present in the index.  This is a naive
-   * estimate, it is a sum of all the terms in each of the segments in each of the shards.
-   */
-  public long numberOfTermsEstimate; // required
-  /**
-   * The number of shards in which this field exists.
-   */
-  public int shardExistence; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -97,16 +86,7 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
      * 
      * @see TYPE
      */
-    TYPE((short)2, "type"),
-    /**
-     * This is an estimate of the number of terms present in the index.  This is a naive
-     * estimate, it is a sum of all the terms in each of the segments in each of the shards.
-     */
-    NUMBER_OF_TERMS_ESTIMATE((short)3, "numberOfTermsEstimate"),
-    /**
-     * The number of shards in which this field exists.
-     */
-    SHARD_EXISTENCE((short)4, "shardExistence");
+    TYPE((short)2, "type");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -125,10 +105,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
           return NAME;
         case 2: // TYPE
           return TYPE;
-        case 3: // NUMBER_OF_TERMS_ESTIMATE
-          return NUMBER_OF_TERMS_ESTIMATE;
-        case 4: // SHARD_EXISTENCE
-          return SHARD_EXISTENCE;
         default:
           return null;
       }
@@ -169,9 +145,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
   }
 
   // isset id assignments
-  private static final int __NUMBEROFTERMSESTIMATE_ISSET_ID = 0;
-  private static final int __SHARDEXISTENCE_ISSET_ID = 1;
-  private byte __isset_bitfield = 0;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -179,10 +152,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
         new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TYPE.class)));
-    tmpMap.put(_Fields.NUMBER_OF_TERMS_ESTIMATE, new org.apache.thrift.meta_data.FieldMetaData("numberOfTermsEstimate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-    tmpMap.put(_Fields.SHARD_EXISTENCE, new org.apache.thrift.meta_data.FieldMetaData("shardExistence", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FieldSchema.class, metaDataMap);
   }
@@ -192,32 +161,23 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
 
   public FieldSchema(
     String name,
-    TYPE type,
-    long numberOfTermsEstimate,
-    int shardExistence)
+    TYPE type)
   {
     this();
     this.name = name;
     this.type = type;
-    this.numberOfTermsEstimate = numberOfTermsEstimate;
-    setNumberOfTermsEstimateIsSet(true);
-    this.shardExistence = shardExistence;
-    setShardExistenceIsSet(true);
   }
 
   /**
    * Performs a deep copy on <i>other</i>.
    */
   public FieldSchema(FieldSchema other) {
-    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetName()) {
       this.name = other.name;
     }
     if (other.isSetType()) {
       this.type = other.type;
     }
-    this.numberOfTermsEstimate = other.numberOfTermsEstimate;
-    this.shardExistence = other.shardExistence;
   }
 
   public FieldSchema deepCopy() {
@@ -228,10 +188,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
   public void clear() {
     this.name = null;
     this.type = null;
-    setNumberOfTermsEstimateIsSet(false);
-    this.numberOfTermsEstimate = 0;
-    setShardExistenceIsSet(false);
-    this.shardExistence = 0;
   }
 
   /**
@@ -298,66 +254,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
     }
   }
 
-  /**
-   * This is an estimate of the number of terms present in the index.  This is a naive
-   * estimate, it is a sum of all the terms in each of the segments in each of the shards.
-   */
-  public long getNumberOfTermsEstimate() {
-    return this.numberOfTermsEstimate;
-  }
-
-  /**
-   * This is an estimate of the number of terms present in the index.  This is a naive
-   * estimate, it is a sum of all the terms in each of the segments in each of the shards.
-   */
-  public FieldSchema setNumberOfTermsEstimate(long numberOfTermsEstimate) {
-    this.numberOfTermsEstimate = numberOfTermsEstimate;
-    setNumberOfTermsEstimateIsSet(true);
-    return this;
-  }
-
-  public void unsetNumberOfTermsEstimate() {
-    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMBEROFTERMSESTIMATE_ISSET_ID);
-  }
-
-  /** Returns true if field numberOfTermsEstimate is set (has been assigned a value) and false otherwise */
-  public boolean isSetNumberOfTermsEstimate() {
-    return EncodingUtils.testBit(__isset_bitfield, __NUMBEROFTERMSESTIMATE_ISSET_ID);
-  }
-
-  public void setNumberOfTermsEstimateIsSet(boolean value) {
-    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMBEROFTERMSESTIMATE_ISSET_ID, value);
-  }
-
-  /**
-   * The number of shards in which this field exists.
-   */
-  public int getShardExistence() {
-    return this.shardExistence;
-  }
-
-  /**
-   * The number of shards in which this field exists.
-   */
-  public FieldSchema setShardExistence(int shardExistence) {
-    this.shardExistence = shardExistence;
-    setShardExistenceIsSet(true);
-    return this;
-  }
-
-  public void unsetShardExistence() {
-    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHARDEXISTENCE_ISSET_ID);
-  }
-
-  /** Returns true if field shardExistence is set (has been assigned a value) and false otherwise */
-  public boolean isSetShardExistence() {
-    return EncodingUtils.testBit(__isset_bitfield, __SHARDEXISTENCE_ISSET_ID);
-  }
-
-  public void setShardExistenceIsSet(boolean value) {
-    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHARDEXISTENCE_ISSET_ID, value);
-  }
-
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case NAME:
@@ -376,22 +272,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
       }
       break;
 
-    case NUMBER_OF_TERMS_ESTIMATE:
-      if (value == null) {
-        unsetNumberOfTermsEstimate();
-      } else {
-        setNumberOfTermsEstimate((Long)value);
-      }
-      break;
-
-    case SHARD_EXISTENCE:
-      if (value == null) {
-        unsetShardExistence();
-      } else {
-        setShardExistence((Integer)value);
-      }
-      break;
-
     }
   }
 
@@ -403,12 +283,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
     case TYPE:
       return getType();
 
-    case NUMBER_OF_TERMS_ESTIMATE:
-      return Long.valueOf(getNumberOfTermsEstimate());
-
-    case SHARD_EXISTENCE:
-      return Integer.valueOf(getShardExistence());
-
     }
     throw new IllegalStateException();
   }
@@ -424,10 +298,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
       return isSetName();
     case TYPE:
       return isSetType();
-    case NUMBER_OF_TERMS_ESTIMATE:
-      return isSetNumberOfTermsEstimate();
-    case SHARD_EXISTENCE:
-      return isSetShardExistence();
     }
     throw new IllegalStateException();
   }
@@ -463,24 +333,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
         return false;
     }
 
-    boolean this_present_numberOfTermsEstimate = true;
-    boolean that_present_numberOfTermsEstimate = true;
-    if (this_present_numberOfTermsEstimate || that_present_numberOfTermsEstimate) {
-      if (!(this_present_numberOfTermsEstimate && that_present_numberOfTermsEstimate))
-        return false;
-      if (this.numberOfTermsEstimate != that.numberOfTermsEstimate)
-        return false;
-    }
-
-    boolean this_present_shardExistence = true;
-    boolean that_present_shardExistence = true;
-    if (this_present_shardExistence || that_present_shardExistence) {
-      if (!(this_present_shardExistence && that_present_shardExistence))
-        return false;
-      if (this.shardExistence != that.shardExistence)
-        return false;
-    }
-
     return true;
   }
 
@@ -517,26 +369,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetNumberOfTermsEstimate()).compareTo(typedOther.isSetNumberOfTermsEstimate());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetNumberOfTermsEstimate()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numberOfTermsEstimate, typedOther.numberOfTermsEstimate);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    lastComparison = Boolean.valueOf(isSetShardExistence()).compareTo(typedOther.isSetShardExistence());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetShardExistence()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shardExistence, typedOther.shardExistence);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
     return 0;
   }
 
@@ -572,14 +404,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
       sb.append(this.type);
     }
     first = false;
-    if (!first) sb.append(", ");
-    sb.append("numberOfTermsEstimate:");
-    sb.append(this.numberOfTermsEstimate);
-    first = false;
-    if (!first) sb.append(", ");
-    sb.append("shardExistence:");
-    sb.append(this.shardExistence);
-    first = false;
     sb.append(")");
     return sb.toString();
   }
@@ -599,8 +423,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
 
   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.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);
@@ -641,22 +463,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 3: // NUMBER_OF_TERMS_ESTIMATE
-            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
-              struct.numberOfTermsEstimate = iprot.readI64();
-              struct.setNumberOfTermsEstimateIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 4: // SHARD_EXISTENCE
-            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-              struct.shardExistence = iprot.readI32();
-              struct.setShardExistenceIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -682,12 +488,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
         oprot.writeI32(struct.type.getValue());
         oprot.writeFieldEnd();
       }
-      oprot.writeFieldBegin(NUMBER_OF_TERMS_ESTIMATE_FIELD_DESC);
-      oprot.writeI64(struct.numberOfTermsEstimate);
-      oprot.writeFieldEnd();
-      oprot.writeFieldBegin(SHARD_EXISTENCE_FIELD_DESC);
-      oprot.writeI32(struct.shardExistence);
-      oprot.writeFieldEnd();
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -712,31 +512,19 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
       if (struct.isSetType()) {
         optionals.set(1);
       }
-      if (struct.isSetNumberOfTermsEstimate()) {
-        optionals.set(2);
-      }
-      if (struct.isSetShardExistence()) {
-        optionals.set(3);
-      }
-      oprot.writeBitSet(optionals, 4);
+      oprot.writeBitSet(optionals, 2);
       if (struct.isSetName()) {
         oprot.writeString(struct.name);
       }
       if (struct.isSetType()) {
         oprot.writeI32(struct.type.getValue());
       }
-      if (struct.isSetNumberOfTermsEstimate()) {
-        oprot.writeI64(struct.numberOfTermsEstimate);
-      }
-      if (struct.isSetShardExistence()) {
-        oprot.writeI32(struct.shardExistence);
-      }
     }
 
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, FieldSchema struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      BitSet incoming = iprot.readBitSet(4);
+      BitSet incoming = iprot.readBitSet(2);
       if (incoming.get(0)) {
         struct.name = iprot.readString();
         struct.setNameIsSet(true);
@@ -745,14 +533,6 @@ public class FieldSchema implements org.apache.thrift.TBase<FieldSchema, FieldSc
         struct.type = TYPE.findByValue(iprot.readI32());
         struct.setTypeIsSet(true);
       }
-      if (incoming.get(2)) {
-        struct.numberOfTermsEstimate = iprot.readI64();
-        struct.setNumberOfTermsEstimateIsSet(true);
-      }
-      if (incoming.get(3)) {
-        struct.shardExistence = iprot.readI32();
-        struct.setShardExistenceIsSet(true);
-      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/blur-util/src/main/java/org/apache/blur/CachedMap.java
----------------------------------------------------------------------
diff --git a/src/blur-util/src/main/java/org/apache/blur/CachedMap.java b/src/blur-util/src/main/java/org/apache/blur/CachedMap.java
index 1ed8c36..80b1bf8 100644
--- a/src/blur-util/src/main/java/org/apache/blur/CachedMap.java
+++ b/src/blur-util/src/main/java/org/apache/blur/CachedMap.java
@@ -17,6 +17,7 @@ package org.apache.blur;
  * limitations under the License.
  */
 import java.io.IOException;
+import java.util.Map;
 
 public abstract class CachedMap {
 
@@ -50,4 +51,13 @@ public abstract class CachedMap {
    */
   public abstract boolean putIfMissing(String key, String value) throws IOException;
 
+  /**
+   * Fetches all the keys and values for the map from the source. That means
+   * this an expensive operation and should be used sparingly.
+   * 
+   * @return the map of all keys to values.
+   * @throws IOException 
+   */
+  public abstract Map<String, String> fetchAllFromSource() throws IOException;
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/blur-util/src/main/java/org/apache/blur/zookeeper/ZkCachedMap.java
----------------------------------------------------------------------
diff --git a/src/blur-util/src/main/java/org/apache/blur/zookeeper/ZkCachedMap.java b/src/blur-util/src/main/java/org/apache/blur/zookeeper/ZkCachedMap.java
index d0237e5..22eb9e6 100644
--- a/src/blur-util/src/main/java/org/apache/blur/zookeeper/ZkCachedMap.java
+++ b/src/blur-util/src/main/java/org/apache/blur/zookeeper/ZkCachedMap.java
@@ -19,6 +19,7 @@ package org.apache.blur.zookeeper;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
@@ -57,7 +58,7 @@ import org.apache.zookeeper.data.Stat;
 public class ZkCachedMap extends CachedMap {
 
   private static final String SEP = "-";
-  
+
   private final Map<String, String> cache = new ConcurrentHashMap<String, String>();
   private final ZooKeeper zooKeeper;
   private final String basePath;
@@ -120,11 +121,7 @@ public class ZkCachedMap extends CachedMap {
         String realKey = getRealKey(k);
         if (realKey.equals(key)) {
           String path = getPath(k);
-          Stat stat = zooKeeper.exists(path, false);
-          if (stat == null) {
-            return null;
-          }
-          byte[] data = zooKeeper.getData(path, false, stat);
+          byte[] data = getValue(path);
           if (data == null) {
             return null;
           }
@@ -141,6 +138,18 @@ public class ZkCachedMap extends CachedMap {
     }
   }
 
+  private byte[] getValue(String path) throws KeeperException, InterruptedException {
+    Stat stat = zooKeeper.exists(path, false);
+    if (stat == null) {
+      return null;
+    }
+    byte[] data = zooKeeper.getData(path, false, stat);
+    if (data == null) {
+      return null;
+    }
+    return data;
+  }
+
   private boolean putIfMissingFromZooKeeper(String key, String value) throws IOException {
     try {
       String path = getPath(key);
@@ -190,4 +199,27 @@ public class ZkCachedMap extends CachedMap {
     return basePath + "/" + key;
   }
 
+  @Override
+  public Map<String, String> fetchAllFromSource() throws IOException {
+    try {
+      Map<String, String> result = new HashMap<String, String>();
+      List<String> keys = new ArrayList<String>(zooKeeper.getChildren(basePath, false));
+      Collections.sort(keys);
+      for (String k : keys) {
+        String realKey = getRealKey(k);
+        String path = getPath(k);
+        byte[] value = getValue(path);
+        if (value != null) {
+          result.put(realKey, new String(value));
+        }
+      }
+      return result;
+    } catch (KeeperException e) {
+      throw new IOException(e);
+    } catch (InterruptedException e) {
+      throw new IOException(e);
+    }
+
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/distribution/src/main/scripts/interface/Blur.thrift
----------------------------------------------------------------------
diff --git a/src/distribution/src/main/scripts/interface/Blur.thrift b/src/distribution/src/main/scripts/interface/Blur.thrift
index ba97f88..d7584b4 100644
--- a/src/distribution/src/main/scripts/interface/Blur.thrift
+++ b/src/distribution/src/main/scripts/interface/Blur.thrift
@@ -201,7 +201,7 @@ struct TableStats {
 }
 
 /**
- * The field schema contains the name the type and some simple statistics about the field.
+ * The field schema contains the field's name and type.
  */
 struct FieldSchema {
  /**
@@ -211,16 +211,7 @@ struct FieldSchema {
  /**
   * The type of the field.
   */
- 2:TYPE type,
- /**
-  * This is an estimate of the number of terms present in the index.  This is a naive 
-  * estimate, it is a sum of all the terms in each of the segments in each of the shards.
-  */
- 3:i64 numberOfTermsEstimate,
- /**
-  * The number of shards in which this field exists.
-  */
- 4:i32 shardExistence
+ 2:TYPE type
 }
 
 /**
@@ -724,10 +715,9 @@ service Blur {
   /**
    * Returns the the schema for the given session.
    * @param session the Session.
-   * @param list of shard ids to fetch the schema.
    * @return the table schema.
    */
-  TableSchema schema(1:Session session, 2:list<i32> shardsIds) throws (1:BlurException ex)
+  TableSchema schema(1:Session session) throws (1:BlurException ex)
 
   //TODO
   TableStats tableStats(1:string table) throws (1:BlurException ex)

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/distribution/src/main/scripts/interface/gen-html/Blur.html
----------------------------------------------------------------------
diff --git a/src/distribution/src/main/scripts/interface/gen-html/Blur.html b/src/distribution/src/main/scripts/interface/gen-html/Blur.html
index 1757951..ee8397d 100644
--- a/src/distribution/src/main/scripts/interface/gen-html/Blur.html
+++ b/src/distribution/src/main/scripts/interface/gen-html/Blur.html
@@ -153,12 +153,7 @@ trace (if any).
 </td><td>default</td><td></td></tr>
 <tr><td>2</td><td>type</td><td><code><a href="Blur.html#Enum_TYPE">TYPE</a></code></td><td>The type of the field.
 </td><td>default</td><td></td></tr>
-<tr><td>3</td><td>numberOfTermsEstimate</td><td><code>i64</code></td><td>This is an estimate of the number of terms present in the index.  This is a naive
-estimate, it is a sum of all the terms in each of the segments in each of the shards.
-</td><td>default</td><td></td></tr>
-<tr><td>4</td><td>shardExistence</td><td><code>i32</code></td><td>The number of shards in which this field exists.
-</td><td>default</td><td></td></tr>
-</table><br/>The field schema contains the name the type and some simple statistics about the field.
+</table><br/>The field schema contains the field's name and type.
 <br/></div><div class="definition"><h3 id="Struct_TableSchema">Struct: TableSchema</h3>
 <table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default value</th></thead>
 <tr><td>1</td><td>fields</td><td><code>list&lt;<code><a href="Blur.html#Struct_FieldSchema">FieldSchema</a></code>&gt;</code></td><td>List of field information for a table.
@@ -495,12 +490,10 @@ NOTE, the cancel call maybe take some time for the query actually stops executin
 @param id the uuid of the query.
 @return the query status for the given.
 <br/></div><div class="definition"><h4 id="Fn_Blur_schema">Function: Blur.schema</h4>
-<pre><code><a href="Blur.html#Struct_TableSchema">TableSchema</a></code> schema(<code><a href="Blur.html#Struct_Session">Session</a></code> session,
-                   <code>list&lt;<code>i32</code>&gt;</code> shardsIds)
+<pre><code><a href="Blur.html#Struct_TableSchema">TableSchema</a></code> schema(<code><a href="Blur.html#Struct_Session">Session</a></code> session)
     throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
 </pre>Returns the the schema for the given session.
 @param session the Session.
-@param list of shard ids to fetch the schema.
 @return the table schema.
 <br/></div><div class="definition"><h4 id="Fn_Blur_tableStats">Function: Blur.tableStats</h4>
 <pre><code><a href="Blur.html#Struct_TableStats">TableStats</a></code> tableStats(<code>string</code> table)

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e5bcf/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Blur.java
----------------------------------------------------------------------
diff --git a/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Blur.java b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Blur.java
index 8d2d0f3..47d8976 100644
--- a/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Blur.java
+++ b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Blur.java
@@ -267,13 +267,11 @@ public class Blur {
     /**
      * Returns the the schema for the given session.
      * @param session the Session.
-     * @param list of shard ids to fetch the schema.
      * @return the table schema.
      * 
      * @param session
-     * @param shardsIds
      */
-    public TableSchema schema(Session session, List<Integer> shardsIds) throws BlurException, org.apache.thrift.TException;
+    public TableSchema schema(Session session) throws BlurException, org.apache.thrift.TException;
 
     public TableStats tableStats(String table) throws BlurException, org.apache.thrift.TException;
 
@@ -325,7 +323,7 @@ public class Blur {
 
     public void queryStatus(Session session, long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.queryStatus_call> resultHandler) throws org.apache.thrift.TException;
 
-    public void schema(Session session, List<Integer> shardsIds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.schema_call> resultHandler) throws org.apache.thrift.TException;
+    public void schema(Session session, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.schema_call> resultHandler) throws org.apache.thrift.TException;
 
     public void tableStats(String table, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.tableStats_call> resultHandler) throws org.apache.thrift.TException;
 
@@ -911,17 +909,16 @@ public class Blur {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "queryStatus failed: unknown result");
     }
 
-    public TableSchema schema(Session session, List<Integer> shardsIds) throws BlurException, org.apache.thrift.TException
+    public TableSchema schema(Session session) throws BlurException, org.apache.thrift.TException
     {
-      send_schema(session, shardsIds);
+      send_schema(session);
       return recv_schema();
     }
 
-    public void send_schema(Session session, List<Integer> shardsIds) throws org.apache.thrift.TException
+    public void send_schema(Session session) throws org.apache.thrift.TException
     {
       schema_args args = new schema_args();
       args.setSession(session);
-      args.setShardsIds(shardsIds);
       sendBase("schema", args);
     }
 
@@ -1713,27 +1710,24 @@ public class Blur {
       }
     }
 
-    public void schema(Session session, List<Integer> shardsIds, org.apache.thrift.async.AsyncMethodCallback<schema_call> resultHandler) throws org.apache.thrift.TException {
+    public void schema(Session session, org.apache.thrift.async.AsyncMethodCallback<schema_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      schema_call method_call = new schema_call(session, shardsIds, resultHandler, this, ___protocolFactory, ___transport);
+      schema_call method_call = new schema_call(session, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
     public static class schema_call extends org.apache.thrift.async.TAsyncMethodCall {
       private Session session;
-      private List<Integer> shardsIds;
-      public schema_call(Session session, List<Integer> shardsIds, org.apache.thrift.async.AsyncMethodCallback<schema_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public schema_call(Session session, org.apache.thrift.async.AsyncMethodCallback<schema_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.session = session;
-        this.shardsIds = shardsIds;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
         prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("schema", org.apache.thrift.protocol.TMessageType.CALL, 0));
         schema_args args = new schema_args();
         args.setSession(session);
-        args.setShardsIds(shardsIds);
         args.write(prot);
         prot.writeMessageEnd();
       }
@@ -2365,7 +2359,7 @@ public class Blur {
       public schema_result getResult(I iface, schema_args args) throws org.apache.thrift.TException {
         schema_result result = new schema_result();
         try {
-          result.success = iface.schema(args.session, args.shardsIds);
+          result.success = iface.schema(args.session);
         } catch (BlurException ex) {
           result.ex = ex;
         }
@@ -21437,7 +21431,6 @@ public class Blur {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("schema_args");
 
     private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-    private static final org.apache.thrift.protocol.TField SHARDS_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("shardsIds", org.apache.thrift.protocol.TType.LIST, (short)2);
 
     private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
     static {
@@ -21446,12 +21439,10 @@ public class Blur {
     }
 
     public Session session; // required
-    public List<Integer> shardsIds; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      SESSION((short)1, "session"),
-      SHARDS_IDS((short)2, "shardsIds");
+      SESSION((short)1, "session");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -21468,8 +21459,6 @@ public class Blur {
         switch(fieldId) {
           case 1: // SESSION
             return SESSION;
-          case 2: // SHARDS_IDS
-            return SHARDS_IDS;
           default:
             return null;
         }
@@ -21515,9 +21504,6 @@ public class Blur {
       Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
       tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Session.class)));
-      tmpMap.put(_Fields.SHARDS_IDS, new org.apache.thrift.meta_data.FieldMetaData("shardsIds", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(schema_args.class, metaDataMap);
     }
@@ -21526,12 +21512,10 @@ public class Blur {
     }
 
     public schema_args(
-      Session session,
-      List<Integer> shardsIds)
+      Session session)
     {
       this();
       this.session = session;
-      this.shardsIds = shardsIds;
     }
 
     /**
@@ -21541,13 +21525,6 @@ public class Blur {
       if (other.isSetSession()) {
         this.session = new Session(other.session);
       }
-      if (other.isSetShardsIds()) {
-        List<Integer> __this__shardsIds = new ArrayList<Integer>();
-        for (Integer other_element : other.shardsIds) {
-          __this__shardsIds.add(other_element);
-        }
-        this.shardsIds = __this__shardsIds;
-      }
     }
 
     public schema_args deepCopy() {
@@ -21557,7 +21534,6 @@ public class Blur {
     @Override
     public void clear() {
       this.session = null;
-      this.shardsIds = null;
     }
 
     public Session getSession() {
@@ -21584,45 +21560,6 @@ public class Blur {
       }
     }
 
-    public int getShardsIdsSize() {
-      return (this.shardsIds == null) ? 0 : this.shardsIds.size();
-    }
-
-    public java.util.Iterator<Integer> getShardsIdsIterator() {
-      return (this.shardsIds == null) ? null : this.shardsIds.iterator();
-    }
-
-    public void addToShardsIds(int elem) {
-      if (this.shardsIds == null) {
-        this.shardsIds = new ArrayList<Integer>();
-      }
-      this.shardsIds.add(elem);
-    }
-
-    public List<Integer> getShardsIds() {
-      return this.shardsIds;
-    }
-
-    public schema_args setShardsIds(List<Integer> shardsIds) {
-      this.shardsIds = shardsIds;
-      return this;
-    }
-
-    public void unsetShardsIds() {
-      this.shardsIds = null;
-    }
-
-    /** Returns true if field shardsIds is set (has been assigned a value) and false otherwise */
-    public boolean isSetShardsIds() {
-      return this.shardsIds != null;
-    }
-
-    public void setShardsIdsIsSet(boolean value) {
-      if (!value) {
-        this.shardsIds = null;
-      }
-    }
-
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case SESSION:
@@ -21633,14 +21570,6 @@ public class Blur {
         }
         break;
 
-      case SHARDS_IDS:
-        if (value == null) {
-          unsetShardsIds();
-        } else {
-          setShardsIds((List<Integer>)value);
-        }
-        break;
-
       }
     }
 
@@ -21649,9 +21578,6 @@ public class Blur {
       case SESSION:
         return getSession();
 
-      case SHARDS_IDS:
-        return getShardsIds();
-
       }
       throw new IllegalStateException();
     }
@@ -21665,8 +21591,6 @@ public class Blur {
       switch (field) {
       case SESSION:
         return isSetSession();
-      case SHARDS_IDS:
-        return isSetShardsIds();
       }
       throw new IllegalStateException();
     }
@@ -21693,15 +21617,6 @@ public class Blur {
           return false;
       }
 
-      boolean this_present_shardsIds = true && this.isSetShardsIds();
-      boolean that_present_shardsIds = true && that.isSetShardsIds();
-      if (this_present_shardsIds || that_present_shardsIds) {
-        if (!(this_present_shardsIds && that_present_shardsIds))
-          return false;
-        if (!this.shardsIds.equals(that.shardsIds))
-          return false;
-      }
-
       return true;
     }
 
@@ -21728,16 +21643,6 @@ public class Blur {
           return lastComparison;
         }
       }
-      lastComparison = Boolean.valueOf(isSetShardsIds()).compareTo(typedOther.isSetShardsIds());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetShardsIds()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shardsIds, typedOther.shardsIds);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
       return 0;
     }
 
@@ -21765,14 +21670,6 @@ public class Blur {
         sb.append(this.session);
       }
       first = false;
-      if (!first) sb.append(", ");
-      sb.append("shardsIds:");
-      if (this.shardsIds == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.shardsIds);
-      }
-      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -21828,24 +21725,6 @@ public class Blur {
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case 2: // SHARDS_IDS
-              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
-                {
-                  org.apache.thrift.protocol.TList _list264 = iprot.readListBegin();
-                  struct.shardsIds = new ArrayList<Integer>(_list264.size);
-                  for (int _i265 = 0; _i265 < _list264.size; ++_i265)
-                  {
-                    int _elem266; // required
-                    _elem266 = iprot.readI32();
-                    struct.shardsIds.add(_elem266);
-                  }
-                  iprot.readListEnd();
-                }
-                struct.setShardsIdsIsSet(true);
-              } else { 
-                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -21866,18 +21745,6 @@ public class Blur {
           struct.session.write(oprot);
           oprot.writeFieldEnd();
         }
-        if (struct.shardsIds != null) {
-          oprot.writeFieldBegin(SHARDS_IDS_FIELD_DESC);
-          {
-            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.shardsIds.size()));
-            for (int _iter267 : struct.shardsIds)
-            {
-              oprot.writeI32(_iter267);
-            }
-            oprot.writeListEnd();
-          }
-          oprot.writeFieldEnd();
-        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
@@ -21899,46 +21766,21 @@ public class Blur {
         if (struct.isSetSession()) {
           optionals.set(0);
         }
-        if (struct.isSetShardsIds()) {
-          optionals.set(1);
-        }
-        oprot.writeBitSet(optionals, 2);
+        oprot.writeBitSet(optionals, 1);
         if (struct.isSetSession()) {
           struct.session.write(oprot);
         }
-        if (struct.isSetShardsIds()) {
-          {
-            oprot.writeI32(struct.shardsIds.size());
-            for (int _iter268 : struct.shardsIds)
-            {
-              oprot.writeI32(_iter268);
-            }
-          }
-        }
       }
 
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, schema_args struct) throws org.apache.thrift.TException {
         TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(2);
+        BitSet incoming = iprot.readBitSet(1);
         if (incoming.get(0)) {
           struct.session = new Session();
           struct.session.read(iprot);
           struct.setSessionIsSet(true);
         }
-        if (incoming.get(1)) {
-          {
-            org.apache.thrift.protocol.TList _list269 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
-            struct.shardsIds = new ArrayList<Integer>(_list269.size);
-            for (int _i270 = 0; _i270 < _list269.size; ++_i270)
-            {
-              int _elem271; // required
-              _elem271 = iprot.readI32();
-              struct.shardsIds.add(_elem271);
-            }
-          }
-          struct.setShardsIdsIsSet(true);
-        }
       }
     }
 


Mime
View raw message