Org. apache. hadoop. fs-Seekable, org. apache. commons

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.