Package org.apache.crunch.GroupingOptions

Examples of org.apache.crunch.GroupingOptions.Builder.build()


      }
    } else if (tf == AvroTypeFamily.getInstance()) {
      builder.conf("crunch.schema", ((AvroType<K>) ptype).getSchema().toString());
    }
    configureReducers(builder, ptable, conf, numReducers);
    return builder.build();
  }

  private static <K, V> GroupingOptions buildGroupingOptions(PTable<K, V> ptable, Configuration conf,
      int numReducers, ColumnOrder[] columnOrders) {
    PTypeFamily tf = ptable.getTypeFamily();
View Full Code Here


      }
    } else {
      throw new RuntimeException("Unrecognized type family: " + tf);
    }
    configureReducers(builder, ptable, conf, numReducers);
    return builder.build();
  }

  private static <K, V> void configureReducers(GroupingOptions.Builder builder,
      PTable<K, V> ptable, Configuration conf, int numReducers) {
    if (numReducers <= 0) {
View Full Code Here

      }
    }
    // TODO:CRUNCH-23: Intermediate Fix for release 1. More elaborate fix is
    // required check JIRA for details.
    builder.numReducers(1);
    return builder.build();
  }

  private static <T> GroupingOptions buildGroupingOptions(Configuration conf, PTypeFamily tf, PType<T> ptype,
      ColumnOrder[] columnOrders) {
    Builder builder = GroupingOptions.builder();
View Full Code Here

      throw new RuntimeException("Unrecognized type family: " + tf);
    }
    // TODO:CRUNCH-23: Intermediate Fix for release 1. More elaborate fix is
    // required check JIRA for details.
    builder.numReducers(1);
    return builder.build();
  }

  static class ReverseWritableComparator<T> extends Configured implements RawComparator<T> {

    RawComparator<T> comparator;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.