Henry Robinson has posted comments on this change.

Change subject: IMPALA-5511: Add process start time to debug web page
......................................................................


Patch Set 8:

(7 comments)

Looks a lot better! I think we can get rid of some duplication if you follow my 
suggestion to move the start-time initialization into a common 
RegisterCommonMetrics() method (see RegisterMemoryMetrics() for an example of 
how this is done for other metrics).

http://gerrit.cloudera.org:8080/#/c/7363/8/be/src/catalog/catalog-server.cc
File be/src/catalog/catalog-server.cc:

PS8, Line 53: const string CATALOG_SERVER_START_TIME =
            :     "process-start-time";
nit: one line?


PS8, Line 198: 
start_time_metric_->set_value(TimestampValue::LocalTime().ToString());
since we're calling this 'process start time' I would put its initialization as 
early as possible. In fact, I would put it in catalogd-main.cc (and ideally 
have a common InitCommonMetrics() method that all three process types could 
call).


http://gerrit.cloudera.org:8080/#/c/7363/8/be/src/catalog/catalog-server.h
File be/src/catalog/catalog-server.h:

Line 203:   /// Function is meant to be called from the CatalogServer 
constructor in order to register
nit: long line


PS8, Line 203: Function is meant to be called from the CatalogServer constructor
Don't say where this should be called from (that's the caller's decision!) - 
just say what it does.


http://gerrit.cloudera.org:8080/#/c/7363/8/be/src/util/default-path-handlers.cc
File be/src/util/default-path-handlers.cc:

PS8, Line 214: string GetProcessStartTime(MetricGroup* metric_group) {
             :   string error_text = "Error: Process start time can't be 
retrieved.";
             :   if (metric_group == nullptr) {
             :     return error_text;
             :   }
             : 
             :   Metric* start_time_metric = 
metric_group->GetMetricByName("process-start-time");
             :   if (start_time_metric == nullptr) {
             :     return error_text;
             :   }
             : 
             :   StringProperty* start_time_property = 
reinterpret_cast<StringProperty*>(start_time_metric);
             :   if (start_time_property == nullptr) {
             :     return error_text;
             :   }
             : 
             :   return start_time_property->value();
             : }
this shouldn't be necessary: we should ensure the metric is always created, and 
then we can just get at it by calling GetMetricByName(). I think we can do 
without this method.


http://gerrit.cloudera.org:8080/#/c/7363/8/be/src/util/metrics.cc
File be/src/util/metrics.cc:

Line 230: 
nit: remove blank line


http://gerrit.cloudera.org:8080/#/c/7363/8/www/root.tmpl
File www/root.tmpl:

PS8, Line 38: <h2>Process Start Time</h2>
            :   <pre>{{process_start_time}}</pre>
can you move this above Hardware Info? I think it's useful to see this near the 
top of the page.


-- 
To view, visit http://gerrit.cloudera.org:8080/7363
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I05ae2f80835b1b0e4bc3b38731778ba0871338a4
Gerrit-PatchSet: 8
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Gabor Kaszab <gaborkas...@cloudera.com>
Gerrit-Reviewer: Attila Jeges <atti...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <gaborkas...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Laszlo Gaal <laszlo.g...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <m...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>
Gerrit-HasComments: Yes

Reply via email to