[
https://issues.apache.org/jira/browse/HIVE-25959?focusedWorklogId=728847&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-728847
]
ASF GitHub Bot logged work on HIVE-25959:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 17/Feb/22 10:59
Start Date: 17/Feb/22 10:59
Worklog Time Spent: 10m
Work Description: vcsomor commented on a change in pull request #3032:
URL: https://github.com/apache/hive/pull/3032#discussion_r808925697
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/metrics/JsonReporter.java
##########
@@ -160,7 +158,7 @@ public void report(SortedMap<String, Gauge> sortedMap,
SortedMap<String, Counter
try (BufferedWriter bw = Files.newBufferedWriter(tmpFile,
StandardCharsets.UTF_8)) {
bw.write(json);
} catch (IOException e) {
- LOG.error("Unable to write to temp file {}" + tmpFile, e);
+ LOG.error("Unable to write to temp file {}", tmpFile, e);
Review comment:
This is not required because, the if the last element is a `Throwable`
then it will be handled outside of the string-extrapolation.
```json
String tmpFileX = "myfile";
try {
throw new RuntimeException("Casued by me");
} catch (RuntimeException e) {
LOG.error("Unable to write to temp file {}", tmpFileX, e);
}
```
output:
```log
[ERROR] 2022-02-17 11:59:03.456 [metrics-json-reporter-4-thread-1]
JsonReporter - Unable to write to temp file myfile
java.lang.RuntimeException: Casued by me
at
org.apache.hadoop.hive.metastore.metrics.JsonReporter.report(JsonReporter.java:140)
[classes/:?]
at
com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:162)
[metrics-core-3.1.0.jar:3.1.0]
at
com.codahale.metrics.ScheduledReporter$1.run(ScheduledReporter.java:117)
[metrics-core-3.1.0.jar:3.1.0]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[?:1.8.0_301]
at
java.util.concurrent.FutureTask.runAndReset$$$capture(FutureTask.java:308)
[?:1.8.0_301]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java)
[?:1.8.0_301]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
[?:1.8.0_301]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
[?:1.8.0_301]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[?:1.8.0_301]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[?:1.8.0_301]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_301]
[ERROR] 2022-02-17 11:59:08.048 [metrics-json-reporter-4-thread-1]
JsonReporter - Unable to write to temp file myfile
```
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 728847)
Time Spent: 1h 20m (was: 1h 10m)
> Expose Compaction Observability delta metrics using the JsonReporter
> --------------------------------------------------------------------
>
> Key: HIVE-25959
> URL: https://issues.apache.org/jira/browse/HIVE-25959
> Project: Hive
> Issue Type: Improvement
> Components: Metastore
> Affects Versions: 4.0.0
> Reporter: Viktor Csomor
> Assignee: Viktor Csomor
> Priority: Minor
> Labels: pull-request-available
> Fix For: 4.0.0
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> As part of the HIVE-25897 the Delta metrics collection has been moved from
> HiveServer2 to HMS. Hence the HMS does not have any jmx endpoint exposed by
> default we'd like to expose these metrics through the JsonReporter
--
This message was sent by Atlassian Jira
(v8.20.1#820001)