Package org.apache.crunch.GroupingOptions

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


      if (tf == WritableTypeFamily.getInstance()) {
        builder.sortComparatorClass(ReverseWritableComparator.class);
      } else if (tf == AvroTypeFamily.getInstance()) {
        AvroType<K> avroType = (AvroType<K>) ptype;
        Schema schema = avroType.getSchema();
        builder.conf("crunch.schema", schema.toString());
        builder.sortComparatorClass(ReverseAvroComparator.class);
      } else {
        throw new RuntimeException("Unrecognized type family: " + tf);
      }
    } else if (tf == AvroTypeFamily.getInstance()) {
View Full Code Here


        builder.sortComparatorClass(ReverseAvroComparator.class);
      } else {
        throw new RuntimeException("Unrecognized type family: " + tf);
      }
    } else if (tf == AvroTypeFamily.getInstance()) {
      builder.conf("crunch.schema", ((AvroType<K>) ptype).getSchema().toString());
    }
    configureReducers(builder, ptable, conf, numReducers);
    return builder.build();
  }
View Full Code Here

        builder.sortComparatorClass(TupleWritableComparator.class);
      }
    } else if (tf == AvroTypeFamily.getInstance()) {
      AvroType<K> avroType = (AvroType<K>) keyType;
      Schema schema = avroType.getSchema();
      builder.conf("crunch.schema", schema.toString());
      if (columnOrders.length == 1 && columnOrders[0].order == Order.DESCENDING) {
        builder.sortComparatorClass(ReverseAvroComparator.class);
      }
    } else {
      throw new RuntimeException("Unrecognized type family: " + tf);
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.