Package org.apache.druid.tasklogs
Interface TaskLogStreamer
- All Known Subinterfaces:
TaskLogs
- All Known Implementing Classes:
NoopTaskLogs,SwitchingTaskLogs
public interface TaskLogStreamer
Something that knows how to stream logs for tasks.
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.base.Optional<InputStream> streamTaskLog(String taskid, long offset) Stream log for a task.default com.google.common.base.Optional<InputStream> streamTaskReports(String taskid) default com.google.common.base.Optional<InputStream> streamTaskStatus(String taskid)
-
Method Details
-
streamTaskLog
com.google.common.base.Optional<InputStream> streamTaskLog(String taskid, long offset) throws IOException Stream log for a task.- Parameters:
offset- If zero, stream the entire log. If positive, attempt to read from this position onwards. If negative, attempt to read this many bytes from the end of the file (like tail -n).- Returns:
- inputStream for this log, if available
- Throws:
IOException
-
streamTaskReports
default com.google.common.base.Optional<InputStream> streamTaskReports(String taskid) throws IOException - Throws:
IOException
-
streamTaskStatus
default com.google.common.base.Optional<InputStream> streamTaskStatus(String taskid) throws IOException - Throws:
IOException
-