[
https://issues.apache.org/jira/browse/STORM-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15147188#comment-15147188
]
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_r52883154
--- 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 --
what if the node size is just 1.
> 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)