daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import com.mongodb.spark.MongoSpark
  2.    import com.mongodb.spark.config.ReadConfig
  3.    import org.apache.spark.sql.SQLContext
  4.    import org.apache.spark.streaming.rabbitmq.RabbitMQUtils
  5.    import org.apache.spark.streaming.{Seconds, StreamingContext}
  6.    import org.apache.spark.{SparkConf, SparkContext}
  7.    val receiverStream = RabbitMQUtils.createStream(ssc, Map(
  8.        "hosts" ->  "",
  9.        "queueName" -> "",
  10.        "vHost" -> "/",
  11.        "userName" -> "guest",
  12.        "password" -> "guest"
  13.     ))
  14.    
  15. receiverStream.foreachRDD(rdd => {
  16.     if (!rdd.isEmpty()) {
  17.     imeis              =['121312312','1231231231']
  18.     val filtermap     = rdd.filter(x => x("imei") in imeis) // Not working
  19.    }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top