You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by dongjoon-hyun <gi...@git.apache.org> on 2017/10/12 02:43:45 UTC
[GitHub] spark pull request #19477: [SPARK-22258][SQL] Writing empty dataset fails wi...
GitHub user dongjoon-hyun opened a pull request:
https://github.com/apache/spark/pull/19477
[SPARK-22258][SQL] Writing empty dataset fails with ORC format
## What changes were proposed in this pull request?
Since [SPARK-8501](https://issues.apache.org/jira/browse/SPARK-8501), Spark doesn't create an ORC file for empty data sets. However, [SPARK-21669](https://issues.apache.org/jira/browse/SPARK-21669) is trying to get the length of the written file at the end of writing tasks and fails with `FileNotFoundException`. This is a regression at 2.3.0 only. We had better fix this and have a test case to prevent future regression.
```scala
scala> Seq("str").toDS.limit(0).write.format("orc").save("/tmp/a")
17/10/11 19:28:59 ERROR Utils: Aborting task
java.io.FileNotFoundException: File file:/tmp/a/_temporary/0/_temporary/attempt_20171011192859_0000_m_000000_0/part-00000-aa56c3cf-ec35-48f1-bb73-23ad1480e917-c000.snappy.orc does not exist
at org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:611)
at org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:824)
at org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:601)
at org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:421)
at org.apache.spark.sql.execution.datasources.BasicWriteTaskStatsTracker.getFileSize(BasicWriteStatsTracker.scala:60)
```
## How was this patch tested?
Pass the newly added test cases.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dongjoon-hyun/spark SPARK-22258
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/19477.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 #19477
----
commit b545f281b19120cc2c9e4197cae4b1315969247d
Author: Dongjoon Hyun <do...@apache.org>
Date: 2017-10-12T02:38:51Z
[SPARK-22258][SQL] Writing empty dataset fails with ORC format
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #19477: [SPARK-22258][SQL] Writing empty dataset fails with ORC ...
Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:
https://github.com/apache/spark/pull/19477
@dongjoon-hyun This is kind of duplicate to #18979, although the viewpoint of the issue is different.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #19477: [SPARK-22258][SQL] Writing empty dataset fails with ORC ...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/19477
**[Test build #82654 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/82654/testReport)** for PR 19477 at commit [`b545f28`](https://github.com/apache/spark/commit/b545f281b19120cc2c9e4197cae4b1315969247d).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #19477: [SPARK-22258][SQL] Writing empty dataset fails with ORC ...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/19477
Merged build finished. Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #19477: [SPARK-22258][SQL] Writing empty dataset fails wi...
Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:
https://github.com/apache/spark/pull/19477#discussion_r144188789
--- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala ---
@@ -2050,4 +2050,12 @@ class SQLQuerySuite extends QueryTest with SQLTestUtils with TestHiveSingleton {
}
}
}
+
+ Seq("orc", "parquet", "csv", "json", "text").foreach { format =>
--- End diff --
+1
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #19477: [SPARK-22258][SQL] Writing empty dataset fails with ORC ...
Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:
https://github.com/apache/spark/pull/19477
Wow. There is a PR for that. Thank you for informing that, @viirya ! Then, it's good.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #19477: [SPARK-22258][SQL] Writing empty dataset fails wi...
Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/19477#discussion_r144186840
--- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala ---
@@ -2050,4 +2050,12 @@ class SQLQuerySuite extends QueryTest with SQLTestUtils with TestHiveSingleton {
}
}
}
+
+ Seq("orc", "parquet", "csv", "json", "text").foreach { format =>
--- End diff --
Maybe this test case is worth merging into. cc @steveloughran Shall we include this test into #18979?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #19477: [SPARK-22258][SQL] Writing empty dataset fails with ORC ...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/19477
**[Test build #82654 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/82654/testReport)** for PR 19477 at commit [`b545f28`](https://github.com/apache/spark/commit/b545f281b19120cc2c9e4197cae4b1315969247d).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #19477: [SPARK-22258][SQL] Writing empty dataset fails with ORC ...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/19477
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82654/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #19477: [SPARK-22258][SQL] Writing empty dataset fails wi...
Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun closed the pull request at:
https://github.com/apache/spark/pull/19477
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #19477: [SPARK-22258][SQL] Writing empty dataset fails with ORC ...
Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:
https://github.com/apache/spark/pull/19477
Hi, @gatorsmile and @cloud-fan .
This is a regression of SPARK-21669 (Internal API for collecting metrics/stats during FileFormatWriter jobs) at Spark 2.3.0. Could you review this PR?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org