Org. apache. hadoop. fs-Seekable, org. apache. commons
I should have read BufferedFSInputStream first, but it implements the Seekable and PositionedReadable interfaces. Let's look at these two interfaces first and then it will be easier to understand.
1 package org. apache. hadoop. fs; 2 3 import java. io. *; 4 5/** Stream that permits seeking. */6 // provides the location-based query interface 7 public interface Seekable {8/** 9 * Seek to the given offset from the start of The file.10 * the next read () will be from that location. can 't11 * seek past the end of the file.12 */13 void seek (long pos) throws IOException; 14 // from the position pos in the specified file, the file is streamed forward to the search. 15/** 16 * Return the current offset from the start of the file17 */18 long getPos () throws IOException; 19 // Return the current offset position in the file stream. 20/** 21 * Seeks a different copy of the data. returns true if 22 * found a new source, false otherwise.23 */24 boolean seekToNewSource (long targetPos) throws IOException; 25 // search for a different copy of file data from the targetPos location, returns true if it is found; otherwise, returns false. 26}
OrgapachehadoopconfConfiguration, orgapachehadoopfsFSDataInputStream jar packages can be less
These are included in the lib directory when hadoop is installed.
Where is the orgapachehadoopmapreduce package?
Go to the official website to download a hadoop-0.511203.0rc1.tar.gz package and decompress it,
In the extracted hadoop-core-0.20.203.0.jar, there is the org. apache. hadoop. mapreduce package.