Use the Alluxio Admin Shell (alluxio fsadmin) to manage and maintain Alluxio in an E-MapReduce (EMR) cluster.
Prerequisites
Before you begin, ensure that you have:
-
An EMR Hadoop cluster with Alluxio selected from optional services. For details, see Create a cluster.
-
Logged on to the cluster. For details, see Log on to a cluster.
Commands overview
alluxio fsadmin supports the following subcommands:
| Command | Description |
|---|---|
| backup | Backs up Alluxio metadata |
| doctor | Displays errors and alerts |
| report | Displays cluster status information |
| ufs | Updates the attributes of an attached underlying storage |
For the full Admin Shell reference, see Admin Command Line Interface.
backup
Backs up Alluxio metadata to the specified directory. If no directory is specified, the backup is saved to the default path in Hadoop Distributed File System (HDFS).
Syntax:
alluxio fsadmin backup [directory]
Examples:
Back up metadata to the default directory:
alluxio fsadmin backup
Expected output:
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
Expected output:
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. Use this command to quickly check the health of your cluster.
Syntax:
alluxio fsadmin doctor [category]
The category parameter is optional. If omitted, all error and alert types are displayed.
| Value | Description |
|---|---|
configuration |
Displays configuration-related errors and alerts |
storage |
Displays storage-related errors and alerts |
Example:
alluxio fsadmin doctor
If no errors or warnings are detected, the output is:
All worker storage paths are in working state.
report
Displays status information about the Alluxio cluster.
Syntax:
alluxio fsadmin report [category]
The category parameter is optional. If omitted, only the cluster summary is displayed. Valid values: capacity, metrics, summary, ufs, and jobservice.
Example:
alluxio fsadmin report
The output is similar to:
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 ufs --mode <noAccess|readOnly|readWrite> <ufsPath>
Example:
Set the underlying storage to read-only mode to disallow write operations:
alluxio fsadmin ufs --mode readOnly hdfs://ns