Github user steveloughran commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9182#discussion_r43498798
  
    --- Diff: 
yarn/src/main/scala/org/apache/spark/scheduler/cluster/YarnSchedulerBackend.scala
 ---
    @@ -51,6 +51,41 @@ private[spark] abstract class YarnSchedulerBackend(
     
       private implicit val askTimeout = RpcUtils.askRpcTimeout(sc.conf)
     
    +  /** Application ID. Must be set by a subclass before starting the 
service */
    +  private var appId: ApplicationId = null
    +
    +  /** Attempt ID. This is unset for client-mode schedulers */
    +  private var attemptId: Option[ApplicationAttemptId] = None
    +
    +  /** Scheduler extension services */
    +  private val services: SchedulerExtensionServices = new 
SchedulerExtensionServices()
    +
    +  /**
    +    * Bind to YARN. This *must* be done before calling [[start()]].
    +    *
    +    * @param appId YARN application ID
    +    * @param attemptId Optional YARN attempt ID
    +    */
    +  protected def bindToYarn(appId: ApplicationId, attemptId: 
Option[ApplicationAttemptId]): Unit = {
    +    this.appId = appId
    +    this.attemptId = attemptId
    +  }
    +
    +  override def start() {
    +    require(appId != null, "application ID unset")
    +    val binding = SchedulerExtensionServiceBinding(sc, appId, attemptId)
    +    services.start(binding)
    --- End diff --
    
    No, because that's not the yarn attempt ID. I explicitly use that to query 
the YARN RM & identify attempts/apps which have finished/disappeared without 
closing their event stream. So I do need that attempt ID, as would any other 
plugin that wanted to work with the RM. They could *probably* get away with it 
as a string. And if in future it turns out to not be the case, the use of a 
binding class will allow it to be added without breaking any existing plugins 
the way adding a new parameter would do



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to