You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by fjh100456 <gi...@git.apache.org> on 2018/09/13 11:49:01 UTC

[GitHub] spark pull request #22412: [SPARK-25404][SQL] Staging path may not on the ex...

GitHub user fjh100456 opened a pull request:

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

    [SPARK-25404][SQL] Staging path may not on the expected place when table path contains the stagingDir string

    ## What changes were proposed in this pull request?
    As described in [#SPARK-25404](https://issues.apache.org/jira/browse/SPARK-25404),  staging path may not on the right place we expect. I'm not quiet sure  in which case the `inputPathName` contains the `stagingDir`, but it seems `new Path(inputPathName, stagingDir).toString`  is enough.
    ```scala
        var stagingPathName: String =
          if (inputPathName.indexOf(stagingDir) == -1) {
            new Path(inputPathName, stagingDir).toString
          } else {
            inputPathName.substring(0, inputPathName.indexOf(stagingDir) + stagingDir.length)
          }
    ```
    
    ## How was this patch tested?
    Manually test with debug mode, and check the staging files on right path.
    


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

    $ git pull https://github.com/fjh100456/spark master-StagingDir

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

    https://github.com/apache/spark/pull/22412.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 #22412
    
----
commit a6d48558111b6968919a692f6b2d8a9095fc64a4
Author: fjh100456 <fu...@...>
Date:   2018-09-13T11:28:12Z

    [SPARK-25404][SQL] Staging path may not on the expected place when table path contains the stagingDir string
    
    ## What changes were proposed in this pull request?
    Fix Staging path.
    
    ## How was this patch tested?
    Manual test.

----


---

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


[GitHub] spark issue #22412: [SPARK-25404][SQL] Staging path may not on the expected ...

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

    https://github.com/apache/spark/pull/22412
  
    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 #22412: [SPARK-25404][SQL] Staging path may not on the expected ...

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

    https://github.com/apache/spark/pull/22412
  
    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 #22412: [SPARK-25404][SQL] Staging path may not on the expected ...

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

    https://github.com/apache/spark/pull/22412
  
    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 #22412: [SPARK-25404][SQL] Staging path may not on the expected ...

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

    https://github.com/apache/spark/pull/22412
  
    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 #22412: [SPARK-25404][SQL] Staging path may not on the expected ...

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

    https://github.com/apache/spark/pull/22412
  
    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 pull request #22412: [SPARK-25404][SQL] Staging path may not on the ex...

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

    https://github.com/apache/spark/pull/22412#discussion_r217613124
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/SaveAsHiveFile.scala ---
    @@ -217,12 +217,7 @@ private[hive] trait SaveAsHiveFile extends DataWritingCommand {
         val inputPathUri: URI = inputPath.toUri
         val inputPathName: String = inputPathUri.getPath
         val fs: FileSystem = inputPath.getFileSystem(hadoopConf)
    -    var stagingPathName: String =
    --- End diff --
    
    Yes, I had checked the pr [#12770](https://github.com/apache/spark/pull/12770/files) too. But I'm not very clear why we should do like that.


---

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


[GitHub] spark issue #22412: [SPARK-25404][SQL] Staging path may not on the expected ...

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

    https://github.com/apache/spark/pull/22412
  
    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 #22412: [SPARK-25404][SQL] Staging path may not on the expected ...

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

    https://github.com/apache/spark/pull/22412
  
    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 #22412: [SPARK-25404][SQL] Staging path may not on the expected ...

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

    https://github.com/apache/spark/pull/22412
  
    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 #22412: [SPARK-25404][SQL] Staging path may not on the expected ...

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

    https://github.com/apache/spark/pull/22412
  
    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 #22412: [SPARK-25404][SQL] Staging path may not on the expected ...

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

    https://github.com/apache/spark/pull/22412
  
    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 #22412: [SPARK-25404][SQL] Staging path may not on the expected ...

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

    https://github.com/apache/spark/pull/22412
  
    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 pull request #22412: [SPARK-25404][SQL] Staging path may not on the ex...

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

    https://github.com/apache/spark/pull/22412#discussion_r217431206
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/SaveAsHiveFile.scala ---
    @@ -217,12 +217,7 @@ private[hive] trait SaveAsHiveFile extends DataWritingCommand {
         val inputPathUri: URI = inputPath.toUri
         val inputPathName: String = inputPathUri.getPath
         val fs: FileSystem = inputPath.getFileSystem(hadoopConf)
    -    var stagingPathName: String =
    --- End diff --
    
    This code is introduced form https://github.com/apache/spark/pull/12770, do you check the relative UT? Maybe UT relating with SessionState and DDLSuite.


---

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


[GitHub] spark issue #22412: [SPARK-25404][SQL] Staging path may not on the expected ...

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

    https://github.com/apache/spark/pull/22412
  
    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 #22412: [SPARK-25404][SQL] Staging path may not on the expected ...

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

    https://github.com/apache/spark/pull/22412
  
    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 #22412: [SPARK-25404][SQL] Staging path may not on the expected ...

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

    https://github.com/apache/spark/pull/22412
  
    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