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

ASF GitHub Bot commented on STORM-1232:
---------------------------------------

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

    https://github.com/apache/storm/pull/1108#discussion_r52884345
  
    --- Diff: storm-core/src/jvm/org/apache/storm/utils/Utils.java ---
    @@ -2248,4 +2248,23 @@ public Object call() {
             }
             return process;
         }
    +
    +    public static <T> List<T> interleaveAll(List<List<T>> nodeList) {
    +        if (nodeList != null && nodeList.size() > 0) {
    +            List<T> first = new ArrayList<T>();
    +            List<List<T>> rest = new ArrayList<List<T>>();
    +            for (List<T> node : nodeList) {
    +                if (null != node && node.size() > 0) {
    +                  first.add(node.get(0));
    +                  rest.add(node.subList(1, node.size()));
    --- End diff --
    
    checked that an empty list is returned. So it should be okay as in next 
recursion step, we ignore empty list. 


> port  backtype.storm.scheduler.DefaultScheduler to java
> -------------------------------------------------------
>
>                 Key: STORM-1232
>                 URL: https://issues.apache.org/jira/browse/STORM-1232
>             Project: Apache Storm
>          Issue Type: New Feature
>          Components: storm-core
>            Reporter: Robert Joseph Evans
>            Assignee: Xin Wang
>              Labels: java-migration, jstorm-merger
>
> port the DefaultScheduler to java



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

Reply via email to