org.apache.oozie.service
Class ZKXLogStreamingService
java.lang.Object
org.apache.oozie.service.XLogStreamingService
org.apache.oozie.service.ZKXLogStreamingService
- All Implemented Interfaces:
- Service, Instrumentable
public class ZKXLogStreamingService
- extends XLogStreamingService
- implements Service, Instrumentable
Service that performs streaming of log files over Web Services if enabled in XLogService and collates logs from other Oozie
servers. Requires that a ZooKeeper ensemble is available.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZKXLogStreamingService
public ZKXLogStreamingService()
init
public void init(Services services)
throws ServiceException
- Initialize the log streaming service.
- Specified by:
init in interface Service- Overrides:
init in class XLogStreamingService
- Parameters:
services - services instance.
- Throws:
ServiceException - thrown if the log streaming service could not be initialized.
destroy
public void destroy()
- Destroy the log streaming service.
- Specified by:
destroy in interface Service- Overrides:
destroy in class XLogStreamingService
instrument
public void instrument(Instrumentation instr)
- Instruments the log streaming service.
- Specified by:
instrument in interface Instrumentable- Overrides:
instrument in class XLogStreamingService
- Parameters:
instr - instrumentation to use.
streamLog
public void streamLog(XLogFilter filter,
Date startTime,
Date endTime,
Writer writer,
Map<String,String[]> params)
throws IOException
- Stream the log of a job. It contacts any other running Oozie servers to collate relevant logs while streaming.
- Overrides:
streamLog in class XLogStreamingService
- Parameters:
filter - log streamer filter.startTime - start time for log events to filter.endTime - end time for log events to filter.writer - writer to stream the log to.params - additional parameters from the request
- Throws:
IOException - thrown if the log cannot be streamed.
Copyright © 2015 Apache Software Foundation. All Rights Reserved.