Skip to content

Instantly share code, notes, and snippets.

@winse
Created June 18, 2014 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save winse/a662885a3682ec4881eb to your computer and use it in GitHub Desktop.
Save winse/a662885a3682ec4881eb to your computer and use it in GitHub Desktop.
hadoop-ha一台master挂了后,强制active另一台机
[hadoop@hadoop-master1 ~]$ hdfs haadmin -transitionToActive --forcemanual nn1
You have specified the forcemanual flag. This flag is dangerous, as it can induce a split-brain scenario that WILL CORRUPT your HDFS namespace, possibly irrecoverably.
It is recommended not to use this flag, but instead to shut down the cluster and disable automatic failover if you prefer to manually manage your HA state.
You may abort safely by answering 'n' or hitting ^C now.
Are you sure you want to continue? (Y or N) Y
14/06/18 10:43:18 WARN ha.HAAdmin: Proceeding with manual HA state management even though
automatic failover is enabled for NameNode at hadoop-master1/192.168.32.11:8020
[hadoop@hadoop-master1 ~]$ hdfs haadmin -getServiceState nn1
active
[hadoop@hadoop-master1 ~]$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment