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

    https://github.com/apache/spark/pull/3652#discussion_r22066629
  
    --- Diff: 
yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala ---
    @@ -498,26 +494,160 @@ private[yarn] abstract class YarnAllocator(
        *
        * @param count Number of containers to allocate.
        *              If zero, should still contact RM (as a heartbeat).
    -   * @param pending Number of containers pending allocate. Only used on 
alpha.
        * @return Response to the allocation request.
        */
    -  protected def allocateContainers(count: Int, pending: Int): 
YarnAllocateResponse
    +  private def allocateContainers(count: Int): AllocateResponse = {
    +    addResourceRequests(count)
     
    -  /** Called to release a previously allocated container. */
    -  protected def releaseContainer(container: Container): Unit
    +    // We have already set the container request. Poll the ResourceManager 
for a response.
    +    // This doubles as a heartbeat if there are no pending container 
requests.
    +    val progressIndicator = 0.1f
    +    amClient.allocate(progressIndicator)
    +  }
     
    -  /**
    -   * Defines the interface for an allocate response from the RM. This is 
needed since the alpha
    -   * and stable interfaces differ here in ways that cannot be fixed using 
other routes.
    -   */
    -  protected trait YarnAllocateResponse {
    +  private def createRackResourceRequests(
    +      hostContainers: ArrayBuffer[ContainerRequest])
    +    : ArrayBuffer[ContainerRequest] = {
    --- End diff --
    
    does this fit in 1 line?


---
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