Purpose
This command operates on any node in the cluster to control services and provide status.
Syntax
hcli [--option] node [info [--option] | runonall "cmd" [--option] [--master | --data | --edge] | copytoall [--master | --data | --edge] [--help] [--recursive] src [additional src] --dest dir [--option]]Parameters
- hcli node info [ --option]
- Display node information about the specified options. The exit code is 0 if the command is successful.
Option Description --clustername Displays the name of the cluster. --node_type Displays the type of node, for example, a data node or master node. --cdh_version Displays CDH version only. --teradata-hadoop-tools-cdh_version Displays all the information (cluster name, version numbers, node type) in JSON format. --json Outputs all the information in JSON format for cluster name, version numbers, node type. - hcli node runonall [--master | --data | --edge] [--parallel] [--help] 'cmd' [--option]
- Execute a command on multiple Hadoop nodes. The command is required and must be in quotes. If no option is specified, the command runs on all nodes by default.
Option Description -m | --master Run on master nodes -d | --data Run on data nodes -e | --edge Run on edge nodes -p | --parallel Run command on nodes in parallel Exit code 0 indicates the command succeeded; exit code 1 indicates the command was unsuccessful. - hcli node copytoall src [additional src] --dest dir [--option]
- Copy a file or directory to multiple Hadoop nodes. If no option is specified, the file or directory copies to all nodes by default.
- src Names the source file or directory. Multiple allowed.
- -D | --dest dir Names the destination directory.
- -r | --recursive Copies recursively.
Option Description -m | --master Copies file or directory to master nodes -d | --data Copies file or directory to data nodes -e | --edge Copies file or directory to edge nodes Exit code 0 indicates the command succeeded; other exit codes indicate the number of nodes on which the command failed.