incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [7/7] git commit: BLUR-292, populate the Query start time correctly
Date Tue, 17 Dec 2013 13:58:47 GMT
BLUR-292, populate the Query start time correctly

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

Conflicts:
	blur-core/src/main/java/org/apache/blur/thrift/BlurShardServer.java


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

Branch: refs/heads/apache-blur-0.2
Commit: 6e8b0b0b416bf954c47dbc820a23830cf591e14e
Parents: 2ca540a
Author: Vikrant Navalgund <vikrant.navalgund@gmail.com>
Authored: Sun Nov 10 01:17:04 2013 +1100
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Tue Dec 17 08:58:32 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/6e8b0b0b/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/6e8b0b0b/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 07cd0da..c78b6a9 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
@@ -350,15 +350,12 @@ public class BlurControllerServer extends TableAdmin implements Iface
{
     BlurUtil.setStartTime(blurQuery);
     trace.done();
 
+    BlurUtil.setStartTime(blurQuery);
+
     OUTER: for (int retries = 0; retries < _maxDefaultRetries; retries++) {
       try {
         Tracer selectorTrace = Trace.trace("selector - setup", Trace.param("retries", retries));
         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/6e8b0b0b/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 2c364ee..b750cba 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 && selector == null) {
         // Selector has to be null because we might cache data if it's not.
         LOG.debug("Using cache for query [{0}] on table [{1}].", blurQuery, table);


Mime
View raw message