spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kartheek.R" <kartheek.m...@gmail.com>
Subject Re: RDDs
Date Tue, 03 Mar 2015 12:00:12 GMT
Hi TD,
"You can always run two jobs on the same cached RDD, and they can run in
parallel (assuming you launch the 2 jobs from two different threads)"

Is this a correct way to launch jobs from two different threads?

val threadA = new Thread(new Runnable { 
      def run() {
      for(i<- 0 until end)
      {  
        val numAs = logData.filter(line => line.contains("a")) 
        println("Lines with a: %s".format(numAs.count)) 
      } 
     } 
    }) 
    
   val threadB = new Thread(new Runnable { 
      def run() { 
      for(i<- 0 until end)
      {
        val numBs = logData.filter(line => line.contains("b")) 
        println("Lines with b: %s".format(numBs.count)) 
      }
      } 
    }) 
    



--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/RDDs-tp13343p21892.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message