You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by sryza <gi...@git.apache.org> on 2014/12/10 01:05:44 UTC

[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

GitHub user sryza opened a pull request:

    https://github.com/apache/spark/pull/3652

    SPARK-4447. Remove layers of abstraction in YARN code no longer needed after dropping yarn-alpha

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sryza/spark sandy-spark-4447

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/3652.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3652
    
----
commit 84fa3cdcf281bbd3806890e78c9fead5d596b7df
Author: Sandy Ryza <sa...@cloudera.com>
Date:   2014-11-17T08:23:50Z

    SPARK-4447

commit 17628f8458c0a5f279af1ce621d8f7422ca148d9
Author: Sandy Ryza <sa...@cloudera.com>
Date:   2014-12-10T00:03:57Z

    Strip margin from client arguments help string

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/3652#issuecomment-67885065
  
    Cool I just tested this on a Hadoop 2.4 cluster and it worked like a charm. I'm merging this into master thanks @sryza @vanzin.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/3652#issuecomment-66390771
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/24273/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/3652#issuecomment-67746658
  
      [Test build #24676 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/24676/consoleFull) for   PR 3652 at commit [`2791158`](https://github.com/apache/spark/commit/2791158c581a423f9c95008c96737d9c2e89c12f).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/3652#issuecomment-67744200
  
      [Test build #24676 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/24676/consoleFull) for   PR 3652 at commit [`2791158`](https://github.com/apache/spark/commit/2791158c581a423f9c95008c96737d9c2e89c12f).
     * This patch merges cleanly.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/3652#issuecomment-66383173
  
      [Test build #24273 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/24273/consoleFull) for   PR 3652 at commit [`17628f8`](https://github.com/apache/spark/commit/17628f8458c0a5f279af1ce621d8f7422ca148d9).
     * This patch merges cleanly.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3652#discussion_r22066685
  
    --- 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] = {
    +    // Generate modified racks and new set of hosts under it before issuing requests.
    +    val rackToCounts = new HashMap[String, Int]()
     
    -    def getAllocatedContainers(): JList[Container]
    +    for (container <- hostContainers) {
    +      val candidateHost = container.getNodes.last
    +      assert(YarnSparkHadoopUtil.ANY_HOST != candidateHost)
    +
    +      val rack = YarnSparkHadoopUtil.lookupRack(conf, candidateHost)
    +      if (rack != null) {
    +        var count = rackToCounts.getOrElse(rack, 0)
    +        count += 1
    +        rackToCounts.put(rack, count)
    +      }
    +    }
     
    -    def getAvailableResources(): Resource
    +    val requestedContainers = new ArrayBuffer[ContainerRequest](rackToCounts.size)
    +    for ((rack, count) <- rackToCounts) {
    +      requestedContainers ++= createResourceRequests(
    +        AllocationType.RACK,
    +        rack,
    +        count,
    +        RM_REQUEST_PRIORITY)
    +    }
     
    -    def getCompletedContainersStatuses(): JList[ContainerStatus]
    +    requestedContainers
    +  }
     
    +  private def addResourceRequests(numExecutors: Int): Unit = {
    +    val containerRequests: List[ContainerRequest] =
    +      if (numExecutors <= 0) {
    +        logDebug("numExecutors: " + numExecutors)
    +        List()
    +      } else if (preferredHostToCount.isEmpty) {
    +        logDebug("host preferences is empty")
    +        createResourceRequests(
    +          AllocationType.ANY,
    +          resource = null,
    +          numExecutors,
    +          RM_REQUEST_PRIORITY).toList
    +      } else {
    +        // Request for all hosts in preferred nodes and for numExecutors -
    +        // candidates.size, request by default allocation policy.
    +        val hostContainerRequests = new ArrayBuffer[ContainerRequest](preferredHostToCount.size)
    +        for ((candidateHost, candidateCount) <- preferredHostToCount) {
    +          val requiredCount = candidateCount - allocatedContainersOnHost(candidateHost)
    +
    +          if (requiredCount > 0) {
    +            hostContainerRequests ++= createResourceRequests(
    +              AllocationType.HOST,
    +              candidateHost,
    +              requiredCount,
    +              RM_REQUEST_PRIORITY)
    +          }
    +        }
    +        val rackContainerRequests: List[ContainerRequest] = createRackResourceRequests(
    +          hostContainerRequests).toList
    +
    +        val anyContainerRequests = createResourceRequests(
    +          AllocationType.ANY,
    +          resource = null,
    +          numExecutors,
    +          RM_REQUEST_PRIORITY)
    +
    +        val containerRequestBuffer = new ArrayBuffer[ContainerRequest](
    +          hostContainerRequests.size + rackContainerRequests.size + anyContainerRequests.size)
    +
    +        containerRequestBuffer ++= hostContainerRequests
    +        containerRequestBuffer ++= rackContainerRequests
    +        containerRequestBuffer ++= anyContainerRequests
    +        containerRequestBuffer.toList
    +      }
    +
    +    for (request <- containerRequests) {
    +      amClient.addContainerRequest(request)
    +    }
    +
    +    for (request <- containerRequests) {
    +      val nodes = request.getNodes
    +      val hostStr = if (nodes == null || nodes.isEmpty) {
    +        "Any"
    +      } else {
    +        nodes.last
    +      }
    +      logInfo("Container request (host: %s, priority: %s, capability: %s".format(
    +        hostStr,
    +        request.getPriority().getPriority,
    +        request.getCapability))
    +    }
    +  }
    +
    +  private def createResourceRequests(
    +      requestType: AllocationType.AllocationType,
    +      resource: String,
    +      numExecutors: Int,
    +      priority: Int)
    +    : ArrayBuffer[ContainerRequest] = {
    --- End diff --
    
    I would bump this up the previous 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3652#discussion_r21574918
  
    --- Diff: yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnRMClient.scala ---
    @@ -54,15 +82,45 @@ trait YarnRMClient {
        * @param status The final status of the AM.
        * @param diagnostics Diagnostics message to include in the final status.
        */
    -  def unregister(status: FinalApplicationStatus, diagnostics: String = ""): Unit
    +  def unregister(status: FinalApplicationStatus, diagnostics: String = ""): Unit = synchronized {
    +    if (registered) {
    +      amClient.unregisterApplicationMaster(status, diagnostics, uiHistoryAddress)
    --- End diff --
    
    (And by "you" I mean the person who wrote the original code you're moving around, a.k.a. probably "me".)


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3652#discussion_r21574615
  
    --- Diff: yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala ---
    @@ -17,7 +17,8 @@
     
     package org.apache.spark.deploy.yarn
     
    -import java.util.{List => JList}
    +import com.google.common.util.concurrent.ThreadFactoryBuilder
    --- End diff --
    
    nit: should go after java and scala imports.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by andrewor14 <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/3652


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3652#discussion_r22066707
  
    --- Diff: yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnRMClient.scala ---
    @@ -54,15 +82,45 @@ trait YarnRMClient {
        * @param status The final status of the AM.
        * @param diagnostics Diagnostics message to include in the final status.
        */
    -  def unregister(status: FinalApplicationStatus, diagnostics: String = ""): Unit
    +  def unregister(status: FinalApplicationStatus, diagnostics: String = ""): Unit = synchronized {
    +    if (registered) {
    +      amClient.unregisterApplicationMaster(status, diagnostics, uiHistoryAddress)
    +    }
    +  }
     
       /** Returns the attempt ID. */
    -  def getAttemptId(): ApplicationAttemptId
    +  def getAttemptId(): ApplicationAttemptId = {
    +    val containerIdString = System.getenv(ApplicationConstants.Environment.CONTAINER_ID.name())
    +    val containerId = ConverterUtils.toContainerId(containerIdString)
    +    containerId.getApplicationAttemptId()
    +  }
     
       /** Returns the configuration for the AmIpFilter to add to the Spark UI. */
    -  def getAmIpFilterParams(conf: YarnConfiguration, proxyBase: String): Map[String, String]
    +  def getAmIpFilterParams(conf: YarnConfiguration, proxyBase: String): Map[String, String] = {
    +    // Figure out which scheme Yarn is using. Note the method seems to have been added after 2.2,
    +    // so not all stable releases have it.
    +    val prefix = Try(classOf[WebAppUtils].getMethod("getHttpSchemePrefix", classOf[Configuration])
    +      .invoke(null, conf).asInstanceOf[String]).getOrElse("http://")
    +
    +    // If running a new enough Yarn, use the HA-aware API for retrieving the RM addresses.
    +    try {
    +      val method = classOf[WebAppUtils].getMethod("getProxyHostsAndPortsForAmFilter",
    +        classOf[Configuration])
    +      val proxies = method.invoke(null, conf).asInstanceOf[JList[String]]
    +      val hosts = proxies.map { proxy => proxy.split(":")(0) }
    +      val uriBases = proxies.map { proxy => prefix + proxy + proxyBase }
    +      Map("PROXY_HOSTS" -> hosts.mkString(","), "PROXY_URI_BASES" -> uriBases.mkString(","))
    +    } catch {
    +      case e: NoSuchMethodException =>
    +        val proxy = WebAppUtils.getProxyHostAndPort(conf)
    +        val parts = proxy.split(":")
    +        val uriBase = prefix + proxy + proxyBase
    +        Map("PROXY_HOST" -> parts(0), "PROXY_URI_BASE" -> uriBase)
    +    }
    +  }
     
       /** Returns the maximum number of attempts to register the AM. */
    -  def getMaxRegAttempts(conf: YarnConfiguration): Int
    +  def getMaxRegAttempts(conf: YarnConfiguration) =
    --- End diff --
    
    should keep return type


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3652#discussion_r22066595
  
    --- Diff: yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala ---
    @@ -51,13 +53,14 @@ object AllocationType extends Enumeration {
     // Refer to http://developer.yahoo.com/blogs/hadoop/posts/2011/03/mapreduce-nextgen-scheduler/ for
     // more info on how we are requesting for containers.
     
    +
    --- End diff --
    
    delete


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3652#discussion_r21574782
  
    --- Diff: yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnRMClient.scala ---
    @@ -17,19 +17,33 @@
     
     package org.apache.spark.deploy.yarn
     
    -import scala.collection.{Map, Set}
    +import java.util.{List => JList}
     
    -import org.apache.hadoop.yarn.conf.YarnConfiguration
    +import org.apache.hadoop.conf.Configuration
    +import org.apache.hadoop.yarn.api.ApplicationConstants
     import org.apache.hadoop.yarn.api.records._
    +import org.apache.hadoop.yarn.client.api.AMRMClient
    +import org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest
    +import org.apache.hadoop.yarn.conf.YarnConfiguration
    +import org.apache.hadoop.yarn.util.ConverterUtils
    +import org.apache.hadoop.yarn.webapp.util.WebAppUtils
     
    -import org.apache.spark.{SecurityManager, SparkConf, SparkContext}
    +import org.apache.spark.{Logging, SecurityManager, SparkConf}
     import org.apache.spark.scheduler.SplitInfo
    +import org.apache.spark.util.Utils
    +
    +import scala.collection.JavaConversions._
    --- End diff --
    
    nit: should be right after java imports.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/3652#issuecomment-67746661
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/24676/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the pull request:

    https://github.com/apache/spark/pull/3652#issuecomment-66383553
  
    I assume most here is just code motion, so I didn't pay that close attention to the changes in the container allocation code. If that's true, then this LGTM.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3652#discussion_r21574859
  
    --- Diff: yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnRMClient.scala ---
    @@ -54,15 +82,45 @@ trait YarnRMClient {
        * @param status The final status of the AM.
        * @param diagnostics Diagnostics message to include in the final status.
        */
    -  def unregister(status: FinalApplicationStatus, diagnostics: String = ""): Unit
    +  def unregister(status: FinalApplicationStatus, diagnostics: String = ""): Unit = synchronized {
    +    if (registered) {
    +      amClient.unregisterApplicationMaster(status, diagnostics, uiHistoryAddress)
    --- End diff --
    
    You forgot to set `registered` to `false`. But this check shouldn't really be necessary since `ApplicationMaster` already has this logic.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by sryza <gi...@git.apache.org>.
Github user sryza commented on the pull request:

    https://github.com/apache/spark/pull/3652#issuecomment-67744080
  
    Cool, updated patch reflects Marcelo and Andrew's comments.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/3652#issuecomment-66390767
  
      [Test build #24273 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/24273/consoleFull) for   PR 3652 at commit [`17628f8`](https://github.com/apache/spark/commit/17628f8458c0a5f279af1ce621d8f7422ca148d9).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/3652#issuecomment-67722849
  
    Just took a deeper look comparing the old code with the new code and couldn't find any glaring problems. I'll test and merge this once you address the comments.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/3652#issuecomment-67547581
  
    This looks fine on a first glance. I plan to take a detailed pass in the next day or two to make sure we didn't change any logic.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: SPARK-4447. Remove layers of abstraction in YA...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3652#discussion_r22067156
  
    --- Diff: yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala ---
    @@ -172,7 +173,7 @@ private[yarn] abstract class YarnAllocator(
           logDebug("Empty allocation request ...")
         }
     
    -    val allocateResponse = allocateContainers(missing, executorsPending)
    +    val allocateResponse = allocateContainers(missing)
    --- End diff --
    
    nice!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org