-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-14028][STREAMING][KINESIS][TESTS] Remove deprecated methods; fix two other warnings #11850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ trait KinesisFunSuite extends SparkFunSuite { | |
if (shouldRunTests) { | ||
body | ||
} else { | ||
ignore(s"$message [enable by setting env var $envVarNameForEnablingTests=1]")() | ||
ignore(s"$message [enable by setting env var $envVarNameForEnablingTests=1]")(()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without the |
||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,14 +99,10 @@ abstract class KinesisStreamTests(aggregateTestData: Boolean) extends KinesisFun | |
} | ||
|
||
test("KinesisUtils API") { | ||
// Tests the API, does not actually test data receiving | ||
val kinesisStream1 = KinesisUtils.createStream(ssc, "mySparkStream", | ||
dummyEndpointUrl, Seconds(2), | ||
InitialPositionInStream.LATEST, StorageLevel.MEMORY_AND_DISK_2) | ||
val kinesisStream2 = KinesisUtils.createStream(ssc, "myAppNam", "mySparkStream", | ||
val kinesisStream1 = KinesisUtils.createStream(ssc, "myAppName", "mySparkStream", | ||
dummyEndpointUrl, dummyRegionName, | ||
InitialPositionInStream.LATEST, Seconds(2), StorageLevel.MEMORY_AND_DISK_2) | ||
val kinesisStream3 = KinesisUtils.createStream(ssc, "myAppNam", "mySparkStream", | ||
val kinesisStream2 = KinesisUtils.createStream(ssc, "myAppName", "mySparkStream", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This |
||
dummyEndpointUrl, dummyRegionName, | ||
InitialPositionInStream.LATEST, Seconds(2), StorageLevel.MEMORY_AND_DISK_2, | ||
dummyAWSAccessKey, dummyAWSSecretKey) | ||
|
@@ -154,7 +150,9 @@ abstract class KinesisStreamTests(aggregateTestData: Boolean) extends KinesisFun | |
|
||
// Verify that KinesisBackedBlockRDD is generated even when there are no blocks | ||
val emptyRDD = kinesisStream.createBlockRDD(time, Seq.empty) | ||
emptyRDD shouldBe a [KinesisBackedBlockRDD[Array[Byte]]] | ||
// Verify it's KinesisBackedBlockRDD[_] rather than KinesisBackedBlockRDD[Array[Byte]], because | ||
// the type parameter will be erased at runtime | ||
emptyRDD shouldBe a [KinesisBackedBlockRDD[_]] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
emptyRDD.partitions shouldBe empty | ||
|
||
// Verify that the KinesisBackedBlockRDD has isBlockValid = false when blocks are invalid | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
JavaDStream
is created by the deprecated & removedcreateStream
method; so let's switch to anothercreateStream
method.