Skip to content

Commit

Permalink
Fix NPE around unschedulable pod specs (apache#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
ash211 authored and mccheah committed Feb 2, 2017
1 parent 42819f7 commit 43c918c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,8 @@ private[spark] class Client(
.filter(_.getName == SUBMISSION_SERVER_PORT_NAME)
.head.getNodePort
val nodeUrls = kubernetesClient.nodes.list.getItems.asScala
.filterNot(_.getSpec.getUnschedulable)
.filterNot(node => node.getSpec.getUnschedulable != null &&
node.getSpec.getUnschedulable)
.flatMap(_.getStatus.getAddresses.asScala.map(address => {
s"$urlScheme://${address.getAddress}:$servicePort"
})).toArray
Expand Down

0 comments on commit 43c918c

Please sign in to comment.