Hi, I am trying to do some tasks with the following style map function:
rdd.map { e =>
val a = new Array[Int](100)
...Some calculation...
}
But here the array a is really just used as a temporary buffer and can be
reused. I am wondering if I can avoid constructing it everytime? (As it
might incur some overhead for JVM?) Would use an array outside the closure
work?
Thank you!
Best,
Wenlei
