Attempt mergedAttempt;
if (!taskAttemptIdToAttempt.containsKey(attempt.getTaskAttemptId().toString()))
{
mergedAttempt = new Attempt();
mergedAttempt.setCounters(new HashMap<CharSequence,Long>());
mergedAttempt.setDerived(new DerivedAttemptData());
taskAttemptIdToAttempt.put(attempt.getTaskAttemptId().toString(),mergedAttempt);
}
else
{
mergedAttempt = taskAttemptIdToAttempt.get(attempt.getTaskAttemptId().toString());