You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by tanejagagan <gi...@git.apache.org> on 2017/02/23 07:39:05 UTC

[GitHub] spark pull request #17035: [SPARK-19705][SQL] Preferred location supporting ...

GitHub user tanejagagan opened a pull request:

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

    [SPARK-19705][SQL] Preferred location supporting HDFS cache for FileS\u2026

    \u2026canRDD
    
    Added support of HDFS cache using TaskLocation.inMemoryLocationTag
    NewHadoopRDD and HadoopRDD both support HDFS cache using TaskLocation.inMemoryLocationTag
    where "hdfs_cache_" is added to hostname which is then interpretted by scheduler
    With this enhacement same tag ("hdfs_cache_") will be added to hostname if FilePartition only contains single file and the file is cached on one or more host
    Current implementation would not cased where FilePartition would have multiple files as preferredLocation calculation is more complex.
    
    ## What changes were proposed in this pull request?
    
    (Please fill in changes proposed in this fix)
    
    ## How was this patch tested?
    
    (Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
    (If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
    
    Please review http://spark.apache.org/contributing.html before opening a pull request.


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

    $ git pull https://github.com/tanejagagan/spark branch-19705

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

    https://github.com/apache/spark/pull/17035.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 #17035
    
----
commit a9288e56f30f7d9f051e06502171d7f2639913a7
Author: gagan taneja <ta...@gagans-macbook-pro.local>
Date:   2017-02-23T07:26:36Z

    [SPARK-19705][SQL] Preferred location supporting HDFS cache for FileScanRDD
    
    Added support of HDFS cache using TaskLocation.inMemoryLocationTag
    NewHadoopRDD and HadoopRDD both support HDFS cache using TaskLocation.inMemoryLocationTag
    where "hdfs_cache_" is added to hostname which is then interpretted by scheduler
    With this enhacement same tag ("hdfs_cache_") will be added to hostname if FilePartition only contains single file and the file is cached on one or more host
    Current implementation would not cased where FilePartition would have multiple files as preferredLocation calculation is more complex.

----


---
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 issue #17035: [SPARK-19705][SQL] Preferred location supporting HDFS ca...

Posted by highfei2011 <gi...@git.apache.org>.
Github user highfei2011 commented on the issue:

    https://github.com/apache/spark/pull/17035
  
    PreferredLocation calculation is more complex, reflected in the code which part of it?


---
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 issue #17035: [SPARK-19705][SQL] Preferred location supporting HDFS ca...

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

    https://github.com/apache/spark/pull/17035
  
    Can one of the admins verify this patch?


---
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 issue #17035: [SPARK-19705][SQL] Preferred location supporting HDFS ca...

Posted by tanejagagan <gi...@git.apache.org>.
Github user tanejagagan commented on the issue:

    https://github.com/apache/spark/pull/17035
  
    @hvanhovell 
    Can you help me with this pull request


---
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 #17035: [SPARK-19705][SQL] Preferred location supporting ...

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

    https://github.com/apache/spark/pull/17035#discussion_r128637990
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileScanRDD.scala ---
    @@ -205,7 +208,13 @@ class FileScanRDD(
     
       override protected def getPreferredLocations(split: RDDPartition): Seq[String] = {
         val files = split.asInstanceOf[FilePartition].files
    -
    +    if (files.size == 1) {
    +      val cachedLocations = files.head.cachedLocations.map(HDFSCacheTaskLocation(_).toString)
    +      val nonCachedLocations = files.head.locations.filterNot { x =>
    +          files.head.cachedLocations.contains(x)
    +        }.map(HostTaskLocation(_).toString)
    +      return cachedLocations ++ nonCachedLocations
    --- End diff --
    
    Is it possible to rewrite this to avoid using return? thanks.


---
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 issue #17035: [SPARK-19705][SQL] Preferred location supporting HDFS ca...

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

    https://github.com/apache/spark/pull/17035
  
    Can one of the admins verify this patch?


---

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


[GitHub] spark issue #17035: [SPARK-19705][SQL] Preferred location supporting HDFS ca...

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

    https://github.com/apache/spark/pull/17035
  
    Can one of the admins verify this patch?


---

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


[GitHub] spark issue #17035: [SPARK-19705][SQL] Preferred location supporting HDFS ca...

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

    https://github.com/apache/spark/pull/17035
  
    Can one of the admins verify this patch?


---

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