[ https://issues.apache.org/jira/browse/TWILL-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15631641#comment-15631641 ]
ASF GitHub Bot commented on TWILL-138: -------------------------------------- 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. > 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)