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

    https://github.com/apache/storm/pull/2113#discussion_r120445145
  
    --- Diff: 
storm-server/src/main/java/org/apache/storm/container/ResourceIsolationInterface.java
 ---
    @@ -24,53 +24,76 @@
     import java.util.Set;
     
     /**
    - * A plugin to support resource isolation and limitation within Storm
    + * A plugin to support resource isolation and limitation within Storm.
      */
     public interface ResourceIsolationInterface {
    -    
    +
         /**
          * Called when starting up
    +     *
          * @param conf the cluster config
          * @throws IOException on any error.
          */
         void prepare(Map<String, Object> conf) throws IOException;
     
         /**
    -     * This function should be used prior to starting the worker to 
reserve resources for the worker
    +     * This function should be used prior to starting the worker to 
reserve resources for the worker.
    +     *
          * @param workerId worker id of the worker to start
    -     * @param resources set of resources to limit
    +     * @param workerMemory the amount of memory for the worker or null if 
not enforced
    +     * @param workerCpu the amount of cpu for the worker or null if not 
enforced
          */
    -    void reserveResourcesForWorker(String workerId, Map<String, Number> 
resources);
    +    void reserveResourcesForWorker(String workerId, Integer workerMemory, 
Integer workerCpu);
     
         /**
    -     * This function will be called when the worker needs to shutdown.  
This function should include logic to clean up after a worker is shutdown
    +     * This function will be called when the worker needs to shutdown. 
This function should include logic to clean up
    +     * after a worker is shutdown.
    +     *
          * @param workerId worker id to shutdown and clean up after
          */
         void releaseResourcesForWorker(String workerId);
     
         /**
          * After reserving resources for the worker (i.e. calling 
reserveResourcesForWorker). This function can be used
          * to get the modified command line to launch the worker with resource 
isolation
    -     * @param existingCommand
    +     *
    +     * @param existingCommand the current command to run that may need to 
be modified.
          * @return new commandline with necessary additions to launch worker 
with resource isolation
          */
         List<String> getLaunchCommand(String workerId, List<String> 
existingCommand);
     
         /**
          * After reserving resources for the worker (i.e. calling 
reserveResourcesForWorker). this function can be used
          * to get the launch command prefix
    +     *
          * @param workerId the of the worker
          * @return the command line prefix for launching a worker with 
resource isolation
          */
         List<String> getLaunchCommandPrefix(String workerId);
     
         /**
    -     * Get the list of PIDs currently in an isolated container
    +     * Get the list of PIDs currently in an isolated container.
    +     *
          * @param workerId the id of the worker to get these for
    -     * @return the set of PIDs, this will be combined with
    -     * other ways of getting PIDs. An Empty set if
    -     * no PIDs are found.
    +     * @return the set of PIDs, this will be combined with other ways of 
getting PIDs. An Empty set if no PIDs are
    +     *     found.
          * @throws IOException on any error
          */
    -    Set<Long> getRunningPIDs(String workerId) throws IOException;
    +    Set<Long> getRunningPids(String workerId) throws IOException;
    +
    +    /**
    +     * Get the current memory usage of the a give worker.
    --- End diff --
    
    the a give worker -> the given worker


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