-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NameNode HA: HDFS access gives error "Operation category READ is not supported in state standby" #54
Comments
You should configure a client to work with HDFS in HA mode manually. You can get params from
Homegrown apps can be configured via code changes https://stackoverflow.com/a/35911455 |
I did the same mounting secrets with core-site and hdfs-site into Spark app. |
We have similar idea with @juv and I am implementing it. Basically We create a ZooKeeper watcher to get notification on the event of ZooKeeper znode /hadoop-ha/ns/ActiveStandbyElectorLock. Then we will get the info about which NameNode is active. We label the active NameNode so that the k8s service only route requests to active NameNode. In this way, client don't need to retry to figure out which is active. |
@maver1ck were you able to get this working with configmaps? I am also trying with configmaps and I am failing as well. My hdfs-ha cluster name is not resolvable even though all my info is properly mounted in configmaps and the core-site.xml and hdfs-site.xml files are properly mounted. Caused by: java.lang.IllegalArgumentException: java.net.UnknownHostException: hdfs-k8s |
@dennischin Can you connect to hdfs-client pod and traverse files on hdfs?
You can find configuration on hdfs-client pod |
@vvbogdanov87 , yes i can interact with hdfs (outside of spark) without issue. |
vim spark-evn.sh export SPARK_HISTORY_OPTS="-Dspark.history.ui.port=18080 -Dspark.history.retainedApplications=30 -Dspark.history.fs.logDirectory=hdfs://mycluster/spark-job-log" |
I've set up NameNode HA. A problem is that my service will route to either active namenode or standby namenode. For example, I have a Spark History server running with parameter SPARK_HISTORY_OPTS="-Dspark.history.fs.logDirectory=hdfs://hadoop-hdfs-nn.my-namespace.svc:9000/shared/spark-logs".
The following error
Operation category READ is not supported in state standby
occurs:I guess that the Spark History Server has accessed the k8s service and got routed to the standby namenode instead of the active namenode. Have you thought about this problem @kimoonkim? I have an idea to solve this:
hadoop-hdfs-active-nn
Then, let all clients connect to the
hadoop-hdfs-active-nn
service instead ofhadoop-hdfs-nn
. I am not sure if it is possible to set the label of a service from within a pod though...The text was updated successfully, but these errors were encountered: