[ 
https://issues.apache.org/jira/browse/TWILL-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15664791#comment-15664791
 ] 

ASF GitHub Bot commented on TWILL-138:
--------------------------------------

Github user chtyim commented on a diff in the pull request:

    https://github.com/apache/twill/pull/14#discussion_r87875415
  
    --- Diff: 
twill-yarn/src/main/java/org/apache/twill/internal/container/TwillContainerService.java
 ---
    @@ -56,24 +66,27 @@
     
       public TwillContainerService(BasicTwillContext context, ContainerInfo 
containerInfo, ZKClient zkClient,
                                    RunId runId, TwillRunnableSpecification 
specification, ClassLoader classLoader,
    -                               Location applicationLocation) {
    +                               Location applicationLocation, Map<String, 
LogEntry.Level> logLevels) {
         super(zkClient, runId, applicationLocation);
     
         this.specification = specification;
         this.classLoader = classLoader;
    -    this.containerLiveNodeData = createLiveNodeData(containerInfo);
    +    this.containerLiveNodeData = createLiveNodeData(containerInfo,
    +                                                    isLoggerContext()
    +                                                      ? logLevels : 
Collections.<String, LogEntry.Level>emptyMap());
         this.context = context;
       }
     
    -  private ContainerLiveNodeData createLiveNodeData(ContainerInfo 
containerInfo) {
    +  private ContainerLiveNodeData createLiveNodeData(ContainerInfo 
containerInfo,
    +                                                   Map<String, 
LogEntry.Level> logLevels) {
         // if debugging is enabled, log the port and register it in service 
discovery.
         String debugPort = System.getProperty("twill.debug.port");
         if (debugPort != null) {
           LOG.info("JVM is listening for debugger on port {}", debugPort);
         }
         return new ContainerLiveNodeData(containerInfo.getId(),
                                          
containerInfo.getHost().getCanonicalHostName(),
    -                                     debugPort);
    +                                     debugPort, logLevels);
    --- End diff --
    
    I think we should filter out the one that has `null` value, since those are 
representing reset.


> Runtime change of Application runnable log level
> ------------------------------------------------
>
>                 Key: TWILL-138
>                 URL: https://issues.apache.org/jira/browse/TWILL-138
>             Project: Apache Twill
>          Issue Type: New Feature
>          Components: core
>            Reporter: Henry Saputra
>
> With TWILL-24 is supported for setting log level when starting the Twill 
> application, next enhancement is to able to send command to update the 
> aggregate log level for a particular runnable in a Twill application.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to