HDFS查看异常:Operation category READ is not supported in state standby. Visit
生活随笔
收集整理的這篇文章主要介紹了
HDFS查看异常:Operation category READ is not supported in state standby. Visit
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?跨集群訪問hdfs失敗
$ hdfs dfs -ls hdfs://test:8020/hbase ls: Operation category READ is not supported in state standby. Visit https://s.apache.org/sbnn-error意思是namenode不可用,查看namenode狀態
hdfs-site.xml<property><name>dfs.ha.namenodes.nameservice1</name><value>namenode223,namenode47</value></property>使用命令查看namenode狀態,發現主NameNode是在運行的。
$hdfs haadmin -getServiceState namenode223 active此時如果查看namenode是standby模式可以使用以下命令前置切換主備?
hdfs haadmin -transitionToActive --forcemanual namenode47?
找了半天才發現test:8020是之前的namenode,后來NameNode被我遷移了,換成test2:8020,ok。
總結幾個命令,日常維護時使用:
#切換NameNode(強制切換主備),前提是目前在用的NameNode是standby狀態,否則失敗 hdfs haadmin -transitionToActive --forcemanual namenode47#查看NameNode運行狀態 hdfs haadmin -getServiceState namenode223 更多查看 $ hdfs haadmin -help Usage: DFSHAAdmin [-ns <nameserviceId>][-transitionToActive <serviceId> [--forceactive]][-transitionToStandby <serviceId>][-failover [--forcefence] [--forceactive] <serviceId> <serviceId>][-getServiceState <serviceId>][-checkHealth <serviceId>][-help <command>]Generic options supported are -conf <configuration file> specify an application configuration file -D <property=value> use value for given property -fs <local|namenode:port> specify a namenode -jt <local|resourcemanager:port> specify a ResourceManager -files <comma separated list of files> specify comma separated files to be copied to the map reduce cluster -libjars <comma separated list of jars> specify comma separated jar files to include in the classpath. -archives <comma separated list of archives> specify comma separated archives to be unarchived on the compute machines.The general command line syntax is bin/hadoop command [genericOptions] [commandOptions]?
總結
以上是生活随笔為你收集整理的HDFS查看异常:Operation category READ is not supported in state standby. Visit的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ubuntu 安装PCL
- 下一篇: maven 打包报错 surefire-