Do we need to do this for each rdd that is created ? Or is it done once ?
If former, then maybe move it to RDD.scala ? If latter, then move it to SparkContext ?

Also, is it the same for yarn and non-yarn codepaths ?
What about non hadoop deployment (mesos, standalone) ?