Java Code Examples for org.apache.hadoop.io.LongWritable#Comparator

The following examples show how to use org.apache.hadoop.io.LongWritable#Comparator . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: tez   File: TestValuesIterator.java    License: Apache License 2.0 6 votes vote down vote up
private RawComparator getComparator(TestWithComparator comparator) {
  switch (comparator) {
  case LONG:
    return new LongWritable.Comparator();
  case INT:
    return new IntWritable.Comparator();
  case BYTES:
    return new BytesWritable.Comparator();
  case TEZ_BYTES:
    return new TezBytesComparator();
  case TEXT:
    return new Text.Comparator();
  case CUSTOM:
    return new CustomKey.Comparator();
  default:
    return null;
  }
}
 
Example 2
Source Project: spork   File: PigLongRawComparator.java    License: Apache License 2.0 4 votes vote down vote up
public PigLongRawComparator() {
    super(NullableLongWritable.class);
    mWrappedComp = new LongWritable.Comparator();
}