Package cascading.operation

Examples of cascading.operation.FunctionCall


  private static Tuple exec(Function f, final Tuple input) {
    final AtomicReference<Tuple> output = new AtomicReference<Tuple>();
    f.prepare(new HadoopFlowProcess(), null);

    f.operate(new HadoopFlowProcess(), new FunctionCall() {
      @Override public TupleEntry getArguments() {
        return new TupleEntry(new Fields("blah"), input);
      }

      @Override public Fields getDeclaredFields() {
View Full Code Here


  }

  public void testWrongArgumentClass() throws Exception {
    AbstractExpandProto func = new ExpandProto(Example.Person.class, "name");
    try {
      func.operate(new HadoopFlowProcess(), new FunctionCall() {
        @Override public TupleEntry getArguments() {
          return new TupleEntry(new Fields("partnership"), new Tuple(Example.Partnership.newBuilder().setFollower(
              Example.Person.newBuilder().setName("bryan")).setLeader(Example.Person.newBuilder().setName("alsoBryan")).build()));
        }
View Full Code Here

    assertEquals(Collections.singleton(Example.Person.class), func.getEmittedClasses());
  }

  protected static List<Tuple> operateFunction(Function func, final TupleEntry argument) {
    final List<Tuple> results = new ArrayList<Tuple>();
    func.operate(null, new FunctionCall() {
      @Override public TupleEntry getArguments() {
        return argument;
      }

      @Override public Fields getDeclaredFields() {
View Full Code Here

TOP

Related Classes of cascading.operation.FunctionCall

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.