ResourceInstance createTaskAttemptResource(String clusterName,
      String workflowId, String jobId, String taskAttemptId) {
    Map<Resource.Type,String> mapIds = new HashMap<>();
    mapIds.put(Resource.Type.Cluster, clusterName);
    mapIds.put(Resource.Type.Workflow, workflowId);
    mapIds.put(Resource.Type.Job, jobId);
    mapIds.put(Resource.Type.TaskAttempt, taskAttemptId);
    return createResource(Resource.Type.TaskAttempt, mapIds);
  }
Create a task attempt resource instance.

@param clusterName
         cluster name
@param workflowId
         workflow id
@param jobId
         job id
@param taskAttemptId
         task attempt id

@return a task attempt resource instance
ambari-server/src/main/java/org/apache/ambari/server/api/services/TaskAttemptService.java