Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Hadoop highly available cluster hdfs command

Shulou Source: shulou.com Published: 2022-06-03 08:11:03 11月23日 Update

Hdfs haadmin View help Command

Hdfs haadmin View help Command [hadoop@ruozedata001 ~] $hdfs haadminUsage: DFSHAAdmin [- ns] [- transitionToActive [--forceactive]] [- transitionToStandby] [- failover [--forcefence] [--forceactive]] [- getServiceState] [- checkHealth] [- help]

Hdfs haadmin-getServiceState nn1 nn2

Note: where nn1 and nn2 are server id of namenode, not machine name

Find service id in hdfs.xml, and the configuration file is as follows

Dfs.nameservices cluster dfs.ha.namenodes.cluster nn1,nn2

Hdfs failover

Hdfs fsck command to do hdfs cluster health check, when files are corrupted

Hdfs fsck / check the cluster data from the root directory

Hdfs fsck /-delete deletes corrupted data files on hdfs

Tags: Command file cluster data help check health content time machine root directory configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Huawei NVidia Shulou Technology Shulou Information