hdfs - Spark Streaming program to process a file with more than 10 lines -


i need solve problem program should process files have lines greater 10.

below code:

val sparkconf = new sparkconf().setappname("spooldirspark") val ssc = new streamingcontext(sparkconf, seconds(2))  val lines = ssc   .filestream[longwritable, text, textinputformat]("hdfs:///loclahost:8020/avin")   .map{ case (x, y) => (x.tostring, y.tostring) }  val data = lines.count()   ssc.start() ssc.awaittermination() 


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -