incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject git commit: BLUR-ID:84 fixed.
Date Thu, 23 May 2013 04:53:22 GMT
Updated Branches:
  refs/heads/0.1.5 0b5e8f573 -> 0e02da8c8


BLUR-ID:84 fixed.


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

Branch: refs/heads/0.1.5
Commit: 0e02da8c8f3b0d031320ab3166406f2b9f299d4e
Parents: 0b5e8f5
Author: Gagan <gagandeepjuneja@gmail.com>
Authored: Thu May 23 10:22:26 2013 +0530
Committer: Gagan <gagandeepjuneja@gmail.com>
Committed: Thu May 23 10:22:26 2013 +0530

----------------------------------------------------------------------
 .../apache/blur/thrift/BlurControllerServer.java   |   20 +-------------
 1 files changed, 2 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/0e02da8c/src/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
b/src/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
index 4e44bd9..6e1d6e1 100644
--- a/src/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
+++ b/src/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
@@ -70,9 +70,6 @@ import org.apache.blur.utils.BlurUtil;
 import org.apache.blur.utils.ForkJoin;
 import org.apache.blur.utils.ForkJoin.Merger;
 import org.apache.blur.utils.ForkJoin.ParallelCall;
-import org.apache.blur.utils.QueryCache;
-import org.apache.blur.utils.QueryCacheEntry;
-import org.apache.blur.utils.QueryCacheKey;
 import org.apache.blur.zookeeper.WatchChildren;
 import org.apache.blur.zookeeper.WatchChildren.OnChange;
 import org.apache.blur.zookeeper.WatchNodeExistance;
@@ -113,7 +110,6 @@ public class BlurControllerServer extends TableAdmin implements Iface
{
   private int _remoteFetchCount = 100;
   private long _maxTimeToLive = TimeUnit.MINUTES.toMillis(1);
   private int _maxQueryCacheElements = 128;
-  private QueryCache _queryCache;
   private BlurQueryChecker _queryChecker;
   private AtomicBoolean _running = new AtomicBoolean();
 
@@ -137,7 +133,6 @@ public class BlurControllerServer extends TableAdmin implements Iface
{
   public void init() throws KeeperException, InterruptedException {
     setupZookeeper();
     registerMyself();
-    _queryCache = new QueryCache("controller-cache", _maxQueryCacheElements, _maxTimeToLive);
     _executor = Executors.newThreadPool(CONTROLLER_THREAD_POOL, _threadCount);
     _running.set(true);
     watchForClusterChanges();
@@ -309,18 +304,7 @@ public class BlurControllerServer extends TableAdmin implements Iface
{
         final AtomicLongArray facetCounts = BlurUtil.getAtomicLongArraySameLengthAsList(blurQuery.facets);
 
         BlurQuery original = new BlurQuery(blurQuery);
-        if (blurQuery.useCacheIfPresent) {
-          LOG.debug("Using cache for query [{0}] on table [{1}].", blurQuery, table);
-          QueryCacheKey key = QueryCache.getNormalizedBlurQueryKey(table, blurQuery);
-          QueryCacheEntry queryCacheEntry = _queryCache.get(key);
-          if (_queryCache.isValid(queryCacheEntry)) {
-            LOG.debug("Cache hit for query [{0}] on table [{1}].", blurQuery, table);
-            return queryCacheEntry.getBlurResults(blurQuery);
-          } else {
-            _queryCache.remove(key);
-          }
-        }
-
+        
         BlurUtil.setStartTime(original);
 
         Selector selector = blurQuery.getSelector();
@@ -338,7 +322,7 @@ public class BlurControllerServer extends TableAdmin implements Iface
{
           BlurClientManager.sleep(_defaultDelay, _maxDefaultDelay, retries, _maxDefaultRetries);
           continue OUTER;
         }
-        return _queryCache.cache(table, original, results);
+        return results;
       } catch (Exception e) {
         LOG.error("Unknown error during search of [table={0},blurQuery={1}]", e, table, blurQuery);
         throw new BException("Unknown error during search of [table={0},blurQuery={1}]",
e, table, blurQuery);


Mime
View raw message