You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2019/02/21 19:34:23 UTC

[impala] branch master updated: IMPALA-8235: avoid TIME_MS in runtime profile

This is an automated email from the ASF dual-hosted git repository.

joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git


The following commit(s) were added to refs/heads/master by this push:
     new c8634b5  IMPALA-8235: avoid TIME_MS in runtime profile
c8634b5 is described below

commit c8634b5287ad1a03461c340845f14053aab38230
Author: Tim Armstrong <ta...@cloudera.com>
AuthorDate: Wed Feb 20 17:26:43 2019 -0800

    IMPALA-8235: avoid TIME_MS in runtime profile
    
    There are issues with using new TUnit values in runtime profiles that
    are consumed by readers with an older version of the thrift
    definitions.
    
    Work around the issue by using the older TIME_NS type for this
    counter.
    
    Testing:
    Confirmed manually that a tool with an old version of the thrift API
    (Cloudera Manager) could parse the profile.
    
    Change-Id: Ia6a0846f401ced1947187b8581563de9dbb4fe53
    Reviewed-on: http://gerrit.cloudera.org:8080/12544
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 be/src/scheduling/admission-controller.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/be/src/scheduling/admission-controller.cc b/be/src/scheduling/admission-controller.cc
index ace09e5..569e24f 100644
--- a/be/src/scheduling/admission-controller.cc
+++ b/be/src/scheduling/admission-controller.cc
@@ -1102,8 +1102,10 @@ void AdmissionController::AdmitQuery(QuerySchedule* schedule, bool was_queued) {
   // if this this may be the case.
   int64_t time_since_update_ms;
   string staleness_detail = GetStalenessDetailLocked("", &time_since_update_ms);
+  // IMPALA-8235: convert to TIME_NS because of issues with tools consuming TIME_MS.
   COUNTER_SET(ADD_COUNTER(schedule->summary_profile(),
-      PROFILE_TIME_SINCE_LAST_UPDATE_COUNTER_NAME, TUnit::TIME_MS), time_since_update_ms);
+      PROFILE_TIME_SINCE_LAST_UPDATE_COUNTER_NAME, TUnit::TIME_NS),
+      static_cast<int64_t>(time_since_update_ms * NANOS_PER_MICRO * MICROS_PER_MILLI));
   if (!staleness_detail.empty()) {
     schedule->summary_profile()->AddInfoString(
         PROFILE_INFO_KEY_STALENESS_WARNING, staleness_detail);