Github user zsxwing commented on a diff in the pull request:
https://github.com/apache/spark/pull/8954#discussion_r42003729
--- Diff:
extras/kinesis-asl/src/test/java/org/apache/spark/streaming/kinesis/JavaKinesisStreamSuite.java
---
@@ -33,9 +35,26 @@
public void testKinesisStream() {
// Tests the API, does not actually test data receiving
JavaDStream<byte[]> kinesisStream = KinesisUtils.createStream(ssc,
"mySparkStream",
- "https://kinesis.us-west-2.amazonaws.com", new Duration(2000),
+ "https://kinesis.us-west-2.amazonaws.com", new Duration(2000),
InitialPositionInStream.LATEST, StorageLevel.MEMORY_AND_DISK_2());
-
+
+ ssc.stop();
+ }
+
+ @Test
+ public void testCustomHandler() {
+ Function<Record, Integer> handler = new Function<Record, Integer>() {
--- End diff --
You need to move this function outside `JavaKinesisStreamSuite` to make the
task serializable.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]