Quanlong Huang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/17284 )

Change subject: IMPALA-10645: Log catalogd HMS API metrics
......................................................................


Patch Set 8: Code-Review+1

(2 comments)

LGTM overall. Give +1 first in case Aman is reviewing as well. Otherwise, I can 
bump it to +2.

http://gerrit.cloudera.org:8080/#/c/17284/7/fe/src/main/java/org/apache/impala/catalog/metastore/CatalogMetastoreServer.java
File 
fe/src/main/java/org/apache/impala/catalog/metastore/CatalogMetastoreServer.java:

http://gerrit.cloudera.org:8080/#/c/17284/7/fe/src/main/java/org/apache/impala/catalog/metastore/CatalogMetastoreServer.java@421
PS7, Line 421: le specificApiRequestsFiveMinute
> RPC duration metrics are collected for all the APIs. But the cache hit rati
Ah, I see. Thanks for the explanation!


http://gerrit.cloudera.org:8080/#/c/17284/8/fe/src/main/java/org/apache/impala/catalog/metastore/CatalogMetastoreServer.java
File 
fe/src/main/java/org/apache/impala/catalog/metastore/CatalogMetastoreServer.java:

http://gerrit.cloudera.org:8080/#/c/17284/8/fe/src/main/java/org/apache/impala/catalog/metastore/CatalogMetastoreServer.java@462
PS8, Line 462: 
CatalogMonitor.INSTANCE.getCatalogdHmsCacheMetrics().getCounter(hitMetric)
             :                 .getCount()
nit: getting the hit count twice still makes the code looks messy.. I suggest 
codes like this

    long hitCount = CatalogMonitor.INSTANCE.getCatalogdHmsCacheMetrics()
        .getCounter(hitMetric).getCount();
    long missCount = CatalogMonitor.INSTANCE.getCatalogdHmsCacheMetrics()
        .getCounter(missMetric).getCount();
    return ((double) hitCount) / (hitCount + missCount);

It also reduce the risk if the hit count bumps between the two calls.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id41afe89bbe3395c158919bddd09f302c6752287
Gerrit-Change-Number: 17284
Gerrit-PatchSet: 8
Gerrit-Owner: Vihang Karajgaonkar <vih...@cloudera.com>
Gerrit-Reviewer: Aman Sinha <amsi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <huangquanl...@gmail.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vih...@cloudera.com>
Gerrit-Comment-Date: Tue, 20 Apr 2021 09:47:53 +0000
Gerrit-HasComments: Yes

Reply via email to