Posts tagged with: safe mode

Hadoop HDFS commands

Leaving SafeMode :

$ bin/hadoop dfsadmin -safemode leave

 

Failover NameNode :

find HDFS option

dfs.namenode.http-address.mycluster.nn1=nn.example.com:50070
dfs.namenode.http-address.mycluster.nn2=dn1.example.com:50070

So nn.example.com is nn1

[root@nn ~]# hdfs haadmin -getServiceState nn1
standby

Force transition for a NN to Active

[root@nn ~]# hdfs haadmin -transitionToActive --forcemanual nn1