本文整理汇总了Java中cascading.tuple.Tuple.get方法的典型用法代码示例。如果您正苦于以下问题:Java Tuple.get方法的具体用法?Java Tuple.get怎么用?Java Tuple.get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cascading.tuple.Tuple
的用法示例。
在下文中一共展示了Tuple.get方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: join
import cascading.tuple.Tuple; //导入方法依赖的package包/类
@Override
public void join(Tuple left, Tuple right, Collector<Tuple> output) throws Exception {
if(!this.prepareCalled) {
streamGraph.prepare();
sourceStage.start(null);
processBeginTime = System.currentTimeMillis();
currentProcess.increment(SliceCounters.Process_Begin_Time, processBeginTime);
prepareCalled = true;
}
this.streamGraph.setTupleCollector(output);
joinInput.f0 = left.get(leftSchema, leftKeyFields);
joinedTuples[0] = left;
joinedTuples[1] = right;
try {
sourceStage.run(joinInput);
}
catch(IOException exception ) {
throw exception;
}
catch( Throwable throwable ) {
if( throwable instanceof CascadingException ) {
throw (CascadingException) throwable;
}
throw new FlowException( "internal error during BinaryHashJoinJoiner execution", throwable );
}
}
示例2: map
import cascading.tuple.Tuple; //导入方法依赖的package包/类
@Override
public Tuple2<Tuple, Tuple[]> map(Tuple tuple) throws Exception {
if(keyFields == null) {
out.f0 = empty;
}
else {
out.f0 = tuple.get(schema, keyFields);
}
out.f1[initialPos] = tuple;
return out;
}
示例3: map
import cascading.tuple.Tuple; //导入方法依赖的package包/类
@Override
public Tuple3<Tuple, Integer, Tuple> map(Tuple value) throws Exception {
if(keyPos.length > 0) {
outT.f0 = value.get(keyPos);
}
else {
outT.f0 = defaultKey;
}
outT.f2 = value;
return outT;
}
示例4: join
import cascading.tuple.Tuple; //导入方法依赖的package包/类
@Override
public Tuple2<Tuple, Tuple[]> join(Tuple2<Tuple, Tuple[]> leftT, Tuple rightT) throws Exception {
if(leftT == null) {
outT.f0 = rightT.get(inputFields, keyFields);
outT.f1[tupleListPos] = rightT;
return outT;
}
else {
leftT.f1[tupleListPos] = rightT;
return leftT;
}
}
示例5: join
import cascading.tuple.Tuple; //导入方法依赖的package包/类
@Override
public Tuple2<Tuple, Tuple[]> join(Tuple leftT, Tuple rightT) throws Exception {
if(leftT == null) {
outT.f0 = rightT.get(inputFieldsRight, keyFieldsRight);
}
else {
outT.f0 = leftT.get(inputFieldsLeft, keyFieldsLeft);
}
outT.f1[0] = leftT;
outT.f1[1] = rightT;
return outT;
}