How about:
JavaPairDStream<LongWritable, Text> input =
jssc.fileStream(inputDirectory, LongWritable.class, Text.class,
TextInputFormat.class);
See the complete example over here
<https://github.com/databricks/learning-spark/blob/98c4d57f3a611269823c53d9249ab4fbb3065a0c/src/main/java/com/oreilly/learningsparkexamples/java/logs/ReadTransferStats.java>
Thanks
Best Regards
On Tue, Apr 28, 2015 at 11:32 AM, lokeshkumar <[email protected]> wrote:
>
> Hi Forum
>
> I am facing below compile error when using the fileStream method of the
> JavaStreamingContext class.
> I have copied the code from JavaAPISuite.java test class of spark test
> code.
>
> The error message is
>
>
> ====================================================================================
> The method fileStream(String, Class<K>, Class<V>, Class<F>,
> Function<Path,Boolean>, boolean) in the type JavaStreamingContext is not
> applicable for the arguments (String, Class<LongWritable>, Class<Text>,
> Class<TextInputFormat>, new Function<Path,Boolean>(){}, boolean)
>
> ====================================================================================
>
> Please help me to find a solution for this.
>
> <http://apache-spark-user-list.1001560.n3.nabble.com/file/n22683/47.png>
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/Spark-1-3-1-JavaStreamingContext-fileStream-compile-error-tp22683.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>