/** * Build a version of the task status you can throw over the wire and back * to the user. * * @param localNodeId * the id of the node this task is running on * @param detailed * should the information include detailed, potentially slow to * generate data? */ public final TaskInfo taskInfo(String localNodeId, boolean detailed) { String description = null; Task.Status status = null; if (detailed) { description = getDescription(); status = getStatus(); } return taskInfo(localNodeId, description, status); }
logger.trace("register {} [{}] [{}] [{}]", task.getId(), type, action, task.getDescription());
/** * Build a version of the task status you can throw over the wire and back * to the user. * * @param localNodeId * the id of the node this task is running on * @param detailed * should the information include detailed, potentially slow to * generate data? */ public final TaskInfo taskInfo(String localNodeId, boolean detailed) { String description = null; Task.Status status = null; if (detailed) { description = getDescription(); status = getStatus(); } return taskInfo(localNodeId, description, status); }
/** * Build a version of the task status you can throw over the wire and back * to the user. * * @param localNodeId * the id of the node this task is running on * @param detailed * should the information include detailed, potentially slow to * generate data? */ public final TaskInfo taskInfo(String localNodeId, boolean detailed) { String description = null; Task.Status status = null; if (detailed) { description = getDescription(); status = getStatus(); } return taskInfo(localNodeId, description, status); }
/** * Build a version of the task status you can throw over the wire and back * to the user. * * @param localNodeId * the id of the node this task is running on * @param detailed * should the information include detailed, potentially slow to * generate data? */ public final TaskInfo taskInfo(String localNodeId, boolean detailed) { String description = null; Task.Status status = null; if (detailed) { description = getDescription(); status = getStatus(); } return taskInfo(localNodeId, description, status); }
/** * Build a version of the task status you can throw over the wire and back * to the user. * * @param node * the node this task is running on * @param detailed * should the information include detailed, potentially slow to * generate data? */ public TaskInfo taskInfo(DiscoveryNode node, boolean detailed) { String description = null; Task.Status status = null; if (detailed) { description = getDescription(); status = getStatus(); } return new TaskInfo(node, getId(), getType(), getAction(), description, status, startTime, System.nanoTime() - startTimeNanos, parentTask); }
logger.trace("register {} [{}] [{}] [{}]", task.getId(), type, action, task.getDescription());
logger.trace("register {} [{}] [{}] [{}]", task.getId(), type, action, task.getDescription());
/** * Registers a task without parent task * <p> * Returns the task manager tracked task or null if the task doesn't support the task manager */ public Task register(String type, String action, TaskAwareRequest request) { Task task = request.createTask(taskIdGenerator.incrementAndGet(), type, action, request.getParentTask()); if (task == null) { return null; } assert task.getParentTaskId().equals(request.getParentTask()) : "Request [ " + request + "] didn't preserve it parentTaskId"; if (logger.isTraceEnabled()) { logger.trace("register {} [{}] [{}] [{}]", task.getId(), type, action, task.getDescription()); } if (task instanceof CancellableTask) { registerCancellableTask(task); } else { Task previousTask = tasks.put(task.getId(), task); assert previousTask == null; } return task; }
if (task != null) { if (logger.isTraceEnabled()) { logger.trace("register {} [{}] [{}] [{}]", task.getId(), type, action, task.getDescription());