当前位置: 首页>>代码示例>>Java>>正文


Java Tuple.get方法代码示例

本文整理汇总了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 );
	}
}
 
开发者ID:dataArtisans,项目名称:cascading-flink,代码行数:35,代码来源:BinaryHashJoinJoiner.java

示例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;
}
 
开发者ID:dataArtisans,项目名称:cascading-flink,代码行数:12,代码来源:JoinPrepareMapper.java

示例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;
}
 
开发者ID:dataArtisans,项目名称:cascading-flink,代码行数:13,代码来源:BufferJoinKeyExtractor.java

示例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;
	}
}
 
开发者ID:dataArtisans,项目名称:cascading-flink,代码行数:15,代码来源:TupleAppendOuterJoiner.java

示例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;
}
 
开发者ID:dataArtisans,项目名称:cascading-flink,代码行数:16,代码来源:TupleOuterJoiner.java


注:本文中的cascading.tuple.Tuple.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。