本文整理汇总了Java中cascading.operation.FunctionCall类的典型用法代码示例。如果您正苦于以下问题:Java FunctionCall类的具体用法?Java FunctionCall怎么用?Java FunctionCall使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FunctionCall类属于cascading.operation包,在下文中一共展示了FunctionCall类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: operate
import cascading.operation.FunctionCall; //导入依赖的package包/类
@Override
public void operate(@SuppressWarnings("rawtypes") FlowProcess flowProcess, FunctionCall<Tuple> functionCall) {
TupleEntry tupleEntry = functionCall.getArguments();
Tuple outputTuple = functionCall.getContext();
boolean allGroupFieldsValuesAreNull = true;
for(Fields fields : groupFieldsPerPipe) {
if(! groupFieldsValuesAreNull(tupleEntry, fields)) {
for(int i=0; i<fields.size(); i++) {
outputTuple.set(i, tupleEntry.getObject(fields.get(i)));
}
allGroupFieldsValuesAreNull = false;
break;
}
}
if(allGroupFieldsValuesAreNull) {
outputTuple = Tuple.size(numOfGroupFields);
}
functionCall.getOutputCollector().add(outputTuple);
}
开发者ID:vbehar,项目名称:cascading-flapi,代码行数:20,代码来源:CoGroupBuilderHelper.java
示例2: operate
import cascading.operation.FunctionCall; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
public void operate(FlowProcess process, FunctionCall call) {
Data data = ((Data) call.getArguments().getObject(0)).deepCopy();
DataUnit du = data.get_dataunit();
if (du.getSetField() == DataUnit._Fields.PAGEVIEW) {
String url = du.get_pageview().get_page().get_url();
int time = data.get_pedigree().get_true_as_of_secs();
call.getOutputCollector().add(new Tuple(url, time));
}
}
开发者ID:zirpins,项目名称:bdelab,代码行数:11,代码来源:SimpleBatchWorkflow.java
示例3: operate
import cascading.operation.FunctionCall; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
public void operate(FlowProcess flowProcess, FunctionCall fnCall) {
String sentence = fnCall.getArguments().getString(0);
for (String word : sentence.split(" ")) {
fnCall.getOutputCollector().add(new Tuple(word));
}
}
开发者ID:zirpins,项目名称:bdelab,代码行数:8,代码来源:Split.java
示例4: operate
import cascading.operation.FunctionCall; //导入依赖的package包/类
@Override
public void operate(FlowProcess flowProcess, FunctionCall functionCall) {
TupleEntry arguments = functionCall.getArguments();
Tuple result = new Tuple();
Name name = new Name();
name.setFirst_name(arguments.getString(0));
name.setLast_name(arguments.getString(1));
result.add(name);
functionCall.getOutputCollector().add(result);
}
开发者ID:apache,项目名称:parquet-mr,代码行数:13,代码来源:TestParquetTBaseScheme.java
示例5: operate
import cascading.operation.FunctionCall; //导入依赖的package包/类
@Override
public void operate(FlowProcess flowProcess, FunctionCall functionCall) {
Object record = functionCall.getArguments().getObject(0);
Tuple result = new Tuple();
result.add(record.toString());
functionCall.getOutputCollector().add(result);
}
开发者ID:apache,项目名称:parquet-mr,代码行数:8,代码来源:ParquetScroogeSchemeTest.java
示例6: operate
import cascading.operation.FunctionCall; //导入依赖的package包/类
@Override
public void operate(FlowProcess flowProcess, FunctionCall functionCall) {
TupleEntry arguments = functionCall.getArguments();
Tuple result = new Tuple();
Tuple name = new Tuple();
name.addString(arguments.getString(0));
name.addString(arguments.getString(1));
result.add(name);
functionCall.getOutputCollector().add(result);
}
开发者ID:apache,项目名称:parquet-mr,代码行数:13,代码来源:TestParquetTupleScheme.java
示例7: operate
import cascading.operation.FunctionCall; //导入依赖的package包/类
public void operate( FlowProcess flowProcess, FunctionCall functionCall )
{
TupleEntry argument = functionCall.getArguments();
String token = scrubText( argument.getString( "token" ) );
if( token.length() > 0 )
{
Tuple result = new Tuple();
result.add( token );
functionCall.getOutputCollector().add( result );
}
}
开发者ID:cartershanklin,项目名称:orcfile-demos,代码行数:13,代码来源:ScrubFunction.java
示例8: operate
import cascading.operation.FunctionCall; //导入依赖的package包/类
public void operate( FlowProcess flowProcess, FunctionCall functionCall )
{
TupleEntry argument = functionCall.getArguments();
String doc_id = argument.getString( 0 );
String token = scrubText( argument.getString( 1 ) );
if( token.length() > 0 )
{
Tuple result = new Tuple();
result.add( doc_id );
result.add( token );
functionCall.getOutputCollector().add( result );
}
}
开发者ID:xuzhikethinker,项目名称:t4f-data,代码行数:15,代码来源:ScrubFunction.java
示例9: operate
import cascading.operation.FunctionCall; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
public void operate(FlowProcess process, FunctionCall call) {
System.out.println("DEBUG: " + call.getArguments().toString());
call.getOutputCollector().add(new Tuple(1));
}
开发者ID:zirpins,项目名称:bdelab,代码行数:6,代码来源:QueryBase.java
示例10: operate
import cascading.operation.FunctionCall; //导入依赖的package包/类
@Override
public void operate(FlowProcess flowProcess, FunctionCall<Object> functionCall){
Evaluator evaluator = getEvaluator();
TupleEntry input = functionCall.getArguments();
Map<FieldName, FieldValue> arguments = decodeArguments(evaluator, input);
Map<FieldName, ?> result = evaluator.evaluate(arguments);
TupleEntry output = encodeResult(evaluator, getFieldDeclaration(), result);
TupleEntryCollector outputCollector = functionCall.getOutputCollector();
outputCollector.add(output);
}
开发者ID:jpmml,项目名称:jpmml-cascading,代码行数:17,代码来源:PMMLFunction.java
注:本文中的cascading.operation.FunctionCall类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论