leventov commented on a change in pull request #8157: Enum of ResponseContext 
keys
URL: https://github.com/apache/incubator-druid/pull/8157#discussion_r308786796
 
 

 ##########
 File path: 
processing/src/main/java/org/apache/druid/query/context/ResponseContext.java
 ##########
 @@ -84,36 +125,81 @@
     ETAG("ETag"),
     /**
      * Query fail time (current time + timeout).
+     * The final value in comparison to continuously updated TIMEOUT_AT.
      */
-    QUERY_FAIL_TIME("queryFailTime"),
+    QUERY_FAIL_DEADLINE_MILLIS("queryFailTime"),
     /**
      * Query total bytes gathered.
      */
     QUERY_TOTAL_BYTES_GATHERED("queryTotalBytesGathered"),
     /**
      * This variable indicates when a running query should be expired,
      * and is effective only when 'timeout' of queryContext has a positive 
value.
+     * Continuously updated by {@link 
org.apache.druid.query.scan.ScanQueryEngine}
+     * by reducing its value on the time of every scan iteration.
      */
     TIMEOUT_AT("timeoutAt"),
     /**
      * The number of scanned rows.
+     * For backward compatibility the context key name still equals to "count".
      */
-    COUNT(
+    NUM_SCANNED_ROWS(
         "count",
             (oldValue, newValue) -> (long) oldValue + (long) newValue
     ),
     /**
-     * CPU consumed while processing a request.
+     * The total CPU time for threads related to Sequence processing of the 
query.
+     * Resulting value on a Broker is a sum of downstream values from 
historicals / realtime nodes.
+     * For additional information see {@link 
org.apache.druid.query.CPUTimeMetricQueryRunner}
      */
-    CPU_CONSUMED(
+    CPU_CONSUMED_NANOS(
         "cpuConsumed",
             (oldValue, newValue) -> (long) oldValue + (long) newValue
     );
 
-    private final String name;
     /**
-     * Merge function associated with a key: Object (Object oldValue, Object 
newValue)
+     * TreeMap is used to have the natural ordering of its keys
      */
+    private static Map<String, BaseKey> map = new TreeMap<>();
 
 Review comment:
   I think this static variable and the associated methods don't need to be 
nested in `Key`. They might as well be in the higher-level `ResponseContext`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to