Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Hadoop users redeploy HDFS

Shulou Source: shulou.com Published: 2022-06-03 02:21:48 10月02日 Update

Foreword:

In this article www.jianshu.com/p/eeae2f37a48c

We use root user to deploy, in production environment, generally a component is started by a user, this article describes how to use hadoop users to redeploy pseudo-distributed (HDFS)

1. preliminary preparation

Create hadoop user and configure ssh password free login

Reference: www.jianshu.com/p/589bb43e0282

2. Stop the HDFS process initiated by root and delete the storage file in/tmp directory [root@hadoop000 hadoop-2.8.1]# pwd/opt/software/hadoop-2.8.1[root@hadoop000 hadoop oop-2.8.1]# jps32244 NameNode32350 DataNode32558 SecondaryNameNode1791 Jps[root@hadoop000 hadoop-2.8.1] 1]# sbin/stop-dfs.sh Stopping namenodes on [hadoop000]hadoop000: stopping namenodelocalhost: stopping datanodeStopping secondary namenodes [0.0.0.0]0.0.0.0: stopping secondarynamenode[root@hadoop000 hadoop-2.8.1]# jps2288 Jps[root@hadoop000 hadoop-2.8.1]# rm -rf /tmp/hadoop-* /tmp/hsperfdata_*3. Change file ownership [root@hadoop000 software]# pwd/opt/software[root@hadoop000 software]# chown -R hadoop: hadoop hadoop-2.8.14. Go to hadoop User Modify Related Profiles #Step 1:[hadoop@hadoop000 hadoop]$ pwd/opt/software/hadoop-2.8.1/etc/hadoop[hadoop@hadoop000@adoop]$ vi hdfs-site.xml dfs.replication1dfs. namenode.secondary.http-address192.168.6.217:50090dfs.namenode.secondary. https-address 192. 168. 6. 217: 50091#Step 2:[hadoop@hadoop000 hadoop]$ vi core-site.xml fs.defaultFShdfs://192.168.6.217:9000#Step 3:[hadoop@hadoop000 hadoop]# vi slaves 192.168.6.2175. Format and Initiate [hadoop@hadoop000 hadoop-2.8.1]$ pwd/opt/software/hadoop-2.8.1[hadoop@hadoop000 hadoop-2.8.1]$ bin/hdfs namesode-format[hadoop@hadoop000 hadoop-2.8.1]$ sbin/start-dfs.shStarting namesodes on [hadoop000]hadoop000: starting namenode, logging to /opt/software/hadoop-2.8.1/logs/hadoop-hadoop-namenode-hadoop000.out192.168.6.217: starting datanode, logging to /opt/software/hadoop-2.8.1/logs/hadoop-hadoop-datanode-hadoop000.outStarting secondary namenodes [hadoop000]hadoop000: starting secondarynamenode, logging to /opt/software/hadoop-2.8.1/logs/hadoop-hadoop-secondarynamenode-hadoop 000.out[hadoop@hadoop000 hadoop-2.8.1]$ jps3141 Jps2806 DataNode2665 NameNode2990 SecondaryNameNode#So far it is found that HDFS three processes are started with hadoop000,

Tags: User file process configuration three distributed Prophase foreword article by format environment directory article component so far preparation reference storage production Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Redmi MariaDB vpn Shulou Tech Info