In a created E-MapReduce (EMR) cluster, you can run Admin Shell commands of Alluxio to manage and maintain files in Alluxio. This topic describes common administrative commands of Alluxio.

Prerequisites

  • An EMR Hadoop cluster is created, and Alluxio is selected from the optional services when you create the cluster. For more information, see Create a cluster.
  • You have logged on to the cluster. For more information, see Log on to a cluster.

Background information

The following table describes common administrative commands of Alluxio.
Command Description
backup

Backs up metadata in Alluxio.

doctor

Displays errors and alerts reported in Alluxio.

report

Displays information about clusters on which Alluxio is running.

ufs

Updates the attributes of an attached underlying storage.

For more information, see Admin Command Line Interface.

backup

Backs up metadata in Alluxio.

  • Syntax:
    alluxio fsadmin backup [directory]
  • Examples:
    • Back up metadata to the default directory.
      alluxio fsadmin backup
      If the following information is returned, the metadata is backed up.
      Backup Host        : emr-header-1.cluster-23****
      Backup URI         : hdfs://emr-header-1:9000/alluxio_backups/alluxio-backup-2021-06-01-1622547059762.gz
      Backup Entry Count : 25
    • Back up metadata to the /tmp directory.
      alluxio fsadmin backup /tmp
      If the following information is returned, the metadata is backed up.
      Backup Host        : emr-header-1.cluster-23****
      Backup URI         : hdfs://emr-header-1:9000/tmp/alluxio-backup-2021-06-01-1622547072114.gz
      Backup Entry Count : 25

doctor

Displays errors and alerts reported in Alluxio.

  • Syntax:
    alluxio fsadmin doctor [category]
    Note The [category] parameter is optional. If you do not specify this parameter, the errors and alerts of all types are displayed. Valid values of the [category] parameter: configuration and storage.
  • Example: Display errors and alerts reported in Alluxio.
    alluxio fsadmin doctor
    If the following information is returned, no error or warning is displayed.
    All worker storage paths are in working state.

report

Displays information about clusters on which Alluxio is running.

  • Syntax:
    alluxio fsadmin report [category]
    Note The [category] parameter is optional. If you do not specify this parameter, only the summary information is displayed. Valid values of the [category] parameter: capacity, metrics, summary, ufs, and jobservice.
  • Example: Display information about clusters on which Alluxio is running.
    alluxio fsadmin report
    Information similar to the following command output is returned:
    Alluxio cluster summary:
        Master Address: emr-header-1:1****
        Web Port: 1****
        Rpc Port: 1****
        Started: 06-01-2021 14:07:08:420
        Uptime: 0 day(s), 20 hour(s), 42 minute(s), and 57 second(s)
        Version: 2.5.0
        Safe Mode: false
        Zookeeper Enabled: false
        Live Workers: 2
        Lost Workers: 0
        Total Capacity: 88.00GB
            Tier: MEM  Size: 8.00GB
            Tier: SSD  Size: 80.00GB
        Used Capacity: 320.00MB
            Tier: MEM  Size: 64.00MB
            Tier: SSD  Size: 256.00MB
        Free Capacity: 87.69GB
                            

ufs

Updates the attributes of an attached underlying storage.

  • Syntax:
    alluxio fsadmin --mode <noAccess/readOnly/readWrite> <ufsPath>
  • Example: Set the mode parameter to readOnly to prohibit write operations on the underlying storage.
    alluxio fsadmin ufs --mode readOnly hdfs://ns