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.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---