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>
public class FileSplitComparable
- extends Object
- implements org.apache.hadoop.io.WritableComparable<FileSplitComparable>, Serializable
This class can be used to represent a relative position in a file.
compareTo(other) function of WritaleComparable interface is used to compare
position of different objects of this class.
- 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 © ${year} The Apache Software Foundation