title: Spark doesnt print outputs on the console within the map function
body: <p>I have  a simple Spark application running on cluster mode.</p>
  
  <pre><code>val funcGSSNFilterHeader = (x: String) =&gt; {
      println(!x.contains("servedMSISDN")   
      !x.contains("servedMSISDN")
  }
  
  val ssc = new StreamingContext(sc, Seconds(batchIntervalSeconds))
  val ggsnFileLines = ssc.fileStream[LongWritable, Text, TextInputFormat]("C:\\Users\\Mbazarganigilani\\Documents\\RA\\GGSN\\Files1", filterF, false)
  val ggsnArrays = ggsnFileLines
      .map(x =&gt; x._2.toString()).filter(x =&gt; funcGSSNFilterHeader(x))
  
  ggsnArrays.foreachRDD(s =&gt; {println(x.toString()})
  </code></pre>
  
  <p>I need to print !x.contains("servedMSISDN") inside the map function for debugging purposes, but this doesn't print on the console</p>