I have written below code to connect to kinesis from spark streaming but there is no data been received.
val kinesisStream = KinesisUtils.createStream(ssc, appName, streamName, endpointUrl, regionName, InitialPositionInStream.LATEST, batchInterval , StorageLevel.MEMORY_AND_DISK_2)
kinesisStream.print() // nothing getting printed here
val data = kinesisStream.flatMap(byteArray => new String(byteArray))
data.foreachRDD { rdd =>
println("data==" + rdd.collect().length) // no data here too
rdd.collect()//.saveAsTextFile("file:///home/myHome/Code/sample/somedata.txt");
}
I tried to write into S3 and to file system, it writes file name by folder and in side that I see only _SUCCESS file which is of zero byte.
by the way, I can able to write to same kinesis stream and read data from java
what is the issue here.