henrib commented on code in PR #4749:
URL: https://github.com/apache/hive/pull/4749#discussion_r1347393336
##########
common/src/java/org/apache/hadoop/hive/ql/log/PerfLogger.java:
##########
@@ -177,21 +176,13 @@ public long perfLogEnd(String callerName, String method,
String additionalInfo)
}
public Long getStartTime(String method) {
- long startTime = 0L;
-
- if (startTimes.containsKey(method)) {
- startTime = startTimes.get(method);
- }
- return startTime;
+ Long time = startTimes.get(method);
+ return time != null? time.longValue() : 0L;
}
public Long getEndTime(String method) {
- long endTime = 0L;
-
- if (endTimes.containsKey(method)) {
- endTime = endTimes.get(method);
- }
- return endTime;
+ Long time = endTimes.get(method);
+ return time != null? time.longValue() : 0L;
Review Comment:
Will do.
##########
common/src/java/org/apache/hadoop/hive/ql/log/PerfLogger.java:
##########
@@ -177,21 +176,13 @@ public long perfLogEnd(String callerName, String method,
String additionalInfo)
}
public Long getStartTime(String method) {
- long startTime = 0L;
-
- if (startTimes.containsKey(method)) {
- startTime = startTimes.get(method);
- }
- return startTime;
+ Long time = startTimes.get(method);
+ return time != null? time.longValue() : 0L;
Review Comment:
We can and I will update some signatures accordingly.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]