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

    https://github.com/apache/spark/pull/5242#discussion_r27443662
  
    --- Diff: 
yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala ---
    @@ -117,6 +117,24 @@ private[yarn] class YarnAllocator(
       // For testing
       private val launchContainers = 
sparkConf.getBoolean("spark.yarn.launchContainers", true)
     
    +  private val labelExpression = 
sparkConf.getOption("spark.yarn.nodeLabelExpression")
    +
    +  // ContainerRequest constructor that can take a node label expression. 
We grab it through
    +  // reflection because it's only available in later versions of YARN.
    +  private val nodeLabelConstructor = labelExpression.flatMap { expr =>
    +    try {
    +      Some(classOf[ContainerRequest].getConstructor(classOf[Resource],
    --- End diff --
    
    @sryza, I think the constructor parameter here is not correct, it should be 
either 
    ```
      public static ApplicationSubmissionContext newInstance(
          ApplicationId applicationId, String applicationName, String queue,
          Priority priority, ContainerLaunchContext amContainer,
          boolean isUnmanagedAM, boolean cancelTokensWhenComplete,
          int maxAppAttempts, Resource resource, String applicationType,
          boolean keepContainers, String appLabelExpression,
          String amContainerLabelExpression)
    ```
    
    Or
    ```
      public static ApplicationSubmissionContext newInstance(
          ApplicationId applicationId, String applicationName, String queue,
          ContainerLaunchContext amContainer, boolean isUnmanagedAM,
          boolean cancelTokensWhenComplete, int maxAppAttempts,
          String applicationType, boolean keepContainers,
          String appLabelExpression, ResourceRequest resourceRequest) 
    ```
    In 2.6.0 release or after.


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