-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-3657] yarn alpha YarnRMClientImpl throws NPE appMasterRequest.setTrackingUrl starting spark-shell #2728
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
Conversation
|
CC @tgravescs |
|
QA tests have started for PR 2728 at commit
|
|
QA tests have finished for PR 2728 at commit
|
|
@sarutak thanks for working on this. Did you by chance test this to see if the tracking url is really not being set in the RM UI for all the modes (including using spark-shell)? If its not there might be a bug somewhere else as that used to work. |
|
QA tests have started for PR 2728 at commit
|
|
@tgravescs I didn't really understand the root cause. I attached this patch and run client/cluster mode including Spark Shell. |
|
QA tests have finished for PR 2728 at commit
|
|
QA tests have started for PR 2728 at commit
|
|
QA tests have finished for PR 2728 at commit
|
|
retest this please. |
|
QA tests have started for PR 2728 at commit
|
|
Tests timed out for PR 2728 at commit |
|
retest this please. |
|
QA tests have started for PR 2728 at commit
|
|
QA tests have finished for PR 2728 at commit
|
|
test this please. |
|
So one issue is that the scheme was added to properly handle when yarn using https (SPARK-3286). If client mode isn't passing the scheme then that is probably broken. If it was passing the scheme that you wouldn't hit this issue. I think changing the YarnClientSchedulerBackend.start routine where it sets the spark.driver.appUIAddress would be the equivalent change. And then we would need to test. With the above change it would have the scheme included and wouldn't hit the null. If we want to add the check in anyway for handling the case where it is null just in case something else comes up, thats fine, but I'm not real fond of pattern matching here. How about just checking the URI.getScheme and if null we pass it in as is, otherwise we do the getAuthority()? |
|
@sarutak could you submit a different pr for this so jenkins picks it up? Then close this one |
|
@tgravescs I opened new PR and Jenkins worked in #2981. Thanks! |
@tgravescs reported this issue.
Following is quoted from @tgravescs' report.
YarnRMClientImpl.registerApplicationMaster can throw null pointer exception when setting the trackingurl if its empty:
I hit this just start spark-shell without the tracking url set.
14/09/23 16:18:34 INFO yarn.YarnRMClientImpl: Connecting to ResourceManager at kryptonitered-jt1.red.ygrid.yahoo.com/98.139.154.99:8030
Exception in thread "main" java.lang.NullPointerException
at org.apache.hadoop.yarn.proto.YarnServiceProtos$RegisterApplicationMasterRequestProto$Builder.setTrackingUrl(YarnServiceProtos.java:710)
at org.apache.hadoop.yarn.api.protocolrecords.impl.pb.RegisterApplicationMasterRequestPBImpl.setTrackingUrl(RegisterApplicationMasterRequestPBImpl.java:132)
at org.apache.spark.deploy.yarn.YarnRMClientImpl.registerApplicationMaster(YarnRMClientImpl.scala:102)
at org.apache.spark.deploy.yarn.YarnRMClientImpl.register(YarnRMClientImpl.scala:55)
at org.apache.spark.deploy.yarn.YarnRMClientImpl.register(YarnRMClientImpl.scala:38)
at org.apache.spark.deploy.yarn.ApplicationMaster.registerAM(ApplicationMaster.scala:168)
at org.apache.spark.deploy.yarn.ApplicationMaster.runExecutorLauncher(ApplicationMaster.scala:206)
at org.apache.spark.deploy.yarn.ApplicationMaster.run(ApplicationMaster.scala:120)