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

    https://github.com/apache/twill/pull/14#discussion_r83519594
  
    --- Diff: 
twill-core/src/main/java/org/apache/twill/internal/DefaultResourceReport.java 
---
    @@ -39,25 +44,33 @@
       private final TwillRunResources appMasterResources;
       private final String applicationId;
       private final AtomicReference<List<String>> services;
    +  private final Map<String, Map<String, LogEntry.Level>> logLevels;
     
       public DefaultResourceReport(String applicationId, TwillRunResources 
masterResources) {
    -    this(applicationId, masterResources, ImmutableMap.<String, 
Collection<TwillRunResources>>of());
    -  }
    -
    -  public DefaultResourceReport(String applicationId, TwillRunResources 
masterResources,
    -                               Map<String, Collection<TwillRunResources>> 
resources) {
    -    this(applicationId, masterResources, resources, 
ImmutableList.<String>of());
    +    this(applicationId, masterResources, Collections.<String, 
Collection<TwillRunResources>>emptyMap(),
    +         Collections.<String>emptyList());
       }
     
       public DefaultResourceReport(String applicationId, TwillRunResources 
masterResources,
                                    Map<String, Collection<TwillRunResources>> 
resources, List<String> services) {
         this.applicationId = applicationId;
         this.appMasterResources = masterResources;
    -    this.usedResources = HashMultimap.create();
    +    this.usedResources = 
Multimaps.synchronizedSetMultimap(HashMultimap.<String, 
TwillRunResources>create());
         for (Map.Entry<String, Collection<TwillRunResources>> entry : 
resources.entrySet()) {
           this.usedResources.putAll(entry.getKey(), entry.getValue());
         }
         this.services = new AtomicReference<>(services);
    +    this.logLevels = new ConcurrentHashMap<>();
    +  }
    +
    +  public synchronized void setRunnableLogLevels(String runnableName, 
Map<String, LogEntry.Level> runnableLogLevels) {
    --- End diff --
    
    better name it as `updateRunnableLogLevels`.


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