def run_job(rdd, f, partitions=nil, allow_local=false)
      run_job_with_command(rdd, partitions, allow_local, Spark::Command::MapPartitions, f)
    end
def run_job(rdd, f, partitions=nil, allow_local=false)
      run_job_with_command(rdd, partitions, allow_local, Spark::Command::MapPartitions, f)
    end
Executes the given partition function f on the specified set of partitions,
 returning the result as an array of elements.

 If partitions is not specified, this will run over all partitions.

 == Example:
   rdd = $sc.parallelize(0..10, 5)
   $sc.run_job(rdd, lambda{|x| x.to_s}, [0,2])
   # => ["[0, 1]", "[4, 5]"]