diff options
author | Tathagata Das <tathagata.das1565@gmail.com> | 2016-12-06 21:51:38 -0800 |
---|---|---|
committer | Tathagata Das <tathagata.das1565@gmail.com> | 2016-12-06 21:51:38 -0800 |
commit | 5c6bcdbda4dd23bbd112a7395cd9d1cfd04cf4bb (patch) | |
tree | 5f964db9274b3db9e79859f4247180b3c6970443 /external/kafka-0-10-sql/src | |
parent | 08d6441278cc7d2cedf65165bb676538834c2470 (diff) | |
download | spark-5c6bcdbda4dd23bbd112a7395cd9d1cfd04cf4bb.tar.gz spark-5c6bcdbda4dd23bbd112a7395cd9d1cfd04cf4bb.tar.bz2 spark-5c6bcdbda4dd23bbd112a7395cd9d1cfd04cf4bb.zip |
[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 <tathagata.das1565@gmail.com>
Closes #16183 from tdas/SPARK-18671-1.
Diffstat (limited to 'external/kafka-0-10-sql/src')
2 files changed, 3 insertions, 1 deletions
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 0000000000..6410031743 --- /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}} 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 c8326ffcc7..22668fd6fa 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) } } |