Hi All I am running below code before calling foreach i did 3
transformation using MapTopair. In my application there are 16 executed but
no executed running anything.

rddWithscore.foreach(new
VoidFunction<Tuple2<VendorRecord,Map<Integer,Double>>>() {

@Override
public void call(Tuple2<VendorRecord, Map<Integer, Double>> t)
throws Exception {
 Entry<Integer, Double> maxEntry = null;

for(Entry<Integer, Double> entry : t._2.entrySet()) {
    if (maxEntry == null || entry.getValue() > maxEntry.getValue()) {
        maxEntry = entry;
       // updateVendorData(maxEntry.getKey());

    }
    log.info("for vendor :"+ t._1.getVendorId()+"matched company
is"+maxEntry.getKey());
}
}


});

Reply via email to