incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/2] git commit: BLUR-292, populate the Query start time correctly
Date Mon, 11 Nov 2013 01:42:35 GMT
Updated Branches:
  refs/heads/master e23d2cb53 -> f8f7aef6b


BLUR-292, populate the Query start time correctly

Signed-off-by: Aaron McCurry <amccurry@gmail.com>


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

Branch: refs/heads/master
Commit: 7dd4a5c957d425501cb6ad70df9028e50dec14d1
Parents: e23d2cb
Author: Vikrant Navalgund <vikrant.navalgund@gmail.com>
Authored: Sun Nov 10 01:17:04 2013 +1100
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Sun Nov 10 20:22:52 2013 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/blur/manager/status/QueryStatus.java | 2 +-
 .../java/org/apache/blur/thrift/BlurControllerServer.java     | 7 ++-----
 .../src/main/java/org/apache/blur/thrift/BlurShardServer.java | 3 +++
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7dd4a5c9/blur-core/src/main/java/org/apache/blur/manager/status/QueryStatus.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/status/QueryStatus.java b/blur-core/src/main/java/org/apache/blur/manager/status/QueryStatus.java
index cad6290..47cff47 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/status/QueryStatus.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/status/QueryStatus.java
@@ -56,7 +56,7 @@ public class QueryStatus implements Comparable<QueryStatus> {
     _ttl = ttl;
     _table = table;
     _blurQuery = blurQuery;
-    _startingTime = System.currentTimeMillis();
+    _startingTime = blurQuery.getStartTime();
     _running = running;
     _state.set(QueryState.RUNNING);
   }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7dd4a5c9/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 e2a0072..b37f2cc 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
@@ -354,14 +354,11 @@ public class BlurControllerServer extends TableAdmin implements Iface
{
       blurQuery.setUuid(UUID.randomUUID().toString());
     }
 
+    BlurUtil.setStartTime(blurQuery);
+
     OUTER: for (int retries = 0; retries < _maxDefaultRetries; retries++) {
       try {
         final AtomicLongArray facetCounts = BlurUtil.getAtomicLongArraySameLengthAsList(blurQuery.facets);
-
-        BlurQuery original = new BlurQuery(blurQuery);
-
-        BlurUtil.setStartTime(original);
-
         Selector selector = blurQuery.getSelector();
         if (selector == null) {
           selector = new Selector();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/7dd4a5c9/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 4dfe043..d7450f9 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
@@ -106,6 +106,9 @@ public class BlurShardServer extends TableAdmin implements Iface {
         }
       }
 
+      // Note: Querying the Shard Server directly if query.startTime == 0
+      BlurUtil.setStartTime(blurQuery);
+
       if (blurQuery.useCacheIfPresent) {
         LOG.debug("Using cache for query [{0}] on table [{1}].", blurQuery, table);
         QueryCacheKey key = QueryCache.getNormalizedBlurQueryKey(table, blurQuery);


Mime
View raw message