You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by andrey-tpt <gi...@git.apache.org> on 2017/07/13 11:53:39 UTC

[GitHub] spark pull request #18623: [SPARK-21374][CORE] Fix reading globbed paths fro...

GitHub user andrey-tpt opened a pull request:

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

    [SPARK-21374][CORE] Fix reading globbed paths from S3 into DF with disabled FS cache

    ## What changes were proposed in this pull request?
    
    SparkHadoopUtil.globPath method uses incorrect configuration to retrieve instance of org.apache.hadoop.fs.FileSystem.
     
    Accidentally, this can work correctly for two reasons:
     -  Filesystem cache is enabled by default for all filesystems which are derived from org.apache.hadoop.fs.FileSystem
     -  Configuration is not considered when instance of FileSystem is retrieved from the cache - it is not used to identify cache's key.  
    
    Therefore, incorrect configuration is omitted in SparkHadoopUtil.globPath and previously initialized instance of FileSystem is returned with correct configuration. 
    
    However, if filesystem caching is disabled (non-default behavior) incorrect configuration in SparkHadoopUtils.globPath is passed to org.apache.hadoop.fs.FileSystem.get() method what creates new instance of FileSystem with this incorrect configuration. 
    
    In this change two overloaded methods (globPath and globPathIfNecessary) are added to SparkHadoopUtil class which can receive up to date configuration from caller method. These two methods are used in DataSource class to read into DataFrame from globbed path. 
    
    ## How was this patch tested?
    ./dev/run-tests passed + example from SPARK-21374 was tested with patched jars.
    
    @zsxwing @liancheng 

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

    $ git pull https://github.com/andrey-tpt/spark globpath2

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

    https://github.com/apache/spark/pull/18623.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 #18623
    
----
commit 317bd1b63cc38e82bc1b09c53a68d4dd202aa4e8
Author: Andrey Taptunov <ta...@amazon.com>
Date:   2017-07-13T10:50:42Z

    [SPARK-21374][CORE] Fix reading globbed paths from S3 into DF with disabled FS cache

----


---
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 #18623: [SPARK-21374][CORE] Fix reading globbed paths from S3 in...

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

    https://github.com/apache/spark/pull/18623
  
    ok to test


---
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 #18623: [SPARK-21374][CORE] Fix reading globbed paths fro...

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

    https://github.com/apache/spark/pull/18623#discussion_r131283705
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala ---
    @@ -132,7 +132,7 @@ case class DataSource(
             val hdfsPath = new Path(path)
             val fs = hdfsPath.getFileSystem(hadoopConf)
             val qualified = hdfsPath.makeQualified(fs.getUri, fs.getWorkingDirectory)
    -        SparkHadoopUtil.get.globPathIfNecessary(qualified)
    +        SparkHadoopUtil.get.globPathIfNecessary(qualified, hadoopConf)
    --- End diff --
    
    Could you pass `FileSystem` into `globPathIfNecessary`?


---
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 #18623: [SPARK-21374][CORE] Fix reading globbed paths from S3 in...

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

    https://github.com/apache/spark/pull/18623
  
    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 #18623: [SPARK-21374][CORE] Fix reading globbed paths from S3 in...

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

    https://github.com/apache/spark/pull/18623
  
    Merged build finished. 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 issue #18623: [SPARK-21374][CORE] Fix reading globbed paths from S3 in...

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

    https://github.com/apache/spark/pull/18623
  
    **[Test build #79768 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/79768/testReport)** for PR 18623 at commit [`317bd1b`](https://github.com/apache/spark/commit/317bd1b63cc38e82bc1b09c53a68d4dd202aa4e8).


---
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 #18623: [SPARK-21374][CORE] Fix reading globbed paths fro...

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

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


---
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 #18623: [SPARK-21374][CORE] Fix reading globbed paths from S3 in...

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

    https://github.com/apache/spark/pull/18623
  
    **[Test build #79768 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/79768/testReport)** for PR 18623 at commit [`317bd1b`](https://github.com/apache/spark/commit/317bd1b63cc38e82bc1b09c53a68d4dd202aa4e8).
     * 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 issue #18623: [SPARK-21374][CORE] Fix reading globbed paths from S3 in...

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

    https://github.com/apache/spark/pull/18623
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/79768/
    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