Like this: (Including the filter function)
JavaPairInputDStreamLongWritable, Text inputStream = ssc.fileStream(
testDir.toString(),
LongWritable.class,
Text.class,
TextInputFormat.class,
new FunctionPath, Boolean() {
@Override
public Boolean call(Path v1) throws Exception {
return Boolean.TRUE;
}
},
true);
Thanks
Best Regards
On Tue, Aug 11, 2015 at 1:10 AM, Ashish Soni asoni.le...@gmail.com wrote:
Please help as not sure what is incorrect with below code as it gives me
complilaton error in eclipse
SparkConf sparkConf = new
SparkConf().setMaster(local[4]).setAppName(JavaDirectKafkaWordCount);
JavaStreamingContext jssc = new
JavaStreamingContext(sparkConf, Durations.seconds(2));
*jssc.fileStream(/home/, String.class, String.class,
TextInputFormat.class);*