org.apache.pig
Class FileSplitComparable
java.lang.Object
org.apache.pig.FileSplitComparable
- All Implemented Interfaces:
- Serializable, Comparable<FileSplitComparable>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<FileSplitComparable>
@InterfaceAudience.Public
@InterfaceStability.Evolving
public class FileSplitComparable
- extends Object
- implements org.apache.hadoop.io.WritableComparable<FileSplitComparable>, Serializable
This class represents a relative position in a file. It records a filename
and an offset. This allows Pig to order FileSplits.
- Since:
- Pig 0.7
- See Also:
- Serialized Form
filename
protected String filename
offset
protected Long offset
FileSplitComparable
public FileSplitComparable()
FileSplitComparable
public FileSplitComparable(String fileName,
long offset)
compareTo
public int compareTo(FileSplitComparable other)
- Specified by:
compareTo
in interface Comparable<FileSplitComparable>
readFields
public void readFields(DataInput in)
throws IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
write
public void write(DataOutput out)
throws IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
toString
public String toString()
- Overrides:
toString
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
Copyright © 2012 The Apache Software Foundation