incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [09/17] git commit: Adding more documentation and cleaning up the api a little bit.
Date Fri, 16 Aug 2013 20:09:08 GMT
Adding more documentation and cleaning up the api a little bit.


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

Branch: refs/heads/master
Commit: 42c1afedea7c8b866ebf6b2a9c6cdd089fe488b4
Parents: 14e4532
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Fri Aug 16 10:43:56 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Fri Aug 16 10:43:56 2013 -0400

----------------------------------------------------------------------
 .../org/apache/blur/manager/IndexManager.java   |  104 +-
 .../clusterstatus/ZookeeperClusterStatus.java   |   60 +-
 .../indexserver/DefaultBlurIndexWarmup.java     |    7 +-
 .../results/BlurResultIterableClient.java       |    7 +-
 .../blur/manager/writer/FieldBasedWarmer.java   |    6 +-
 .../blur/thrift/BlurControllerServer.java       |   19 +-
 .../org/apache/blur/thrift/BlurShardServer.java |   12 -
 .../java/org/apache/blur/thrift/TableAdmin.java |    6 -
 .../java/org/apache/blur/utils/QueryCache.java  |    3 -
 .../apache/blur/shell/DescribeTableCommand.java |    2 +-
 .../org/apache/blur/thrift/generated/Blur.java  | 3136 +++++-------------
 .../apache/blur/thrift/generated/BlurQuery.java |  500 +--
 .../blur/thrift/generated/BlurResult.java       |   10 +-
 .../blur/thrift/generated/ColumnPreCache.java   |  472 ---
 .../blur/thrift/generated/ExpertQuery.java      |  554 ----
 .../org/apache/blur/thrift/generated/Facet.java |   44 +
 .../blur/thrift/generated/FetchResult.java      |    3 +-
 .../blur/thrift/generated/TableDescriptor.java  |  259 +-
 .../org/apache/blur/thrift/util/StatsTable.java |    2 +-
 .../src/main/scripts/interface/Blur.thrift      |  352 +-
 .../main/scripts/interface/gen-html/Blur.html   |  258 +-
 .../main/scripts/interface/gen-html/index.html  |    4 -
 .../org/apache/blur/thrift/generated/Blur.java  | 3136 +++++-------------
 .../apache/blur/thrift/generated/BlurQuery.java |  500 +--
 .../blur/thrift/generated/BlurResult.java       |   10 +-
 .../blur/thrift/generated/ColumnPreCache.java   |  472 ---
 .../blur/thrift/generated/ExpertQuery.java      |  554 ----
 .../org/apache/blur/thrift/generated/Facet.java |   44 +
 .../blur/thrift/generated/FetchResult.java      |    3 +-
 .../blur/thrift/generated/TableDescriptor.java  |  259 +-
 .../src/main/scripts/interface/gen-js/Blur.js   |  540 +--
 .../main/scripts/interface/gen-js/Blur_types.js |  317 +-
 .../scripts/interface/gen-perl/Blur/Blur.pm     |  593 +---
 .../scripts/interface/gen-perl/Blur/Types.pm    |  310 +-
 .../src/main/scripts/interface/gen-rb/blur.rb   |  147 +-
 .../main/scripts/interface/gen-rb/blur_types.rb |   97 +-
 36 files changed, 3108 insertions(+), 9694 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/42c1afed/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java b/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
index 5aabb58..dc2902c 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
@@ -70,7 +70,6 @@ import org.apache.blur.thrift.generated.BlurQuery;
 import org.apache.blur.thrift.generated.BlurQueryStatus;
 import org.apache.blur.thrift.generated.Column;
 import org.apache.blur.thrift.generated.ErrorType;
-import org.apache.blur.thrift.generated.ExpertQuery;
 import org.apache.blur.thrift.generated.FetchResult;
 import org.apache.blur.thrift.generated.FetchRowResult;
 import org.apache.blur.thrift.generated.HighlightOptions;
@@ -108,7 +107,6 @@ import org.apache.lucene.queryparser.classic.ParseException;
 import org.apache.lucene.search.BooleanClause.Occur;
 import org.apache.lucene.search.BooleanQuery;
 import org.apache.lucene.search.Filter;
-import org.apache.lucene.search.FilteredQuery;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.TermQuery;
 import org.apache.lucene.search.TopDocs;
@@ -235,13 +233,14 @@ public class IndexManager {
         searcher = index.getIndexReader();
         usedCache = false;
       }
-      
+
       TableContext tableContext = getTableContext(table);
       FieldManager fieldManager = tableContext.getFieldManager();
-      
+
       Query highlightQuery = getHighlightQuery(selector, table, fieldManager);
 
-      fetchRow(searcher.getIndexReader(), table, shard, selector, fetchResult, highlightQuery,
fieldManager, _maxHeapPerRowFetch);
+      fetchRow(searcher.getIndexReader(), table, shard, selector, fetchResult, highlightQuery,
fieldManager,
+          _maxHeapPerRowFetch);
 
       if (fetchResult.rowResult != null) {
         if (fetchResult.rowResult.row != null && fetchResult.rowResult.row.records
!= null) {
@@ -280,12 +279,12 @@ public class IndexManager {
     }
 
     TableContext context = getTableContext(table);
-    Filter preFilter = QueryParserUtil.parseFilter(table, simpleQuery.preSuperFilter, false,
fieldManager, _filterCache,
-        context);
-    Filter postFilter = QueryParserUtil.parseFilter(table, simpleQuery.postSuperFilter, true,
fieldManager, _filterCache,
-        context);
-    return QueryParserUtil.parseQuery(simpleQuery.queryStr, simpleQuery.superQueryOn, fieldManager,
postFilter, preFilter,
-        getScoreType(simpleQuery.type), context);
+    Filter preFilter = QueryParserUtil.parseFilter(table, simpleQuery.preSuperFilter, false,
fieldManager,
+        _filterCache, context);
+    Filter postFilter = QueryParserUtil.parseFilter(table, simpleQuery.postSuperFilter, true,
fieldManager,
+        _filterCache, context);
+    return QueryParserUtil.parseQuery(simpleQuery.queryStr, simpleQuery.superQueryOn, fieldManager,
postFilter,
+        preFilter, getScoreType(simpleQuery.type), context);
   }
 
   private void populateSelector(String table, Selector selector) throws IOException, BlurException
{
@@ -390,31 +389,17 @@ public class IndexManager {
       ParallelCall<Entry<String, BlurIndex>, BlurResultIterable> call;
       TableContext context = getTableContext(table);
       FieldManager fieldManager = context.getFieldManager();
-      if (isSimpleQuery(blurQuery)) {
-        SimpleQuery simpleQuery = blurQuery.simpleQuery;
-        Filter preFilter = QueryParserUtil.parseFilter(table, simpleQuery.preSuperFilter,
false, fieldManager,
-            _filterCache, context);
-        Filter postFilter = QueryParserUtil.parseFilter(table, simpleQuery.postSuperFilter,
true, fieldManager,
-            _filterCache, context);
-        Query userQuery = QueryParserUtil.parseQuery(simpleQuery.queryStr, simpleQuery.superQueryOn,
fieldManager,
-            postFilter, preFilter, getScoreType(simpleQuery.type), context);
-        Query facetedQuery = getFacetedQuery(blurQuery, userQuery, facetedCounts, fieldManager,
context, postFilter,
-            preFilter);
-        call = new SimpleQueryParallelCall(running, table, status, _indexServer, facetedQuery,
blurQuery.selector,
-            _queriesInternalMeter, shardServerContext, runSlow, _fetchCount, _maxHeapPerRowFetch);
-      } else {
-        Query query = getQuery(blurQuery.expertQuery);
-        Filter filter = getFilter(blurQuery.expertQuery);
-        Query userQuery;
-        if (filter != null) {
-          userQuery = new FilteredQuery(query, filter);
-        } else {
-          userQuery = query;
-        }
-        Query facetedQuery = getFacetedQuery(blurQuery, userQuery, facetedCounts, fieldManager,
context, null, null);
-        call = new SimpleQueryParallelCall(running, table, status, _indexServer, facetedQuery,
blurQuery.selector,
-            _queriesInternalMeter, shardServerContext, runSlow, _fetchCount, _maxHeapPerRowFetch);
-      }
+      SimpleQuery simpleQuery = blurQuery.simpleQuery;
+      Filter preFilter = QueryParserUtil.parseFilter(table, simpleQuery.preSuperFilter, false,
fieldManager,
+          _filterCache, context);
+      Filter postFilter = QueryParserUtil.parseFilter(table, simpleQuery.postSuperFilter,
true, fieldManager,
+          _filterCache, context);
+      Query userQuery = QueryParserUtil.parseQuery(simpleQuery.queryStr, simpleQuery.superQueryOn,
fieldManager,
+          postFilter, preFilter, getScoreType(simpleQuery.type), context);
+      Query facetedQuery = getFacetedQuery(blurQuery, userQuery, facetedCounts, fieldManager,
context, postFilter,
+          preFilter);
+      call = new SimpleQueryParallelCall(running, table, status, _indexServer, facetedQuery,
blurQuery.selector,
+          _queriesInternalMeter, shardServerContext, runSlow, _fetchCount, _maxHeapPerRowFetch);
       MergerBlurResultIterable merger = new MergerBlurResultIterable(blurQuery);
       return ForkJoin.execute(_executor, blurIndexes.entrySet(), call, new Cancel() {
         @Override
@@ -448,12 +433,12 @@ public class IndexManager {
   public String parseQuery(String table, SimpleQuery simpleQuery) throws ParseException,
BlurException {
     TableContext context = getTableContext(table);
     FieldManager fieldManager = context.getFieldManager();
-    Filter preFilter = QueryParserUtil.parseFilter(table, simpleQuery.preSuperFilter, false,
fieldManager, _filterCache,
-        context);
-    Filter postFilter = QueryParserUtil.parseFilter(table, simpleQuery.postSuperFilter, true,
fieldManager, _filterCache,
-        context);
-    Query userQuery = QueryParserUtil.parseQuery(simpleQuery.queryStr, simpleQuery.superQueryOn,
fieldManager, postFilter,
-        preFilter, getScoreType(simpleQuery.type), context);
+    Filter preFilter = QueryParserUtil.parseFilter(table, simpleQuery.preSuperFilter, false,
fieldManager,
+        _filterCache, context);
+    Filter postFilter = QueryParserUtil.parseFilter(table, simpleQuery.postSuperFilter, true,
fieldManager,
+        _filterCache, context);
+    Query userQuery = QueryParserUtil.parseQuery(simpleQuery.queryStr, simpleQuery.superQueryOn,
fieldManager,
+        postFilter, preFilter, getScoreType(simpleQuery.type), context);
     return userQuery.toString();
   }
 
@@ -461,31 +446,16 @@ public class IndexManager {
     return TableContext.create(_clusterStatus.getTableDescriptor(true, _clusterStatus.getCluster(true,
table), table));
   }
 
-  private Filter getFilter(ExpertQuery expertQuery) throws BException {
-    throw new BException("Expert query not supported", new Throwable());
-  }
-
-  private Query getQuery(ExpertQuery expertQuery) throws BException {
-    throw new BException("Expert query not supported", new Throwable());
-  }
-
-  private boolean isSimpleQuery(BlurQuery blurQuery) {
-    if (blurQuery.simpleQuery != null) {
-      return true;
-    }
-    return false;
-  }
-
-  private Query getFacetedQuery(BlurQuery blurQuery, Query userQuery, AtomicLongArray counts,
FieldManager fieldManager,
-      TableContext context, Filter postFilter, Filter preFilter) throws ParseException {
+  private Query getFacetedQuery(BlurQuery blurQuery, Query userQuery, AtomicLongArray counts,
+      FieldManager fieldManager, TableContext context, Filter postFilter, Filter preFilter)
throws ParseException {
     if (blurQuery.facets == null) {
       return userQuery;
     }
     return new FacetQuery(userQuery, getFacetQueries(blurQuery, fieldManager, context, postFilter,
preFilter), counts);
   }
 
-  private Query[] getFacetQueries(BlurQuery blurQuery, FieldManager fieldManager, TableContext
context, Filter postFilter,
-      Filter preFilter) throws ParseException {
+  private Query[] getFacetQueries(BlurQuery blurQuery, FieldManager fieldManager, TableContext
context,
+      Filter postFilter, Filter preFilter) throws ParseException {
     int size = blurQuery.facets.size();
     Query[] queries = new Query[size];
     for (int i = 0; i < size; i++) {
@@ -523,8 +493,9 @@ public class IndexManager {
     fetchRow(reader, table, shard, selector, fetchResult, highlightQuery, null, maxHeap);
   }
 
-  public static void fetchRow(IndexReader reader, String table, String shard, Selector selector,
FetchResult fetchResult,
-      Query highlightQuery, FieldManager fieldManager, int maxHeap) throws CorruptIndexException,
IOException {
+  public static void fetchRow(IndexReader reader, String table, String shard, Selector selector,
+      FetchResult fetchResult, Query highlightQuery, FieldManager fieldManager, int maxHeap)
+      throws CorruptIndexException, IOException {
     fetchResult.table = table;
     String locationId = selector.locationId;
     int lastSlash = locationId.lastIndexOf('/');
@@ -558,7 +529,8 @@ public class IndexManager {
           String preTag = highlightOptions.getPreTag();
           String postTag = highlightOptions.getPostTag();
           try {
-            document = HighlightHelper.highlight(docId, document, highlightQuery, fieldManager,
reader, preTag, postTag);
+            document = HighlightHelper
+                .highlight(docId, document, highlightQuery, fieldManager, reader, preTag,
postTag);
           } catch (InvalidTokenOffsetsException e) {
             LOG.error("Unknown error while tring to highlight", e);
           }
@@ -587,8 +559,8 @@ public class IndexManager {
             HighlightOptions highlightOptions = selector.getHighlightOptions();
             String preTag = highlightOptions.getPreTag();
             String postTag = highlightOptions.getPostTag();
-            docs = HighlightHelper.highlightDocuments(reader, term, fieldVisitor, selector,
highlightQuery, fieldManager,
-                preTag, postTag);
+            docs = HighlightHelper.highlightDocuments(reader, term, fieldVisitor, selector,
highlightQuery,
+                fieldManager, preTag, postTag);
           } else {
             docs = BlurUtil.fetchDocuments(reader, term, fieldVisitor, selector, maxHeap,
table + "/" + shard);
           }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/42c1afed/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
b/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
index 9208be0..4ef858d 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
@@ -36,11 +36,6 @@ import org.apache.blur.BlurConfiguration;
 import org.apache.blur.log.Log;
 import org.apache.blur.log.LogFactory;
 import org.apache.blur.lucene.search.FairSimilarity;
-import org.apache.blur.thirdparty.thrift_0_9_0.TBase;
-import org.apache.blur.thirdparty.thrift_0_9_0.TException;
-import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TJSONProtocol;
-import org.apache.blur.thirdparty.thrift_0_9_0.transport.TMemoryInputTransport;
-import org.apache.blur.thrift.generated.ColumnPreCache;
 import org.apache.blur.thrift.generated.TableDescriptor;
 import org.apache.blur.utils.BlurConstants;
 import org.apache.blur.utils.BlurUtil;
@@ -407,8 +402,8 @@ public class ZookeeperClusterStatus extends ClusterStatus {
           tableDescriptor.blockCaching = isBlockCacheEnabled(cluster, table);
           tableDescriptor.blockCachingFileTypes = getBlockCacheFileTypes(cluster, table);
           tableDescriptor.name = table;
-          tableDescriptor.columnPreCache = fromBytes(
-              getData(ZookeeperPathConstants.getTableColumnsToPreCache(cluster, table)),
ColumnPreCache.class);
+          tableDescriptor.preCacheCols = toList(getData(ZookeeperPathConstants
+              .getTableColumnsToPreCache(cluster, table)));
           byte[] data = getData(ZookeeperPathConstants.getTableSimilarityPath(cluster, table));
           if (data != null) {
             tableDescriptor.similarityClass = new String(data);
@@ -437,31 +432,37 @@ public class ZookeeperClusterStatus extends ClusterStatus {
     return tableDescriptor;
   }
 
-  private void updateReadOnlyAndEnabled(boolean useCache, TableDescriptor tableDescriptor,
String cluster, String table) {
-    if (tableDescriptor != null) {
-      tableDescriptor.setReadOnly(isReadOnly(useCache, cluster, table));
-      tableDescriptor.setIsEnabled(isEnabled(useCache, cluster, table));
+  private static List<String> toList(byte[] bs) {
+    if (bs == null) {
+      return null;
+    }
+    String str = new String(bs);
+    String[] split = str.split(",");
+    List<String> list = new ArrayList<String>();
+    for (String s : split) {
+      list.add(s.trim());
     }
+    return list;
   }
 
-  @SuppressWarnings("unchecked")
-  private <T extends TBase<?, ?>> T fromBytes(byte[] data, Class<T> clazz)
{
-    try {
-      if (data == null) {
-        return null;
+  private static byte[] toBytes(List<String> list) {
+    if (list == null) {
+      return null;
+    }
+    StringBuilder builder = new StringBuilder();
+    for (String s : list) {
+      if (builder.length() != 0) {
+        builder.append(',');
       }
-      TBase<?, ?> base = clazz.newInstance();
-      TMemoryInputTransport trans = new TMemoryInputTransport(data);
-      TJSONProtocol protocol = new TJSONProtocol(trans);
-      base.read(protocol);
-      trans.close();
-      return (T) base;
-    } catch (InstantiationException e) {
-      throw new RuntimeException(e);
-    } catch (IllegalAccessException e) {
-      throw new RuntimeException(e);
-    } catch (TException e) {
-      throw new RuntimeException(e);
+      builder.append(s);
+    }
+    return builder.toString().getBytes();
+  }
+
+  private void updateReadOnlyAndEnabled(boolean useCache, TableDescriptor tableDescriptor,
String cluster, String table) {
+    if (tableDescriptor != null) {
+      tableDescriptor.setReadOnly(isReadOnly(useCache, cluster, table));
+      tableDescriptor.setIsEnabled(isEnabled(useCache, cluster, table));
     }
   }
 
@@ -716,7 +717,6 @@ public class ZookeeperClusterStatus extends ClusterStatus {
       boolean blockCaching = tableDescriptor.blockCaching;
       Set<String> blockCachingFileTypes = tableDescriptor.blockCachingFileTypes;
       String blurTablePath = ZookeeperPathConstants.getTablePath(cluster, table);
-      ColumnPreCache columnPreCache = tableDescriptor.columnPreCache;
 
       if (_zk.exists(blurTablePath, false) != null) {
         throw new IOException("Table [" + table + "] already exists.");
@@ -724,7 +724,7 @@ public class ZookeeperClusterStatus extends ClusterStatus {
       BlurUtil.setupFileSystem(uri, shardCount);
       BlurUtil.createPath(_zk, blurTablePath, null);
       BlurUtil.createPath(_zk, ZookeeperPathConstants.getTableColumnsToPreCache(cluster,
table),
-          BlurUtil.read(columnPreCache));
+          toBytes(tableDescriptor.preCacheCols));
       BlurUtil.createPath(_zk, ZookeeperPathConstants.getTableUriPath(cluster, table), uri.getBytes());
       BlurUtil.createPath(_zk, ZookeeperPathConstants.getTableShardCountPath(cluster, table),
           Integer.toString(shardCount).getBytes());

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/42c1afed/blur-core/src/main/java/org/apache/blur/manager/indexserver/DefaultBlurIndexWarmup.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/indexserver/DefaultBlurIndexWarmup.java
b/blur-core/src/main/java/org/apache/blur/manager/indexserver/DefaultBlurIndexWarmup.java
index 38bb500..0e96b8f 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/indexserver/DefaultBlurIndexWarmup.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/indexserver/DefaultBlurIndexWarmup.java
@@ -31,7 +31,6 @@ import org.apache.blur.log.LogFactory;
 import org.apache.blur.lucene.warmup.IndexTracerResult;
 import org.apache.blur.lucene.warmup.IndexWarmup;
 import org.apache.blur.manager.indexserver.DistributedIndexServer.ReleaseReader;
-import org.apache.blur.thrift.generated.ColumnPreCache;
 import org.apache.blur.thrift.generated.TableDescriptor;
 import org.apache.lucene.index.AtomicReader;
 import org.apache.lucene.index.AtomicReaderContext;
@@ -60,9 +59,9 @@ public class DefaultBlurIndexWarmup extends BlurIndexWarmup {
       IndexWarmup indexWarmup = new IndexWarmup(isClosed, maxSampleSize, _warmupBandwidthThrottleBytesPerSec);
       String context = table.getName() + "/" + shard;
       Map<String, List<IndexTracerResult>> sampleIndex = indexWarmup.sampleIndex(reader,
context);
-      ColumnPreCache columnPreCache = table.getColumnPreCache();
-      if (columnPreCache != null) {
-        warm(reader, columnPreCache.preCacheCols, indexWarmup, sampleIndex, context, isClosed,
pauseWarmup);
+      List<String> preCacheCols = table.getPreCacheCols();
+      if (preCacheCols != null) {
+        warm(reader, preCacheCols, indexWarmup, sampleIndex, context, isClosed, pauseWarmup);
       } else {
         warm(reader, getFields(reader), indexWarmup, sampleIndex, context, isClosed, pauseWarmup);
       }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/42c1afed/blur-core/src/main/java/org/apache/blur/manager/results/BlurResultIterableClient.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/results/BlurResultIterableClient.java
b/blur-core/src/main/java/org/apache/blur/manager/results/BlurResultIterableClient.java
index 462efdb..015c903 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/results/BlurResultIterableClient.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/results/BlurResultIterableClient.java
@@ -70,11 +70,10 @@ public class BlurResultIterableClient implements BlurResultIterable {
   private void performSearch() throws BlurException {
     try {
       long cursor = _remoteFetchCount * _batch;
-      BlurQuery blurQuery = new BlurQuery(_originalQuery.simpleQuery, _originalQuery.expertQuery,
-          _originalQuery.facets, null, false, _originalQuery.useCacheIfPresent, cursor, _remoteFetchCount,
+      BlurQuery blurQuery = new BlurQuery(_originalQuery.simpleQuery, 
+          _originalQuery.facets, null, _originalQuery.useCacheIfPresent, cursor, _remoteFetchCount,
           _originalQuery.minimumNumberOfResults, _originalQuery.maxQueryTime, _originalQuery.uuid,
-          _originalQuery.userContext, _originalQuery.cacheResult, _originalQuery.startTime,
-          _originalQuery.modifyFileCaches);
+          _originalQuery.userContext, _originalQuery.cacheResult, _originalQuery.startTime);
       _results = makeLazy(_client.query(_table, blurQuery));
       addFacets();
       _totalResults = _results.totalResults;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/42c1afed/blur-core/src/main/java/org/apache/blur/manager/writer/FieldBasedWarmer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/writer/FieldBasedWarmer.java
b/blur-core/src/main/java/org/apache/blur/manager/writer/FieldBasedWarmer.java
index 822b8d4..2cfc383 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/writer/FieldBasedWarmer.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/writer/FieldBasedWarmer.java
@@ -26,7 +26,6 @@ import org.apache.blur.log.LogFactory;
 import org.apache.blur.lucene.warmup.IndexTracerResult;
 import org.apache.blur.lucene.warmup.IndexWarmup;
 import org.apache.blur.server.ShardContext;
-import org.apache.blur.thrift.generated.ColumnPreCache;
 import org.apache.lucene.index.AtomicReader;
 import org.apache.lucene.index.Fields;
 import org.apache.lucene.index.IndexWriter.IndexReaderWarmer;
@@ -45,14 +44,13 @@ public class FieldBasedWarmer extends IndexReaderWarmer {
 
   @Override
   public void warm(AtomicReader reader) throws IOException {
-    ColumnPreCache columnPreCache = shardContext.getTableContext().getDescriptor().getColumnPreCache();
-    List<String> preCacheCols = columnPreCache == null ? null : columnPreCache.getPreCacheCols();
+    List<String> preCacheCols = shardContext.getTableContext().getDescriptor().getPreCacheCols();
     int maxSampleSize = 1000;
     IndexWarmup indexWarmup = new IndexWarmup(isClosed, maxSampleSize);
     String context = shardContext.getTableContext().getTable() + "/" + shardContext.getShard();
     Map<String, List<IndexTracerResult>> sampleIndex = indexWarmup.sampleIndex(reader,
context);
     if (preCacheCols != null) {
-      warm(reader, columnPreCache.preCacheCols, indexWarmup, sampleIndex, context, isClosed);
+      warm(reader, preCacheCols, indexWarmup, sampleIndex, context, isClosed);
     } else {
       Fields fields = reader.fields();
       warm(reader, fields, indexWarmup, sampleIndex, context, isClosed);

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/42c1afed/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java b/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
index 473cb9b..484c46f 100644
--- a/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
+++ b/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
@@ -51,7 +51,6 @@ import org.apache.blur.manager.results.BlurResultIterableClient;
 import org.apache.blur.manager.results.LazyBlurResult;
 import org.apache.blur.manager.results.MergerBlurResultIterable;
 import org.apache.blur.manager.stats.MergerTableStats;
-import org.apache.blur.manager.status.MergerQueryStatus;
 import org.apache.blur.manager.status.MergerQueryStatusSingle;
 import org.apache.blur.thirdparty.thrift_0_9_0.TException;
 import org.apache.blur.thrift.commands.BlurCommand;
@@ -466,22 +465,6 @@ public class BlurControllerServer extends TableAdmin implements Iface
{
   }
 
   @Override
-  public List<BlurQueryStatus> currentQueries(final String table) throws BlurException,
TException {
-    checkTable(table);
-    try {
-      return scatterGather(getCluster(table), new BlurCommand<List<BlurQueryStatus>>()
{
-        @Override
-        public List<BlurQueryStatus> call(Client client) throws BlurException, TException
{
-          return client.currentQueries(table);
-        }
-      }, new MergerQueryStatus(_defaultParallelCallTimeout));
-    } catch (Exception e) {
-      LOG.error("Unknown error while trying to get current searches [{0}]", e, table);
-      throw new BException("Unknown error while trying to get current searches [{0}]", e,
table);
-    }
-  }
-
-  @Override
   public List<Long> queryStatusIdList(final String table) throws BlurException, TException
{
     checkTable(table);
     try {
@@ -531,7 +514,7 @@ public class BlurControllerServer extends TableAdmin implements Iface
{
       return scatterGather(getCluster(table), new BlurCommand<TableStats>() {
         @Override
         public TableStats call(Client client) throws BlurException, TException {
-          return client.getTableStats(table);
+          return client.tableStats(table);
         }
       }, new MergerTableStats(_defaultParallelCallTimeout));
     } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/42c1afed/blur-core/src/main/java/org/apache/blur/thrift/BlurShardServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/thrift/BlurShardServer.java b/blur-core/src/main/java/org/apache/blur/thrift/BlurShardServer.java
index b944290..19ec687 100644
--- a/blur-core/src/main/java/org/apache/blur/thrift/BlurShardServer.java
+++ b/blur-core/src/main/java/org/apache/blur/thrift/BlurShardServer.java
@@ -179,18 +179,6 @@ public class BlurShardServer extends TableAdmin implements Iface {
   }
 
   @Override
-  public List<BlurQueryStatus> currentQueries(String table) throws BlurException, TException
{
-    checkTable(_cluster, table);
-    resetSearchers();
-    try {
-      return _indexManager.currentQueries(table);
-    } catch (Exception e) {
-      LOG.error("Unknown error while trying to get current search status [table={0}]", e,
table);
-      throw new BException(e.getMessage(), e);
-    }
-  }
-
-  @Override
   public TableStats tableStats(String table) throws BlurException, TException {
     checkTable(_cluster, table);
     resetSearchers();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/42c1afed/blur-core/src/main/java/org/apache/blur/thrift/TableAdmin.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/thrift/TableAdmin.java b/blur-core/src/main/java/org/apache/blur/thrift/TableAdmin.java
index 5fbedd8..b1813e6 100644
--- a/blur-core/src/main/java/org/apache/blur/thrift/TableAdmin.java
+++ b/blur-core/src/main/java/org/apache/blur/thrift/TableAdmin.java
@@ -37,7 +37,6 @@ import org.apache.blur.thrift.generated.Metric;
 import org.apache.blur.thrift.generated.Selector;
 import org.apache.blur.thrift.generated.ShardState;
 import org.apache.blur.thrift.generated.TableDescriptor;
-import org.apache.blur.thrift.generated.TableStats;
 import org.apache.blur.utils.BlurUtil;
 import org.apache.blur.utils.MemoryReporter;
 import org.apache.zookeeper.ZooKeeper;
@@ -85,11 +84,6 @@ public abstract class TableAdmin implements Iface {
   }
 
   @Override
-  public TableStats getTableStats(String table) throws BlurException, TException {
-    return tableStats(table);
-  }
-
-  @Override
   public boolean isInSafeMode(String cluster) throws BlurException, TException {
     try {
       return _clusterStatus.isInSafeMode(true, cluster);

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/42c1afed/blur-core/src/main/java/org/apache/blur/utils/QueryCache.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/utils/QueryCache.java b/blur-core/src/main/java/org/apache/blur/utils/QueryCache.java
index 7d5eff2..6a7321c 100644
--- a/blur-core/src/main/java/org/apache/blur/utils/QueryCache.java
+++ b/blur-core/src/main/java/org/apache/blur/utils/QueryCache.java
@@ -47,16 +47,13 @@ public class QueryCache implements EvictionListener<QueryCacheKey,
QueryCacheEnt
     LOG.debug("Cache [" + _name + "] key [" + key + "] value [" + value + "] evicted.");
   }
 
-  @SuppressWarnings("deprecation")
   public static QueryCacheKey getNormalizedBlurQueryKey(String table, BlurQuery blurQuery)
{
     BlurQuery newBlurQuery = new BlurQuery(blurQuery);
-    newBlurQuery.allowStaleData = false;
     newBlurQuery.useCacheIfPresent = false;
     newBlurQuery.userContext = null;
     newBlurQuery.maxQueryTime = 0;
     newBlurQuery.uuid = 0;
     newBlurQuery.startTime = 0;
-    newBlurQuery.modifyFileCaches = false;
     return new QueryCacheKey(table, newBlurQuery);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/42c1afed/blur-shell/src/main/java/org/apache/blur/shell/DescribeTableCommand.java
----------------------------------------------------------------------
diff --git a/blur-shell/src/main/java/org/apache/blur/shell/DescribeTableCommand.java b/blur-shell/src/main/java/org/apache/blur/shell/DescribeTableCommand.java
index 8610692..d7a1a3b 100644
--- a/blur-shell/src/main/java/org/apache/blur/shell/DescribeTableCommand.java
+++ b/blur-shell/src/main/java/org/apache/blur/shell/DescribeTableCommand.java
@@ -41,7 +41,7 @@ public class DescribeTableCommand extends Command {
     out.println("tableUri                         : " + describe.tableUri);
     out.println("shardCount                       : " + describe.shardCount);
     out.println("readOnly                         : " + describe.readOnly);
-    out.println("columnPreCache                   : " + describe.columnPreCache);
+    out.println("columnPreCache                   : " + describe.preCacheCols);
     out.println("blockCaching                     : " + describe.blockCaching);
     out.println("blockCachingFileTypes            : " + describe.blockCachingFileTypes);
     out.println("tableProperties                  : " + describe.tableProperties);


Mime
View raw message