@InterfaceAudience.Private public class NativeBatchProcessor extends Object implements INativeHandler
Modifier | Constructor and Description |
---|---|
protected |
NativeBatchProcessor(String nativeHandlerName,
InputBuffer input,
OutputBuffer output) |
Modifier and Type | Method and Description |
---|---|
ReadWriteBuffer |
call(Command command,
ReadWriteBuffer parameter)
call command to downstream
|
void |
close()
close the native handler
|
static INativeHandler |
create(String nativeHandlerName,
org.apache.hadoop.conf.Configuration conf,
DataChannel channel) |
protected void |
finishOutput() |
void |
finishSendData()
Sends a signal that there is no more data
|
InputBuffer |
getInputBuffer()
get input buffer
|
long |
getNativeHandler() |
OutputBuffer |
getOutputBuffer()
Gets the output buffer.
|
void |
init(org.apache.hadoop.conf.Configuration conf)
init the native handler
|
void |
loadData()
load data from upstream
|
String |
name() |
void |
sendData()
Sends a signal to indicate that the data has been stored in output buffer
|
void |
setCommandDispatcher(CommandDispatcher handler) |
void |
setDataReceiver(DataReceiver handler)
set listener.
|
protected NativeBatchProcessor(String nativeHandlerName, InputBuffer input, OutputBuffer output) throws IOException
IOException
public static INativeHandler create(String nativeHandlerName, org.apache.hadoop.conf.Configuration conf, DataChannel channel) throws IOException
IOException
public void setCommandDispatcher(CommandDispatcher handler)
setCommandDispatcher
in interface INativeHandler
public void init(org.apache.hadoop.conf.Configuration conf) throws IOException
INativeHandler
init
in interface INativeHandler
IOException
public void close() throws IOException
INativeHandler
close
in interface INativeHandler
IOException
public long getNativeHandler()
getNativeHandler
in interface INativeHandler
public ReadWriteBuffer call(Command command, ReadWriteBuffer parameter) throws IOException
INativeHandler
call
in interface INativeHandler
IOException
public void sendData() throws IOException
NativeDataTarget
sendData
in interface NativeDataTarget
IOException
public void finishSendData() throws IOException
NativeDataTarget
finishSendData
in interface NativeDataTarget
IOException
protected void finishOutput()
public InputBuffer getInputBuffer()
NativeDataSource
getInputBuffer
in interface NativeDataSource
public OutputBuffer getOutputBuffer()
NativeDataTarget
getOutputBuffer
in interface NativeDataTarget
public void loadData() throws IOException
NativeDataSource
loadData
in interface NativeDataSource
IOException
public void setDataReceiver(DataReceiver handler)
NativeDataSource
setDataReceiver
in interface NativeDataSource
public String name()
name
in interface INativeHandler
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.