public class HdfsTaskLogs extends Object implements TaskLogs
Constructor and Description |
---|
HdfsTaskLogs(HdfsTaskLogsConfig config,
org.apache.hadoop.conf.Configuration hadoopConfig) |
Modifier and Type | Method and Description |
---|---|
void |
killAll() |
void |
killOlderThan(long timestamp) |
void |
pushTaskLog(String taskId,
File logFile) |
com.google.common.base.Optional<com.google.common.io.ByteSource> |
streamTaskLog(String taskId,
long offset)
Stream log for a task.
|
@Inject public HdfsTaskLogs(HdfsTaskLogsConfig config, org.apache.hadoop.conf.Configuration hadoopConfig)
public void pushTaskLog(String taskId, File logFile) throws IOException
pushTaskLog
in interface TaskLogPusher
IOException
public com.google.common.base.Optional<com.google.common.io.ByteSource> streamTaskLog(String taskId, long offset) throws IOException
TaskLogStreamer
streamTaskLog
in interface TaskLogStreamer
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).IOException
public void killAll() throws IOException
killAll
in interface TaskLogKiller
IOException
public void killOlderThan(long timestamp) throws IOException
killOlderThan
in interface TaskLogKiller
IOException
Copyright © 2011–2017. All rights reserved.