use of com.tencent.angel.psagent.PSAgentAttemptId in project angel by Tencent.
the class AMPSAgent method addAndScheduleAttempt.
@SuppressWarnings("unchecked")
public void addAndScheduleAttempt() {
PSAgentAttempt attempt = new PSAgentAttempt(new PSAgentAttemptId(id, nextAttemptNumber), context);
attempts.put(attempt.getId(), attempt);
LOG.info("scheduling " + attempt.getId());
runningAttemptId = attempt.getId();
nextAttemptNumber++;
getContext().getEventHandler().handle(new PSAgentAttemptEvent(PSAgentAttemptEventType.PSAGENT_ATTEMPT_SCHEDULE, attempt.getId()));
}
use of com.tencent.angel.psagent.PSAgentAttemptId in project angel by Tencent.
the class ProtobufUtil method convertToId.
public static PSAgentAttemptId convertToId(PSAgentAttemptIdProto idProto) {
PSAgentAttemptId id = protoToPSAgentAttemptIdMap.get(idProto);
if (id == null) {
id = new PSAgentAttemptId(convertToId(idProto.getPsAgentId()), idProto.getAttemptIndex());
protoToPSAgentAttemptIdMap.put(idProto, id);
}
return id;
}
Aggregations