Repository: spark Updated Branches: refs/heads/branch-2.1 9b5bc2a6a -> 3750c6e9b
[SPARK-18671][SS][TEST-MAVEN] Follow up PR to fix test for Maven ## What changes were proposed in this pull request? Maven compilation seem to not allow resource is sql/test to be easily referred to in kafka-0-10-sql tests. So moved the kafka-source-offset-version-2.1.0 from sql test resources to kafka-0-10-sql test resources. ## How was this patch tested? Manually ran maven test Author: Tathagata Das <[email protected]> Closes #16183 from tdas/SPARK-18671-1. (cherry picked from commit 5c6bcdbda4dd23bbd112a7395cd9d1cfd04cf4bb) Signed-off-by: Tathagata Das <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/3750c6e9 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/3750c6e9 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/3750c6e9 Branch: refs/heads/branch-2.1 Commit: 3750c6e9b580be0f2e25f691a1fd582f1b7e430a Parents: 9b5bc2a Author: Tathagata Das <[email protected]> Authored: Tue Dec 6 21:51:38 2016 -0800 Committer: Tathagata Das <[email protected]> Committed: Tue Dec 6 21:51:52 2016 -0800 ---------------------------------------------------------------------- .../src/test/resources/kafka-source-offset-version-2.1.0.txt | 1 + .../org/apache/spark/sql/kafka010/KafkaSourceOffsetSuite.scala | 3 ++- .../structured-streaming/kafka-source-offset-version-2.1.0.txt | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/3750c6e9/external/kafka-0-10-sql/src/test/resources/kafka-source-offset-version-2.1.0.txt ---------------------------------------------------------------------- diff --git a/external/kafka-0-10-sql/src/test/resources/kafka-source-offset-version-2.1.0.txt b/external/kafka-0-10-sql/src/test/resources/kafka-source-offset-version-2.1.0.txt new file mode 100644 index 0000000..6410031 --- /dev/null +++ b/external/kafka-0-10-sql/src/test/resources/kafka-source-offset-version-2.1.0.txt @@ -0,0 +1 @@ +{"topic1":{"0":456,"1":789},"topic2":{"0":0}} http://git-wip-us.apache.org/repos/asf/spark/blob/3750c6e9/external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaSourceOffsetSuite.scala ---------------------------------------------------------------------- diff --git a/external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaSourceOffsetSuite.scala b/external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaSourceOffsetSuite.scala index c8326ff..22668fd 100644 --- a/external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaSourceOffsetSuite.scala +++ b/external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaSourceOffsetSuite.scala @@ -98,7 +98,8 @@ class KafkaSourceOffsetSuite extends OffsetSuite with SharedSQLContext { private def readFromResource(file: String): SerializedOffset = { import scala.io.Source - val str = Source.fromFile(getClass.getResource(s"/structured-streaming/$file").toURI).mkString + val input = getClass.getResource(s"/$file").toURI + val str = Source.fromFile(input).mkString SerializedOffset(str) } } http://git-wip-us.apache.org/repos/asf/spark/blob/3750c6e9/sql/core/src/test/resources/structured-streaming/kafka-source-offset-version-2.1.0.txt ---------------------------------------------------------------------- diff --git a/sql/core/src/test/resources/structured-streaming/kafka-source-offset-version-2.1.0.txt b/sql/core/src/test/resources/structured-streaming/kafka-source-offset-version-2.1.0.txt deleted file mode 100644 index 6410031..0000000 --- a/sql/core/src/test/resources/structured-streaming/kafka-source-offset-version-2.1.0.txt +++ /dev/null @@ -1 +0,0 @@ -{"topic1":{"0":456,"1":789},"topic2":{"0":0}} --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
