You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Jeetendra Gangele <ga...@gmail.com> on 2015/04/11 04:34:31 UTC
foreach going in infinite loop
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());
}
}
});