Skip to content

[SPARK-20608] allow standby namenodes in spark.yarn.access.namenodes - #17872

Closed
charliechen211 wants to merge 3 commits into
apache:masterfrom
charliechen211:SPARK-20608-master
Closed

[SPARK-20608] allow standby namenodes in spark.yarn.access.namenodes#17872
charliechen211 wants to merge 3 commits into
apache:masterfrom
charliechen211:SPARK-20608-master

Conversation

@charliechen211

Copy link
Copy Markdown

Related Jira:
https://issues.apache.org/jira/browse/SPARK-20608

Descriptions:
See PR (in branch-2.1): #17870

@AmplabJenkins

Copy link
Copy Markdown

Can one of the admins verify this patch?

@charliechen211charliechen211 changed the title [SPARK-20608] allow standby namenodes in spark.yarn.access.namenodes (PR in master branch)[SPARK-20608] allow standby namenodes in spark.yarn.access.namenodesMay 5, 2017
@charliechen211

Copy link
Copy Markdown
Author

@srowen@jerryshao@steveloughran This is the latest PR. #17870 is deprecated.

} catch {
case e: StandbyException =>
logWarning(s"Namenode ${dst} is in state standby", e)
case e: RemoteException =>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggested adding a handler for UnknownHostException too, but now I think that could hide problems with client config. Best to leave as is.

@steveloughran

Copy link
Copy Markdown
Contributor

at a glance, patch LGTM.

dstFs.addDelegationTokens(tokenRenewer, tmpCreds)
} catch {
case e: StandbyException =>
logWarning(s"Namenode ${dst} is in state standby", e)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not accurate to say "Namenode" here, because we may configure to other non-HDFS.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hum..Here is actually fetching tokens from hadoopFS, including in hadoopFSCredentialProvider, which means it's exactly HDFS?

@jerryshaojerryshaoMay 8, 2017

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hadoop compatible FS doesn't equal to HDFS, we can configure to wasb, adls and others. Also wasb and adls support fetching delegation tokens from common FS API, so we should avoid mentioning Namenode which is only existed in HDFS.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also for the below "RemoteException", how do you know "RemoteException" is exactly a standby exception?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In our tests, there are two possible exceptions when yarn.spark.access.namenodes=hdfs://activeNamenode,hdfs://standbyNamenode

  1. Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category WRITE is not supported in state standby
  2. Caused by: org.apache.hadoop.ipc.StandbyException: Operation category WRITE is not supported in state standby
    Maybe RemoteException should be caught by better way.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I mean is that if "RemoteException" is caused by others, it is not correct to log as "Namenode ${dst} is in state standby".

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. I will refactor the exception log.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I refactored it. Please review and give some more advices :)

import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.{FileSystem, Path}
import org.apache.hadoop.ipc.RemoteException
import org.apache.hadoop.ipc.StandbyException

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This two line of imports can be merged into one line.

@jerryshao

Copy link
Copy Markdown
Contributor

This change may be conflicted with #17723 , but I think it is easy to resolve, CC @mgummelt .

@charliechen211

Copy link
Copy Markdown
Author

@jerryshao done.

@srowen

Copy link
Copy Markdown
Member

I think @vanzin is saying this is not the right change

@vanzin

Copy link
Copy Markdown
Contributor

Yes, I already explained in the discussion in the bug. The very fact you're getting an exception from the standby namenode means you're not actually getting the delegation token. Which makes this change pointless.

@srowensrowen mentioned this pull request May 17, 2017
zifeif2 pushed a commit to zifeif2/spark that referenced this pull request Nov 22, 2025
## What changes were proposed in this pull request?
This PR proposes to close PRs ...
- inactive to the review comments more than a month
- WIP and inactive more than a month
- with Jenkins build failure but inactive more than a month
- suggested to be closed and no comment against that
- obviously looking inappropriate (e.g., Branch 0.5)
To make sure, I left a comment for each PR about a week ago and I could not have a response back from the author in these PRs below:
Closesapache#11129Closesapache#12085Closesapache#12162Closesapache#12419Closesapache#12420Closesapache#12491Closesapache#13762Closesapache#13837Closesapache#13851Closesapache#13881Closesapache#13891Closesapache#13959Closesapache#14091Closesapache#14481Closesapache#14547Closesapache#14557Closesapache#14686Closesapache#15594Closesapache#15652Closesapache#15850Closesapache#15914Closesapache#15918Closesapache#16285Closesapache#16389Closesapache#16652Closesapache#16743Closesapache#16893Closesapache#16975Closesapache#17001Closesapache#17088Closesapache#17119Closesapache#17272Closesapache#17971
Added:
Closesapache#17778Closesapache#17303Closesapache#17872
## How was this patch tested?
N/A
Author: hyukjinkwon <gurwls223@gmail.com>
Closesapache#18017 from HyukjinKwon/close-inactive-prs.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@charliechen211@AmplabJenkins@steveloughran@jerryshao@srowen@vanzin