You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/12/24 01:50:41 UTC

[GitHub] [druid] jasonk000 commented on a change in pull request #12097: perf: eliminate double string concat in remote-task-runner shutdown logging

jasonk000 commented on a change in pull request #12097:
URL: https://github.com/apache/druid/pull/12097#discussion_r774835850



##########
File path: indexing-service/src/main/java/org/apache/druid/indexing/overlord/RemoteTaskRunner.java
##########
@@ -553,11 +553,33 @@ public boolean isWorkerRunningTask(ZkWorker worker, String taskId)
    * Finds the worker running the task and forwards the shutdown signal to the worker.
    *
    * @param taskId - task id to shutdown
+   * @param reasonFormat - a StringUtils reason string for shutdown
+   * @param reasonArgs - args will be used during constructio of reason log line
+   */
+  @Override
+  public void shutdown(final String taskId, String reasonFormat, Object... reasonArgs)
+  {
+    if (log.isInfoEnabled()) {

Review comment:
       Checking explicitly avoids the extra `+` string concatenation in the case that info() is not enabled. This is minor, but while we are here...




-- 
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: commits-unsubscribe@druid.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org