Package org.apache.druid.tasklogs
Class NoopTaskLogs
- java.lang.Object
-
- org.apache.druid.tasklogs.NoopTaskLogs
-
- All Implemented Interfaces:
TaskLogKiller,TaskLogPusher,TaskLogs,TaskLogStreamer,TaskPayloadManager
public class NoopTaskLogs extends Object implements TaskLogs
-
-
Constructor Summary
Constructors Constructor Description NoopTaskLogs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidkillAll()voidkillOlderThan(long timestamp)Removes logs older than the provided timestampvoidpushTaskLog(String taskid, File logFile)voidpushTaskPayload(String taskid, File taskPayloadFile)Save payload so it can be retrieved later.voidpushTaskReports(String taskid, File reportFile)voidpushTaskStatus(String taskid, File statusFile)com.google.common.base.Optional<InputStream>streamTaskLog(String taskid, long offset)Stream log for a task.com.google.common.base.Optional<InputStream>streamTaskPayload(String taskid)Stream payload for a task.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.tasklogs.TaskLogStreamer
streamTaskReports, streamTaskStatus
-
-
-
-
Method Detail
-
streamTaskLog
public com.google.common.base.Optional<InputStream> streamTaskLog(String taskid, long offset)
Description copied from interface:TaskLogStreamerStream log for a task.- Specified by:
streamTaskLogin interfaceTaskLogStreameroffset- 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
-
pushTaskLog
public void pushTaskLog(String taskid, File logFile)
- Specified by:
pushTaskLogin interfaceTaskLogPusher
-
pushTaskReports
public void pushTaskReports(String taskid, File reportFile)
- Specified by:
pushTaskReportsin interfaceTaskLogPusher
-
pushTaskStatus
public void pushTaskStatus(String taskid, File statusFile)
- Specified by:
pushTaskStatusin interfaceTaskLogPusher
-
killAll
public void killAll()
- Specified by:
killAllin interfaceTaskLogKiller
-
killOlderThan
public void killOlderThan(long timestamp)
Description copied from interface:TaskLogKillerRemoves logs older than the provided timestamp- Specified by:
killOlderThanin interfaceTaskLogKiller- Parameters:
timestamp- Timestamp in milliseconds
-
pushTaskPayload
public void pushTaskPayload(String taskid, File taskPayloadFile)
Description copied from interface:TaskPayloadManagerSave payload so it can be retrieved later.- Specified by:
pushTaskPayloadin interfaceTaskPayloadManager
-
streamTaskPayload
public com.google.common.base.Optional<InputStream> streamTaskPayload(String taskid)
Description copied from interface:TaskPayloadManagerStream payload for a task.- Specified by:
streamTaskPayloadin interfaceTaskPayloadManager- Returns:
- inputStream for this taskPayload, if available
-
-