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

    https://github.com/apache/twill/pull/14#discussion_r86287011
  
    --- Diff: 
twill-yarn/src/main/java/org/apache/twill/internal/appmaster/RunningContainers.java
 ---
    @@ -575,18 +601,74 @@ private boolean removeContainerInfo(String 
containerId) {
         return false;
       }
     
    +  private Map<String, Map<String, LogEntry.Level>> 
copyLogLevels(Map<String, Map<String, LogEntry.Level>> originalMap) {
    +    Map<String, Map<String, LogEntry.Level>> result = new TreeMap<>();
    +    for (Map.Entry<String, Map<String, LogEntry.Level>> entry : 
originalMap.entrySet()) {
    +      Map<String, LogEntry.Level> value = new TreeMap<>();
    +      for (Map.Entry<String, LogEntry.Level> valueEntry : 
entry.getValue().entrySet()) {
    +        value.put(valueEntry.getKey(), valueEntry.getValue());
    +      }
    +      result.put(entry.getKey(), value);
    +    }
    +    return result;
    +  }
    +
    +  private void checkAndSetLogLevels(Message message, String runnableName) {
    +    if (message.getType() != Message.Type.SYSTEM
    +      || 
!SystemMessages.LOG_LEVEL.equals(message.getCommand().getCommand())) {
    +      return;
    +    }
    +
    +    Map<String, LogEntry.Level> runnableLogLevels = 
convertLogLevelValuesToLogEntry(message.getCommand().getOptions());
    +    if (!logLevels.containsKey(runnableName)) {
    +      logLevels.put(runnableName, runnableLogLevels);
    +    } else {
    +      logLevels.get(runnableName).putAll(runnableLogLevels);
    +    }
    +  }
    +
    +  private Location saveLogLevels() {
    --- End diff --
    
    Can you explain why the log levels have to be saved to a file? It is not 
clear to me. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to