Scenario
Typical Scenario Description
Based on typical scenarios, users can quickly learn and master the HDFS development process and know important interface functions.
Scenario
Service operation objects of HDFS are files. File operations in example codes include creating a folder, writing data into a file, appending data to a file, reading data from a file, and deleting a file or folder. HDFS also supports other services including setting file permission. You can learn how to perform other operations on HDFS after learning the example codes in this chapter.
The example codes are described in the following order:
- Initializing the HDFS.
- Creating directories.
- Writing data into a file.
- Appending data to a file.
- Reading data from a file.
- Deleting a file.
- Deleting directories.
- Multi-thread tasks
- Setting storage policies.
- Colocation.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.