@Public public class FileInputSplit extends LocatableInputSplit
Constructor and Description |
---|
FileInputSplit(int num,
Path file,
long start,
long length,
String[] hosts)
Constructs a split with host information.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
long |
getLength()
Returns the number of bytes in the file to process.
|
Path |
getPath()
Returns the path of the file containing this split's data.
|
long |
getStart()
Returns the position of the first byte in the file to process.
|
int |
hashCode() |
String |
toString() |
getHostnames, getSplitNumber
public FileInputSplit(int num, Path file, long start, long length, String[] hosts)
num
- the number of this input splitfile
- the file namestart
- the position of the first byte in the file to processlength
- the number of bytes in the file to process (-1 is flag for "read whole file")hosts
- the list of hosts containing the block, possibly null
public Path getPath()
public long getStart()
public long getLength()
public int hashCode()
hashCode
in class LocatableInputSplit
public boolean equals(Object obj)
equals
in class LocatableInputSplit
public String toString()
toString
in class LocatableInputSplit
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.