mmhdfs command

The mmhdfs command configures and manages the IBM Spectrum Scale HDFS Transparency components.

Synopsis

mmhdfs {hdfs | hdfs-nn | hdfs-dn} {start | stop | restart | status}

or

mmhdfs {namenode | datanode} {start | stop | restart | status} [-N Node[,Node...]]

or

mmhdfs config upload

or

mmhdfs config set {filename} {-k key1=value1[ -k key2=value2...]}

or

mmhdfs config del {filename} {-k key1[ -k key2...]}

or

mmhdfs config get {filename} {-k key1[ -k key2...]}

or

mmhdfs config import [--nocheck] {dirpath} {filename1[,filename2...] | all}

or

mmhdfs config export [--nocheck] {dirpath} {filename1[,filename2...] | all}

or

mmhdfs worker {add | remove} [Node[,Node...]]

Availability

Available on all IBM Spectrum Scale editions.

Description

Note: From IBM Spectrum Scale 5.0.4.2, the mmhdfs command is available when HDFS Transparency 3.1.1 or later is installed.
Use the mmhdfs command to perform the following:
  • Start and Stop HDFS Transparency.
  • Add and Remove the HDFS Transparency worker nodes.
  • Manage the HDFS Transparency configurations.

Parameters

hdfs
Specifies the NameNode and DataNode service of all the HDFS Transparency nodes.
hdfs-nn
Specifies the NameNode service of all the NameNodes.
hdfs-dn
Specifies the DataNode service of all the DataNodes.
start
Starts the specified component.
stop
Stops the specified component.
restart
Restarts the specified component.
status
Shows the running status of the specified component.
namenode
Specifies the NameNode service of the specified nodes.
datanode
Specifies the DataNode service of the specified nodes.
start
Starts the specified component.
stop
Stops the specified component.
restart
Restarts the specified component.
status
Shows the running status of the specified component.
-N Node[,Node...]
Specifies the nodes on which the command should run.
config
Specifies the configuration operation.
upload
Uploads the configuration into CCR.
set
Sets the specified config option of the specified configuration file to the specified value.
filename
Specifies the name of the file.
-k key1=value1
Specifies the key value pair to set.
del
Deletes the specified config option from the specified configuration file.
filename
Specifies the name of the configuration file.
-k key1
Specifies the key to delete.
get
Gets the value of the specified config option for the specified configuration file.
filename
Specifies the name of the configuration file.
-k key1
Specifies the key to delete.
import
Imports the specified configuration files from the specified directory.
--nocheck
If this option is not specified, only the following configuration files are supported:

hadoop-env.sh, core-site.xml, hadoop-policy.xml, hdfs-site.xml, httpfs-site.xml, gpfs-site.xml, kms-acls.xml, kms-site.xml, ranger-hdfs-audit.xml, ranger-hdfs-security.xml, ranger-policymgr-ssl.xml, ranger-security.xml, ssl-client.xml, ssl-server.xml, yarn-site.xml, kms-log4j.properties, log4j.properties, hadoop-metrics2.properties, and hadoop-metrics.properties slaves workers.

dirpath
Specifies the directory from which to import the files.
filename
Configuration files to be imported.
all
Import all configuration files from the directory.
export
Exports the specified configuration files to the specified directory.
--nocheck
If this option is not specified, only the following configuration files are supported:

hadoop-env.sh, core-site.xml, hadoop-policy.xml, hdfs-site.xml, httpfs-site.xml, gpfs-site.xml, kms-acls.xml, kms-site.xml, ranger-hdfs-audit.xml, ranger-hdfs-security.xml, ranger-policymgr-ssl.xml, ranger-security.xml, ssl-client.xml, ssl-server.xml, yarn-site.xml, kms-log4j.properties, log4j.properties, hadoop-metrics2.properties, and hadoop-metrics.properties slaves workers.

dirpath
Specifies the directory from which to export the files.
filename
Configuration files to be exported.
all
Export all configuration files to the directory.
worker
Adds or removes the DataNode(s).
add
Adds the specified nodes as DataNodes.
remove
Removes the specified nodes from the DataNodes.
Node[,Node...]
Specifies a comma-delimited list of the nodes on which the command should run.

Exit status

0
Successful completion.
nonzero
A failure has occurred.

Security

You must have root authority to run the mmhdfs command.

The node on which the command is issued must be able to execute the remote shell commands on any other node in the cluster without the use of a password and without producing any extraneous messages.

Examples

  1. To start all the HDFS Transparency components, run the following command:
    mmhdfs hdfs start 
  2. To stop all the HDFS Transparency components, run the following command:
    mmhdfs hdfs stop 
  3. To check the HDFS Transparency status for all the Namenodes, run the following command:
    mmhdfs hdfs-nn status 
  4. To add in a configuration setting, run the following command:
    mmhdfs config set hadoop-env.sh -k JAVA_HOME=/usr/jdk64/jdk1.8.0_112

    or

    mmhdfs config set gpfs-site.xml -k gpfs.mnt.dir=/gpfs -k gpfs.data.dir=trunk -k gpfs.storage.type=local -k gpfs.replica.enforced=gpfs
  5. To get a configuration setting, run the following command:
    mmhdfs config get hadoop-env.sh -k JAVA_HOME JAVA_HOME=/usr/jdk64/jdk1.8.0_112

    or

    mmhdfs config get core-site.xml -k fs.defaultFS fs.defaultFS=hdfs://hdfscluster 
  6. To delete a configuration setting, run the following command:
    mmhdfs config del hadoop-env.sh -k JAVA_HOME

    or

    mmhdfs config del core-site.xml -k fs.defaultFS
  7. To import configuration files from a local directory, run the following command:
    mmhdfs config import /tmp/hadoop core-site.xml 
  8. To import all configuration files from a local directory, run the following command:
    mmhdfs config import /tmp/hadoop all
  9. To export configuration files to a local directory, run the following command:
    mmhdfs config export /tmp/hadoop core-siste.xml
  10. To export all configuration files to a local directory, run the following command:
    mmhdfs config export /tmp/hadoop all 
  11. To add Datanodes into the HDFS Transparency cluster, run the following command:
    mmhdfs worker add c902f05x05, c902f05x06, c902f05x07 
  12. To upload configuration files into CCR and other nodes, run the following command:
    mmhdfs config upload 

See also

Location

/usr/lpp/mmfs/hadoop/sbin