Retrieve the list of logs stored in S3 for a specific task

@param taskId
The task ID to search for

@return
A collection of {@link SingularityS3Log}
541178
public Collection<SingularityS3Log> getTaskLogs(String taskId) {
    final Function<String, String> requestUri = (host) -> String.format(S3_LOG_GET_TASK_LOGS, getApiBase(host), taskId);

    final String type = String.format("S3 logs for task %s", taskId);

    return getCollection(requestUri, type, S3_LOG_COLLECTION);
  }
48814
public List<Integer> getComponentTasks(String componentId) {
    List<Integer> retVal = new LinkedList<>();
    for (Map.Entry<Integer, String> entry : taskToComponentMap.entrySet()) {
      if (entry.getValue().equals(componentId)) {
        retVal.add(entry.getKey());
      }
    }
    return retVal;
  }
655473
public static String extractTaskID(String path, String identifier) {
    LOG.debug("extract task id for {}", path);
    if (path.contains(HADOOP_ATTEMPT)) {
      String prf = path.substring(path.indexOf(HADOOP_ATTEMPT));
      if (prf.contains("/")) {
        return TaskAttemptID.forName(prf.substring(0, prf.indexOf("/"))).toString();
      }
      return TaskAttemptID.forName(prf).toString();
    } else if (identifier != null && path.contains(identifier)) {
      int ind = path.indexOf(identifier);
      String prf = path.substring(ind + identifier.length());
      int boundary = prf.length();
      if (prf.indexOf("/") > 0) {
        boundary = prf.indexOf("/");
      }
      String taskID =  prf.substring(0, boundary);
      LOG.debug("extracted task id {} for {}", taskID, path);
      return taskID;
    }
    return null;
  }
585866
public static syslog_generic[] get(nitro_service client) throws Exception
	{
		syslog_generic resource = new syslog_generic();
		resource.validate("get");
		return (syslog_generic[]) resource.get_resources(client);
	}
552103
public String getComponentId(int taskId) {
    if (taskToComponentMap.containsKey(taskId)) {
      return taskToComponentMap.get(taskId);
    } else {
      return null;
    }
  }
348382
public List<TaskState> getTaskStates() {
    return ImmutableList.<TaskState>builder().addAll(this.taskStates.values()).build();
  }
827865
def text_filepaths_for_task(self, tmp_dir, task_id):
    
    assert task_id >= 0
    assert task_id < self.num_train_shards + self.num_dev_shards
    if task_id < self.num_train_shards:
      return [
          f for i, f in enumerate(self.train_text_filepaths(tmp_dir))
          if i % self.num_train_shards == task_id
      ]
    else:
      return [
          f for i, f in enumerate(self.dev_text_filepaths(tmp_dir))
          if i % self.num_dev_shards == task_id - self.num_train_shards
      ]
156338
public static List<TaskEntity> getTaskEntities(TopologyInfo topologyInfo) {
        Map<Integer, TaskEntity> tasks = new HashMap<>();
        for (TaskSummary ts : topologyInfo.get_tasks()) {
            tasks.put(ts.get_taskId(), new TaskEntity(ts));
        }
        for (ComponentSummary cs : topologyInfo.get_components()) {
            String compName = cs.get_name();
            String type = cs.get_type();
            for (int id : cs.get_taskIds()) {
                if (tasks.containsKey(id)) {
                    tasks.get(id).setComponent(compName);
                    tasks.get(id).setType(type);
                } else {
                    LOG.debug("missing task id:{}", id);
                }
            }
        }
        return new ArrayList<>(tasks.values());
    }
697980
public List<Integer> getComponentTasks(String componentId) {
        List<Integer> ret = _componentToTasks.get(componentId);
        if (ret == null)
            return new ArrayList<>();
        else
            return new ArrayList<>(ret);
    }
246925
private static Configuration getCLRTaskConfiguration(final String taskId) throws BindException {
    final ConfigurationBuilder taskConfigurationBuilder = Tang.Factory.getTang()
        .newConfigurationBuilder(loadClassHierarchy());
    taskConfigurationBuilder.bind("Org.Apache.Reef.Tasks.TaskConfigurationOptions+Identifier," +
        "Org.Apache.Reef.Tasks.ITask, Version=1.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca", taskId);
    taskConfigurationBuilder.bind("Org.Apache.Reef.Tasks.ITask, Org.Apache.Reef.Tasks.ITask, Version=1.0.0.0, " +
        "Culture=neutral, PublicKeyToken=69c3241e6f0468ca", "Org.Apache.Reef.Tasks.HelloTask, " +
        "Org.Apache.Reef.Tasks.HelloTask, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null");

    return taskConfigurationBuilder.build();
  }
806033
List<List<TaskId>> interleaveTasksByGroupId(final Collection<TaskId> taskIds, final int numberThreads) {
    final LinkedList<TaskId> sortedTasks = new LinkedList<>(taskIds);
    Collections.sort(sortedTasks);
    final List<List<TaskId>> taskIdsForConsumerAssignment = new ArrayList<>(numberThreads);
    for (int i = 0; i < numberThreads; i++) {
      taskIdsForConsumerAssignment.add(new ArrayList<>());
    }
    while (!sortedTasks.isEmpty()) {
      for (final List<TaskId> taskIdList : taskIdsForConsumerAssignment) {
        final TaskId taskId = sortedTasks.poll();
        if (taskId == null) {
          break;
        }
        taskIdList.add(taskId);
      }
    }
    return taskIdsForConsumerAssignment;
  }
1087547
public OvhTaskMl domain_task_mailinglist_id_GET(String domain, Long id) throws IOException {
		String qPath = "/email/domain/{domain}/task/mailinglist/{id}";
		StringBuilder sb = path(qPath, domain, id);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhTaskMl.class);
	}
53427
private List<String> buildLaunchTaskArgs(TaskControllerContext context) {
    List<String> commandArgs = new ArrayList<String>(3);
    String taskId = context.task.getTaskID().toString();
    String jobId = getJobId(context);
    LOG.debug("getting the task directory as: " 
        + getTaskCacheDirectory(context));
    commandArgs.add(getDirectoryChosenForTask(
        new File(getTaskCacheDirectory(context)), 
        context));
    commandArgs.add(jobId);
    if(!context.task.isTaskCleanupTask()) {
      commandArgs.add(taskId);
    }else {
      commandArgs.add(taskId + TaskTracker.TASK_CLEANUP_SUFFIX);
    }
    return commandArgs;
  }
275370
public Collection<Task> getTasks(TaskFilter filter) {
        filter = (filter != null) ? filter : new TaskFilter();

        return getInstance().get().tasks(getFilter(filter, false));
    }
750783
public java.util.List<String> getTaskIds() {
        if (taskIds == null) {
            taskIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return taskIds;
    }
1105035
@Service
    public void log(String taskId, String log) {
        executionService.log(taskId, log);
    }
69785
String getWhereTaskletWasScheduledTo(final int taskletId) {
    for (final Map.Entry<String, VortexWorkerManager> entry : runningWorkers.entrySet()) {
      final String workerId = entry.getKey();
      final VortexWorkerManager vortexWorkerManager = entry.getValue();
      if (vortexWorkerManager.containsTasklet(taskletId)) {
        return workerId;
      }
    }
    return null;
  }