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/14 15:42:50 UTC

[GitHub] [druid] FrankChen021 opened a new pull request #12067: Enforce console logging for peon process

FrankChen021 opened a new pull request #12067:
URL: https://github.com/apache/druid/pull/12067


   
   
   ### Description
   
   Fixes the problem mentioned in #10147 by @clintropolis that peon process's log is output to middle manager's log file.
   
   Currently all Druid processes share the same log4j2 configuration file located in `_common` directory. Since peon processes are spawned by middle manager process, they derivate the environment variables from the middle manager. These variables include those in the `log4j2.xml` controlling to which file the logger writes the log.
   
   But current task logging mechanism requires the peon processes to output the log to console so that the middle manager can redirect the console output to a file and upload this file to task log storage.
   
   So, this PR imposes this requirement to peon processes, **whatever the configuration is in the shared log4j2.xml, peon processes always write the log to console**.
   
   <hr>
   
   ##### Key changed/added classes in this PR
    * added `ConsoleLoggingEnforcementConfigurationFactory.java`, to enfore `ConsoleAppender` is used
    * updated `ForkingTaskRunner.java`, to pass a `-Dlog4j2.configurationFactory` argument to peon
   
   <hr>
   
   This PR has:
   - [X] been self-reviewed.
      - [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [X] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
   - [ ] added integration tests.
   - [X] been tested in a test Druid cluster.
   


-- 
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


[GitHub] [druid] FrankChen021 commented on pull request #12067: Enforce console logging for peon process

Posted by GitBox <gi...@apache.org>.
FrankChen021 commented on pull request #12067:
URL: https://github.com/apache/druid/pull/12067#issuecomment-1058748706


   Hi @jihoonson @clintropolis  this PR should be merged before we start a new release. Please take a look at it at you convenience. Thank you.


-- 
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


[GitHub] [druid] FrankChen021 commented on pull request #12067: Enforce console logging for peon process

Posted by GitBox <gi...@apache.org>.
FrankChen021 commented on pull request #12067:
URL: https://github.com/apache/druid/pull/12067#issuecomment-993673083


   Marked as WIP to add some UT tests later, but the implementation seems like no big change.


-- 
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