Useful Command for cluster management
1
#Commands to check cluster health
Check whether ResourceManager & NodeManager are running or not (Part of HDFS and YARN)
nginx
ps -ef | grep -i manager
Check whether NameNode, DataNode & SecondaryNameNode are running or not
nginx
ps -ef | grep -i node
HDFS services running under this user (NameNode, DataNode & SecondaryNameNode service)
nginx
ps -fu hdfs
YARN services running under this user (ResourceManager & NodeManager service)
nginx
ps -fu yarn
To search commands using VI history
bash
set -o vi
less
jdbc:mysql://quickstart.cloudera.3306 --> JDBC URL
hdfs://quickstart.cloudera:8020 --> NameNode URL
#Check service running
less
cat /etc/passwd (it will list all available users)
sudo -u yarn jps (to list hdfs services)
sudo -u hdfs jps (to list yarn services)
#JPS
properties
sudo -u hdfs jps
sudo -u yarn jps
#EOF usage
properties
hive <<EOF
show databases;
show tables;
EOF
Source : Copy pasted found somewhere