Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

HADOOP format namenode node preparation script

Shulou Source: shulou.com Published: 2022-06-03 06:26:29 10月30日 Update

In general, Live nodes are 0 because the clusterID numbers in namenode and datanode are different, and the incentive is because of repeated formatting. If you don't need to save the data and redo it directly, you need to do the following steps.

ssh hd1 rm /home/hadoop/namenode/* -rf

ssh hd1 rm /home/hadoop/hdfs/* -rf

ssh hd2 rm /home/hadoop/hdfs/* -rf

ssh hd3 rm /home/hadoop/hdfs/* -rf

ssh hd4 rm /home/hadoop/hdfs/* -rf

ssh hd1 rm /home/hadoop/tmp/* -rf

ssh hd2 rm /home/hadoop/tmp/* -rf

ssh hd3 rm /home/hadoop/tmp/* -rf

ssh hd4 rm /home/hadoop/tmp/* -rf

ssh hd1 rm /home/hadoop/hadoop/logs/* -rf

ssh hd2 rm /home/hadoop/hadoop/logs/* -rf

ssh hd3 rm /home/hadoop/hadoop/logs/* -rf

ssh hd4 rm /home/hadoop/hadoop/logs/* -rf

When it's all done, it can be formatted.

hadoop namenode -format

Tags: Format different generally speaking situation data steps incentives scripts nodes preparation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Technology Shulou Tech Info Redmi vpn