Using Hadoop MapReduce has been a bit of a while, and recently started writing some of your own base libraries. Hadoop file operations are essential operations, and the use of file manipulation commands is often cumbersome, so a simple class is written. Because their base libraries are written according to their own project requirements, they are not complete. Currently, only the most basic upload, delete, and download operations are tested and will continue to be perfected in later development. Now shared out for beginners as a reference, hope the great God generous enlighten.
Hadoop file Operations class and its test class Baidu cloud Disk Link: Http://pan.baidu.com/s/1c0g7CkC
The methods of the Hadoopfile class return a Boolean value that identifies whether the operation was successful. In addition, the information for the last operation is preserved in the public string variable opmessage, which can be printed to see the details of the operation.
This article was referenced in the development process: http://www.jb51.net/article/48104.htm
Hadoop Basic file operations