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

Change subject: IMPALA-11478: Cleanup JniCatalog
......................................................................


Patch Set 3:

(9 comments)

This patch looks pretty good to me!

http://gerrit.cloudera.org:8080/#/c/19198/3//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/19198/3//COMMIT_MSG@13
PS3, Line 13: Frontend test added as JniCatalogOpTest.
We are lack of tests for thread annotations and logs. It'd be nice if you could 
verify these as I've done in the previous patch: 
https://gerrit.cloudera.org/c/18772/7//COMMIT_MSG#21
- Manually add codes to throw OutOfMemoryError and verify the logs shown as 
expected.
- Run test_concurrent_ddls.py and metadata tests. Capture jstacks and verify 
the thread annotations are shown.


http://gerrit.cloudera.org:8080/#/c/19198/3/fe/src/main/java/org/apache/impala/common/JniUtil.java
File fe/src/main/java/org/apache/impala/common/JniUtil.java:

http://gerrit.cloudera.org:8080/#/c/19198/3/fe/src/main/java/org/apache/impala/common/JniUtil.java@166
PS3, Line 166:   public static void logResponse(long startTime, TBase<?, ?> 
thriftReq, String method) {
             :     logResponse(0, startTime, thriftReq, method);
             :   }
             :
             :   public static void logResponse(long startTime, String method) {
             :     logResponse(startTime, null, method);
             :   }
We can remove these if they are no longer used.


http://gerrit.cloudera.org:8080/#/c/19198/3/fe/src/main/java/org/apache/impala/service/JniCatalog.java
File fe/src/main/java/org/apache/impala/service/JniCatalog.java:

http://gerrit.cloudera.org:8080/#/c/19198/3/fe/src/main/java/org/apache/impala/service/JniCatalog.java@20
PS3, Line 20: import static org.apache.impala.service.JniCatalogOp.*;
Please avoid star import


http://gerrit.cloudera.org:8080/#/c/19198/3/fe/src/main/java/org/apache/impala/service/JniCatalog.java@191
PS3, Line 191: .
nit: remove DOT here


http://gerrit.cloudera.org:8080/#/c/19198/3/fe/src/main/java/org/apache/impala/service/JniCatalog.java@294
PS3, Line 294: result
Shouldn't this be "params"?


http://gerrit.cloudera.org:8080/#/c/19198/3/fe/src/main/java/org/apache/impala/service/JniCatalog.java@316
PS3, Line 316: result
params?


http://gerrit.cloudera.org:8080/#/c/19198/3/fe/src/main/java/org/apache/impala/service/JniCatalogOp.java
File fe/src/main/java/org/apache/impala/service/JniCatalogOp.java:

http://gerrit.cloudera.org:8080/#/c/19198/3/fe/src/main/java/org/apache/impala/service/JniCatalogOp.java@20
PS3, Line 20: jline.internal.Preconditions
We use "com.google.common.base.Preconditions" instead:
https://github.com/apache/impala/blob/97a506c6560e7a0c6c5ba7d098f07c6b04ef6cad/fe/src/main/java/org/apache/impala/service/JniCatalog.java#L21


http://gerrit.cloudera.org:8080/#/c/19198/3/fe/src/main/java/org/apache/impala/service/JniCatalogOp.java@38
PS3, Line 38:   public static <RESULT, PARAMETER extends TBase<?, ?>> RESULT 
execOp(String methodName,
            :       String shortDescription, JniCatalogOpCallable<Pair<RESULT, 
Long>> operand,
            :       PARAMETER requestParameter, Runnable finalClause)
Could you add some commends about the parameters? especially the return type of 
"operand"


http://gerrit.cloudera.org:8080/#/c/19198/3/fe/src/main/java/org/apache/impala/service/JniCatalogOp.java@57
PS3, Line 57:       long duration = System.currentTimeMillis() - start;
            :       LOG.info("Finished {} request: {}. Time spent: {}", 
methodName, shortDescription,
            :           PrintUtils.printTimeMs(duration));
It'd be nice if move these into JniUtil#logResponse().



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1932172e2d13a7aab2336661c18befb4407ec9ab
Gerrit-Change-Number: 19198
Gerrit-PatchSet: 3
Gerrit-Owner: Peter Rozsa <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Comment-Date: Mon, 14 Nov 2022 09:08:38 +0000
Gerrit-HasComments: Yes

Reply via email to