Package org.apache.hadoop.mapred.lib

Examples of org.apache.hadoop.mapred.lib.KeyFieldBasedComparator.configure()


 
  private void check(String options, Text l1, Text l2, int c) throws IOException {
    JobConf conf = new JobConf();
    conf.setKeyFieldComparatorOptions(options);
    KeyFieldBasedComparator comp = new KeyFieldBasedComparator();
    comp.configure(conf);
   
    DataOutputBuffer out1 = serialize(l1);
    DataOutputBuffer out2 = serialize(l2);
    assertThat(options, comp.compare(out1.getData(), 0, out1.getLength(), out2.getData(), 0, out2.getLength()), is(c));
  }
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.