本文整理汇总了Java中cascading.operation.FunctionCall.getArguments方法的典型用法代码示例。如果您正苦于以下问题:Java FunctionCall.getArguments方法的具体用法?Java FunctionCall.getArguments怎么用?Java FunctionCall.getArguments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cascading.operation.FunctionCall
的用法示例。
在下文中一共展示了FunctionCall.getArguments方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例2: 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);
}
示例3: operate
import cascading.operation.FunctionCall; //导入方法依赖的package包/类
@Override
public void operate(FlowProcess flowProcess, FunctionCall functionCall) {
TupleEntry arguments = functionCall.getArguments();
Tuple result = new Tuple();
Name name = Name$.MODULE$.apply(arguments.getString(0), Option.apply(arguments.getString(1)));
result.add(name);
functionCall.getOutputCollector().add(result);
}
示例4: 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);
}
示例5: 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 );
}
}
示例6: 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 );
}
}
示例7: 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);
}