本文整理汇总了Java中storm.trident.JoinType类的典型用法代码示例。如果您正苦于以下问题:Java JoinType类的具体用法?Java JoinType怎么用?Java JoinType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JoinType类属于storm.trident包,在下文中一共展示了JoinType类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: complete
import storm.trident.JoinType; //导入依赖的package包/类
@Override
public void complete(JoinState state, TridentTuple group, TridentCollector collector) {
List<List>[] sides = state.sides;
boolean wasEmpty = state.numSidesReceived < sides.length;
for(int i=0; i<sides.length; i++) {
if(sides[i].isEmpty() && _types.get(i) == JoinType.OUTER) {
state.numSidesReceived++;
sides[i].add(makeNullList(_sideFields.get(i).size()));
}
}
if(wasEmpty && state.numSidesReceived == sides.length) {
emitCrossJoin(state, collector, -1, null);
}
}
示例2: complete
import storm.trident.JoinType; //导入依赖的package包/类
@Override
public void complete(JoinState state, TridentTuple group, TridentCollector collector) {
List<List>[] sides = state.sides;
boolean wasEmpty = state.numSidesReceived < sides.length;
for (int i = 0; i < sides.length; i++) {
if (sides[i].isEmpty() && _types.get(i) == JoinType.OUTER) {
state.numSidesReceived++;
sides[i].add(makeNullList(_sideFields.get(i).size()));
}
}
if (wasEmpty && state.numSidesReceived == sides.length) {
emitCrossJoin(state, collector, -1, null);
}
}
示例3: JoinerMultiReducer
import storm.trident.JoinType; //导入依赖的package包/类
public JoinerMultiReducer(List<JoinType> types, int numGroupFields, List<Fields> sides) {
_types = types;
_sideFields = sides;
_numGroupFields = numGroupFields;
}