Prachicsa:
If the number of EC tokens is high, please consider using a set instead of
array for better lookup performance.
BTW use short, descriptive subject for future emails.
> On Sep 9, 2015, at 3:13 AM, Akhil Das wrote:
>
> Try this:
>
> val tocks =
Try this:
val tocks = Array("EC-17A5206955089011B","EC-17A5206955089011A")
val rddAll = sc.parallelize(List("This contains EC-17A5206955089011B","This
doesnt"))
rddAll.filter(line => {
var found = false
for(item <- tocks){
if(line.contains(item)) found = true
}
found