Github user yssharma commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17506#discussion_r109304601
  
    --- Diff: 
external/kinesis-asl/src/test/java/org/apache/spark/streaming/kinesis/JavaKinesisStreamSuite.java
 ---
    @@ -50,48 +56,86 @@ public void testAwsCreds() {
         String dummyRegionName = 
KinesisTestUtils.getRegionNameByEndpoint(dummyEndpointUrl);
     
         // Tests the API, does not actually test data receiving
    -    JavaDStream<byte[]> kinesisStream = KinesisUtils.createStream(ssc, 
"myAppName", "mySparkStream",
    -        dummyEndpointUrl, dummyRegionName, InitialPositionInStream.LATEST, 
new Duration(2000),
    -        StorageLevel.MEMORY_AND_DISK_2(), "fakeAccessKey", 
"fakeSecretKey");
    +    BasicCredentials credentials = new BasicCredentials("fakeAccessKey", 
"fakeSecretKey");
    +
    +    KinesisInputDStream<byte[]> kinesisStream = 
KinesisInputDStream.builder().streamingContext(ssc)
    +            .checkpointAppName("myAppName")
    +            .streamName("mySparkStream")
    +            .endpointUrl(dummyEndpointUrl)
    +            .regionName(dummyRegionName)
    +            .initialPositionInStream(InitialPositionInStream.LATEST)
    +            .checkpointInterval(new Duration(2000))
    +            .storageLevel(StorageLevel.MEMORY_AND_DISK_2())
    +            .kinesisCredentials(credentials)
    +            .build();
    +
         ssc.stop();
       }
     
    -  private static Function<Record, String> handler = new Function<Record, 
String>() {
    +  public static Function1<Record, String> handler = new 
AbstractFunction1<Record, String>() {
    --- End diff --
    
    I will add more testcases for the deprecated API function createStream


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to