Yes.. I solved this problem using fileStream instead of textfile
StreamingContext scc = new StreamingContext(conf, new Duration(10000));
ClassTag <LongWritable> k = ClassTag$.MODULE$.apply(LongWritable.class);
ClassTag <Text> v = ClassTag$.MODULE$.apply(Text.class);
//ClassTag <InputFormat<LongWritable,Text>> t =
(ClassTag<InputFormat<LongWritable,Text>>)(Object)ClassTag$.MODULE$.apply(InputFormat.class);
ClassTag <TextInputFormat> t =
ClassTag$.MODULE$.apply(TextInputFormat.class);
InputDStream<Tuple2<LongWritable,Text>> ans = scc.fileStream("/../test",
f, false, k, v, t);
ans.print();
scc.start();
scc.awaitTermination();
--
View this message in context:
http://apache-spark-user-list.1001560.n3.nabble.com/Spark-Streaming-tp14306p16435.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]