Scala : List data structure element removal

Objective –   Implement the function tail for removing the first element of a List. Solution –  object patternmatcing extends App { sealed trait List[+A] // deifine trait list with sealed i.e all functions ust be declared here case object Nil extends List[Nothing] // case object case class Cons[+A](head: A, tail: List[A]) extends List[A] // case… Read More Scala : List data structure element removal

Spark Streaming :- Word Counts in a folder for text files

Hi,   In this blog i will write a program for spark streaming which will read textfiles in a folder on regular basis and print the word counts program as follows imp :- i use maven in this( u can find mavan dependency in my previous post) import org.apache.spark.SparkConf import org.apache.spark.storage.StorageLevel import org.apache.spark.streaming._ import org.apache.spark.streaming.StreamingContext._… Read More Spark Streaming :- Word Counts in a folder for text files