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


Java FunctionCall.getArguments方法代码示例

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

示例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);
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:13,代码来源:TestParquetTBaseScheme.java

示例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);
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:11,代码来源:ParquetScroogeSchemeTest.java

示例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);
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:13,代码来源:TestParquetTupleScheme.java

示例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 );
  }
}
 
开发者ID:cartershanklin,项目名称:orcfile-demos,代码行数:13,代码来源:ScrubFunction.java

示例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 );
  }
}
 
开发者ID:xuzhikethinker,项目名称:t4f-data,代码行数:15,代码来源:ScrubFunction.java

示例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);
}
 
开发者ID:jpmml,项目名称:jpmml-cascading,代码行数:17,代码来源:PMMLFunction.java


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