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

    https://github.com/apache/spark/pull/7786#discussion_r40031826
  
    --- Diff: 
yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala ---
    @@ -238,6 +257,33 @@ private[yarn] class YarnAllocator(
         }
       }
     
    +  /** Get a list of preemption containers through AM-RM heartbeat. */
    +  private def preemptResources(allocateResponse: AllocateResponse): Unit = 
{
    +    val preemptMessageOpt = Option(allocateResponse.getPreemptionMessage)
    --- End diff --
    
    Part of me things these `Option` instances are not necessary and good old 
null checks would be just as readable, but I don't really mind either way.


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