val weights_per_make_tuple=cars_info.map(x=>(x.make.toString,x.Weight.toInt)).take(2)
weights_per_make_tuple = Array((amc,3850), (amc,2648))
[(amc,3850), (amc,2648)]
val weights_per_make=weights_per_make_tuple.reduceByKey(+).collect
Name: Compile Error
Message: :37: error: value reduceByKey is not a member of Array[(String, Int)]
** val weights_per_make=weights_per_make_tuple.reduceByKey(+).collect**
where as its working in this case
val x=sc.parallelize(Array((“amc”,3850), (“amc”,2648)))
x.reduceByKey(+).collect
can any one help
^