org.apache.oozie.service
Class XLogStreamingService

java.lang.Object
  extended by org.apache.oozie.service.XLogStreamingService
All Implemented Interfaces:
Service, Instrumentable
Direct Known Subclasses:
ZKXLogStreamingService

public class XLogStreamingService
extends Object
implements Service, Instrumentable

Service that performs streaming of log files over Web Services if enabled in XLogService


Field Summary
protected  int bufferLen
           
static String STREAM_BUFFER_LEN
           
 
Fields inherited from interface org.apache.oozie.service.Service
DEFAULT_LOCK_TIMEOUT, lockTimeout, USE_XCOMMAND
 
Constructor Summary
XLogStreamingService()
           
 
Method Summary
 void destroy()
          Destroy the log streaming service.
 int getBufferLen()
           
 Class<? extends Service> getInterface()
          Return the public interface for log streaming service.
 void init(Services services)
          Initialize the log streaming service.
 void instrument(Instrumentation instr)
          Instruments the log streaming service.
 void streamLog(XLogFilter filter, Date startTime, Date endTime, Writer writer, Map<String,String[]> params)
          Stream the log of a job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STREAM_BUFFER_LEN

public static final String STREAM_BUFFER_LEN
See Also:
Constant Field Values

bufferLen

protected int bufferLen
Constructor Detail

XLogStreamingService

public XLogStreamingService()
Method Detail

init

public void init(Services services)
          throws ServiceException
Initialize the log streaming service.

Specified by:
init in interface Service
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

getInterface

public Class<? extends Service> getInterface()
Return the public interface for log streaming service.

Specified by:
getInterface in interface Service
Returns:
XLogStreamingService.

instrument

public void instrument(Instrumentation instr)
Instruments the log streaming service.

Specified by:
instrument in interface Instrumentable
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.

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.

getBufferLen

public int getBufferLen()


Copyright © 2015 Apache Software Foundation. All Rights Reserved.