Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' into 0.9.0

  • Loading branch information...
commit 671dc9537088914c4e8b61a8000badadeac527ad 2 parents 9148cd5 + fd201eb
@nathanmarz nathanmarz authored
View
1  src/jvm/storm/trident/operation/impl/GroupedAggregator.java
@@ -56,6 +56,7 @@ public void aggregate(Object[] arr, TridentTuple tuple, TridentCollector collect
} else {
curr = val.get(group);
}
+ groupColl.currGroup = group;
_agg.aggregate(curr, input, groupColl);
}
View
15 src/jvm/storm/trident/tuple/ComboList.java
@@ -3,15 +3,16 @@
import java.io.Serializable;
import java.util.AbstractList;
import java.util.List;
+import org.apache.commons.lang.builder.ToStringBuilder;
public class ComboList extends AbstractList<Object> {
public static class Factory implements Serializable {
Pointer[] index;
- int numLists;
+ int[] sizes;
public Factory(int... sizes) {
- numLists = sizes.length;
+ this.sizes = sizes;
int total = 0;
for(int size: sizes) {
total+=size;
@@ -29,8 +30,14 @@ public Factory(int... sizes) {
}
public ComboList create(List[] delegates) {
- if(delegates.length!=numLists) {
- throw new RuntimeException("Expected " + numLists + " lists, but instead got " + delegates.length + " lists");
+ if(delegates.length!=sizes.length) {
+ throw new RuntimeException("Expected " + sizes.length + " lists, but instead got " + delegates.length + " lists");
+ }
+ for(int i=0; i<delegates.length; i++) {
+ List l = delegates[i];
+ if(l==null || l.size() != sizes[i]) {
+ throw new RuntimeException("Got unexpected delegates to ComboList: " + ToStringBuilder.reflectionToString(delegates));
+ }
}
return new ComboList(delegates, index);
}
Please sign in to comment.
Something went wrong with that request. Please try again.