Updated on 2022-09-14 GMT+08:00

Scenario Description

Scenario Description

You can quickly learn and master the Alluxio development process and know key interface functions in a typical application scenario.

Service operation objects of Alluxio are files. File operations covered by sample codes include creating a folder, reading a file, and writing data to a file. You can learn how to perform other operations on the Alluxio, such as setting file access permissions, based on sample codes.

Sample codes are described in the following sequence:

  1. Initializing the file system
  2. Writing data to a file
  3. Reading a file

Development guidelines

  1. Invoke the create API in FileSystem to obtain the file system client.
  2. Invoke the createFile API in FileSystem to create a file.
  3. Invoke the write API in FileOutStream to write a file.
  4. Invoke the openFile API in FileSystem to create a file.
  5. Invoke the in API in fileSystem to read the file.