Help Center/
MapReduce Service/
Developer Guide (LTS)/
HDFS Development Guide (Normal Mode)/
Developing the Project/
Development Idea
Updated on 2022-07-11 GMT+08:00
Development Idea
Development Idea
According to the previous scenario description, the following provides the basic operations for HDFS files with read, write, and delete operations on the /user/hdfs-examples/test.txt file as an example:
- Create a FileSystem object: fSystem.
- Call the mkdir interface in fSystem to create a directory.
- Call the create interface in fSystem to create an FSDataOutputStream object: out. Use the write method to write data into the object out.
- Call the append interface in fSystem to create an FSDataOutputStream object: out. Use the write method to append data into the object out.
- Call the open interface in fSystem to create an FSDataInputStream object: in. Use the read method to read files of the object in.
- Call the delete interface in fSystem to delete the file.
- Call the delete interface in fSystem to delete the folder.
Parent topic: Developing the Project
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot