Repository: spark Updated Branches: refs/heads/master 08d644127 -> 5c6bcdbda
[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. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/5c6bcdbd Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/5c6bcdbd Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/5c6bcdbd Branch: refs/heads/master Commit: 5c6bcdbda4dd23bbd112a7395cd9d1cfd04cf4bb Parents: 08d6441 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:38 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/5c6bcdbd/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/5c6bcdbd/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/5c6bcdbd/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]
