Updated on 2024-08-10 GMT+08:00

HDFS Sample Project

To obtain an MRS sample project, visit https://github.com/huaweicloud/huaweicloud-mrs-example and switch to the branch that matches the MRS cluster version. Download the package to the local PC and decompress it to obtain the sample project of each component.

MRS provides the following HDFS sample projects:
Table 1 HDFS-related sample projects

Location

Description

hdfs-example-security

Java example program for HDFS file operations.

This project provides API operation examples related to creating HDFS folders, writing files, appending file content, reading files, and deleting files or folders. For details about the service scenarios, see Developing the Project.

hdfs-c-example

HDFS C language development code sample.

This example provides C language-based HDFS file system connection and file operations, such as creating, reading, writing, appending, and deleting files. For details about the service scenarios, see C API Introduction.