List of usage examples for org.apache.hadoop.io RawComparator interface-usage
From source file org.apache.gora.mapreduce.StringComparator.java
public class StringComparator implements RawComparator<String> { @Override public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) { return Text.Comparator.compareBytes(b1, s1, l1, b2, s2, l2); }
From source file org.apache.mahout.hadoop.io.serializer.avro.AvroComparator.java
/**
* <p>
* A {@link RawComparator} that uses Avro to extract data from the
* source stream and compare their contents without explicit
* deserialization.
*/
From source file org.apache.pig.data.TupleRawComparator.java
/**
* This interface is intended to compare Tuples. The semantics of Tuple comparison must take into account null values in
* different ways. According to SQL semantics nulls are not equal. But for other Pig/Latin statements nulls must be
* grouped together. This interface allows to check if there are null fields in the tuples compared using this
* comparator. This method is meaningful only when the tuples are determined to be equal by the
* {@link #compare(byte[],int,int,byte[],int,int)} method.
From source file org.apache.sysml.runtime.matrix.data.MatrixIndexes.java
/** * This represent the indexes to the blocks of the matrix. * Please note that these indexes are 1-based, whereas the data in the block are zero-based (as they are double arrays). */ public class MatrixIndexes implements WritableComparable<MatrixIndexes>, RawComparator<MatrixIndexes>, Externalizable {
From source file org.apache.tez.runtime.library.common.comparator.ProxyComparator.java
@Unstable @Private public interface ProxyComparator<KEY> extends RawComparator { /** * This comparator interface provides a fast-path for comparisons between keys. *
From source file org.apache.tinkerpop.gremlin.hadoop.structure.io.ObjectWritableComparator.java
/** * @author Marko A. Rodriguez (http://markorodriguez.com) */ public abstract class ObjectWritableComparator implements RawComparator<ObjectWritable>, HadoopPoolsConfigurable { public static final Logger LOGGER = LoggerFactory.getLogger(ObjectWritableComparator.class);
From source file org.bgi.flexlab.gaea.data.mapreduce.partitioner.WindowsBasedBasicSort.java
public class WindowsBasedBasicSort implements RawComparator<WindowsBasedBasicWritable> { @Override public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) { WindowsBasedBasicWritable key1 = new WindowsBasedBasicWritable(); WindowsBasedBasicWritable key2 = new WindowsBasedBasicWritable();
From source file org.bgi.flexlab.gaea.data.mapreduce.partitioner.WindowsBasedComparator.java
public class WindowsBasedComparator implements RawComparator<WindowsBasedWritable> { @Override public int compare(WindowsBasedWritable o1, WindowsBasedWritable o2) { if (o1.getWindows() == o2.getWindows()) return 0;
From source file org.bgi.flexlab.gaea.data.mapreduce.partitioner.WindowsBasedSort.java
public class WindowsBasedSort implements RawComparator<WindowsBasedWritable> { @Override public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) { WindowsBasedWritable key1 = new WindowsBasedWritable(); WindowsBasedWritable key2 = new WindowsBasedWritable(); DataInputBuffer buffer = new DataInputBuffer();
From source file org.commoncrawl.util.shared.FlexBuffer.java
/**
* A tweaking of the hadoop Buffer class, basically allowing for cheap buffer
* copies (via underlying storage sharing), some copy on write support, and most
* importantly, support of offset based backing buffers
*
* A byte sequence that is used as a Java native type for buffer. It is