public class FlumeReceiver extends Receiver<SparkFlumeEvent> implements Logging
Modifier and Type | Class and Description |
---|---|
class |
FlumeReceiver.CompressionChannelPipelineFactory
A Netty Pipeline factory that will decompress incoming data from
and the Netty client and compress data going back to the client.
|
Constructor and Description |
---|
FlumeReceiver(String host,
int port,
StorageLevel storageLevel,
boolean enableDecompression) |
Modifier and Type | Method and Description |
---|---|
void |
onStart()
This method is called by the system when the receiver is started.
|
void |
onStop()
This method is called by the system when the receiver is stopped.
|
scala.Some<String> |
preferredLocation()
Override this to specify a preferred location (hostname).
|
org.apache.avro.ipc.specific.SpecificResponder |
responder() |
org.apache.avro.ipc.NettyServer |
server() |
attachExecutor, executor_, isStarted, isStopped, reportError, restart, restart, restart, setReceiverId, stop, stop, storageLevel, store, store, store, store, store, store, store, store, store, streamId
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public FlumeReceiver(String host, int port, StorageLevel storageLevel, boolean enableDecompression)
public org.apache.avro.ipc.specific.SpecificResponder responder()
public org.apache.avro.ipc.NettyServer server()
public void onStart()
Receiver
store(data)
.
If there are errors in threads started here, then following options can be done
(i) reportError(...)
can be called to report the error to the driver.
The receiving of data will continue uninterrupted.
(ii) stop(...)
can be called to stop receiving data. This will call onStop()
to
clear up all resources allocated (threads, buffers, etc.) during onStart()
.
(iii) restart(...)
can be called to restart the receiver. This will call onStop()
immediately, and then onStart()
after a delay.
onStart
in class Receiver<SparkFlumeEvent>
public void onStop()
Receiver
onStart()
must be cleaned up in this method.onStop
in class Receiver<SparkFlumeEvent>
public scala.Some<String> preferredLocation()
Receiver
preferredLocation
in class Receiver<SparkFlumeEvent>