You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "zwangsheng (via GitHub)" <gi...@apache.org> on 2023/03/20 02:06:02 UTC

[GitHub] [kyuubi] zwangsheng opened a new pull request, #4563: [Improvement] Format error log output in case of metrics json file not found

zwangsheng opened a new pull request, #4563:
URL: https://github.com/apache/kyuubi/pull/4563

   <!--
   Thanks for sending a pull request!
   
   Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/CONTRIBUTING.html
     2. If the PR is related to an issue in https://github.com/apache/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
   -->
   
   ### _Why are the changes needed?_
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you add a feature, you can talk about the use case of it.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   Before
   ```log
   2023-03-20 10:02:04.718 ERROR org.apache.kyuubi.metrics.JsonReporterService: Error writing metrics to json file/pathi/metrics/report.json
   ```
   
   After
   ```log
   2023-03-20 10:02:04.718 ERROR org.apache.kyuubi.metrics.JsonReporterService: Error writing metrics to json file: /path/metrics/report.json
   ```
   
   ### _How was this patch tested?_
   - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
   
   - [ ] Add screenshots for manual tests if appropriate
   
   - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request
   


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] bowenliang123 closed pull request #4563: [Improvement] Format error log output in case of metrics json file not found

Posted by "bowenliang123 (via GitHub)" <gi...@apache.org>.
bowenliang123 closed pull request #4563: [Improvement] Format error log output in case of metrics json file not found
URL: https://github.com/apache/kyuubi/pull/4563


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] bowenliang123 commented on pull request #4563: [Improvement] Format error log output in case of metrics json file not found

Posted by "bowenliang123 (via GitHub)" <gi...@apache.org>.
bowenliang123 commented on PR #4563:
URL: https://github.com/apache/kyuubi/pull/4563#issuecomment-1480906624

   Thanks, merged to master/1.7.1 .


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] bowenliang123 commented on a diff in pull request #4563: [Improvement] Format error log output in case of metrics json file not found

Posted by "bowenliang123 (via GitHub)" <gi...@apache.org>.
bowenliang123 commented on code in PR #4563:
URL: https://github.com/apache/kyuubi/pull/4563#discussion_r1142077614


##########
kyuubi-metrics/src/main/scala/org/apache/kyuubi/metrics/JsonReporterService.scala:
##########
@@ -65,7 +65,7 @@ class JsonReporterService(registry: MetricRegistry)
             Files.setPosixFilePermissions(tmpPath, PosixFilePermissions.fromString("rwxr--r--"))
             Files.move(tmpPath, reportPath, StandardCopyOption.REPLACE_EXISTING)
           } catch {
-            case NonFatal(e) => error("Error writing metrics to json file" + reportPath, e)
+            case NonFatal(e) => error("Error writing metrics to json file: " + reportPath, e)

Review Comment:
   ```suggestion
               case NonFatal(e) => error(s"Error writing metrics to json file: $reportPath", e)
   ```
   Clearer with string interpolation instead of concatenation.



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org