public abstract class ReceiverSupervisor extends Object implements Logging
Modifier and Type | Class and Description |
---|---|
class |
ReceiverSupervisor.ReceiverState |
Constructor and Description |
---|
ReceiverSupervisor(Receiver<?> receiver,
SparkConf conf) |
Modifier and Type | Method and Description |
---|---|
void |
awaitTermination()
Wait the thread until the supervisor is stopped
|
boolean |
isReceiverStarted()
Check if receiver has been marked for stopping
|
boolean |
isReceiverStopped()
Check if receiver has been marked for stopping
|
abstract void |
pushArrayBuffer(scala.collection.mutable.ArrayBuffer<?> arrayBuffer,
scala.Option<Object> optionalMetadata,
scala.Option<StreamBlockId> optionalBlockId)
Store an ArrayBuffer of received data as a data block into Spark's memory.
|
abstract void |
pushBytes(java.nio.ByteBuffer bytes,
scala.Option<Object> optionalMetadata,
scala.Option<StreamBlockId> optionalBlockId)
Store the bytes of received data as a data block into Spark's memory.
|
abstract void |
pushIterator(scala.collection.Iterator<Object> iterator,
scala.Option<Object> optionalMetadata,
scala.Option<StreamBlockId> optionalBlockId)
Store a iterator of received data as a data block into Spark's memory.
|
abstract void |
pushSingle(Object data)
Push a single data item to backend data store.
|
scala.Enumeration.Value |
receiverState()
State of the receiver
|
org.apache.spark.streaming.receiver.ReceiverSupervisor.ReceiverState$ |
ReceiverState() |
abstract void |
reportError(String message,
Throwable throwable)
Report errors.
|
void |
restartReceiver(String message,
scala.Option<Throwable> error)
Restart receiver with delay
|
void |
restartReceiver(String message,
scala.Option<Throwable> error,
int delay)
Restart receiver with delay
|
void |
start()
Start the supervisor
|
void |
startReceiver()
Start receiver
|
void |
stop(String message,
scala.Option<Throwable> error)
Mark the supervisor and the receiver for stopping
|
void |
stopReceiver(String message,
scala.Option<Throwable> error)
Stop receiver
|
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 org.apache.spark.streaming.receiver.ReceiverSupervisor.ReceiverState$ ReceiverState()
public scala.Enumeration.Value receiverState()
public abstract void pushSingle(Object data)
public abstract void pushBytes(java.nio.ByteBuffer bytes, scala.Option<Object> optionalMetadata, scala.Option<StreamBlockId> optionalBlockId)
public abstract void pushIterator(scala.collection.Iterator<Object> iterator, scala.Option<Object> optionalMetadata, scala.Option<StreamBlockId> optionalBlockId)
public abstract void pushArrayBuffer(scala.collection.mutable.ArrayBuffer<?> arrayBuffer, scala.Option<Object> optionalMetadata, scala.Option<StreamBlockId> optionalBlockId)
public abstract void reportError(String message, Throwable throwable)
public void start()
public void stop(String message, scala.Option<Throwable> error)
public void startReceiver()
public void stopReceiver(String message, scala.Option<Throwable> error)
public void restartReceiver(String message, scala.Option<Throwable> error)
public void restartReceiver(String message, scala.Option<Throwable> error, int delay)
public boolean isReceiverStarted()
public boolean isReceiverStopped()
public void awaitTermination()