use of com.tencent.angel.protobuf.generated.MLProtos.PSFailedReportProto in project angel by Tencent.
the class ProtobufUtil method convert.
public static HashMap<PSLocation, Integer> convert(PSFailedReportsProto reportsProto) {
HashMap<PSLocation, Integer> reports = new HashMap<>();
List<PSFailedReportProto> reportList = reportsProto.getPsFailedReportsList();
int size = reportList.size();
for (int i = 0; i < size; i++) {
reports.put(new PSLocation(convertToId(reportList.get(i).getPsLoc().getPsId()), convert(reportList.get(i).getPsLoc().getLocation())), reportList.get(i).getFailedCounter());
}
return reports;
}
Aggregations