spark ssc.textFileStream is not streamining any files from directory

后端 未结 6 1541
醉酒成梦
醉酒成梦 2020-12-03 08:13

I am trying to execute below code using eclipse (with maven conf) with 2 worker and each have 2 core or also tried with spark-submit.

public class StreamingW         


        
6条回答
  •  孤街浪徒
    2020-12-03 08:31

    JavaDoc suggests function only streams new files.

    Ref: https://spark.apache.org/docs/1.0.1/api/java/org/apache/spark/streaming/api/java/JavaStreamingContext.html#textFileStream(java.lang.String)

    Create an input stream that monitors a Hadoop-compatible filesystem for new files and reads them as text files (using key as LongWritable, value as Text and input format as TextInputFormat). Files must be written to the monitored directory by "moving" them from another location within the same file system. File names starting with . are ignored.

提交回复
热议问题