|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.flume.channel.AbstractChannel org.apache.flume.channel.BasicChannelSemantics org.apache.flume.channel.file.FileChannel org.apache.flume.channel.SpillableMemoryChannel
@InterfaceAudience.Private @InterfaceStability.Evolving public class SpillableMemoryChannel
SpillableMemoryChannel will use main memory for buffering events until it has reached capacity. Thereafter file channel will be used as overflow.
Nested Class Summary | |
---|---|
static class |
SpillableMemoryChannel.DrainOrderQueue
|
Field Summary | |
---|---|
static String |
AVG_EVENT_SIZE
Estimated average size of events expected to be in the channel |
static String |
BYTE_CAPACITY
max number of bytes used for all events in the queue. |
static String |
BYTE_CAPACITY_BUFFER_PERCENTAGE
percent of buffer between byteCapacity and the estimated event size. |
static String |
CAPACITY
file channel capacity overridden by Spillable Channel |
protected ChannelCounter |
channelCounter
|
static int |
defaultMemoryCapacity
|
static int |
defaultOverflowCapacity
|
static int |
defaultOverflowDeactivationThreshold
|
static int |
defaultOverflowTimeout
|
SpillableMemoryChannel.DrainOrderQueue |
drainOrder
|
static String |
KEEP_ALIVE
file channel setting that is overriden by Spillable Channel |
static String |
MEMORY_CAPACITY
Max number of events to be stored in memory |
ArrayDeque<Event> |
memQueue
|
static String |
OVERFLOW_CAPACITY
max number of events in overflow. |
static String |
OVERFLOW_DEACTIVATION_THRESHOLD
Internal use only. |
static String |
OVERFLOW_TIMEOUT
Seconds to wait before enabling disk overflow when memory fills up |
Fields inherited from class org.apache.flume.channel.file.FileChannel |
---|
transactionCapacity |
Constructor Summary | |
---|---|
SpillableMemoryChannel()
|
Method Summary | |
---|---|
void |
configure(Context context)
Read parameters from context memoryCapacity = total number of events allowed at one time in the memory queue. |
protected BasicTransactionSemantics |
createTransaction()
Called to create new Transaction objects, which must
extend BasicTransactionSemantics . |
int |
getMaxMemQueueSize()
|
int |
getMemoryCapacity()
|
protected Integer |
getOverflowCapacity()
|
int |
getOverflowTimeout()
|
protected int |
getTotalStored()
|
protected boolean |
isOverflowDisabled()
|
int |
queueSize()
|
void |
start()
Starts a service or component. |
void |
stop()
Stops a service or component. |
Methods inherited from class org.apache.flume.channel.file.FileChannel |
---|
getDepth, isOpen, setName, toString |
Methods inherited from class org.apache.flume.channel.BasicChannelSemantics |
---|
getTransaction, initialize, put, take |
Methods inherited from class org.apache.flume.channel.AbstractChannel |
---|
getLifecycleState, getName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String MEMORY_CAPACITY
public static final String OVERFLOW_TIMEOUT
public static final String OVERFLOW_DEACTIVATION_THRESHOLD
public static final String BYTE_CAPACITY_BUFFER_PERCENTAGE
public static final String BYTE_CAPACITY
public static final String OVERFLOW_CAPACITY
public static final String KEEP_ALIVE
public static final String CAPACITY
public static final String AVG_EVENT_SIZE
public static final int defaultMemoryCapacity
public static final int defaultOverflowCapacity
public static final int defaultOverflowTimeout
public static final int defaultOverflowDeactivationThreshold
public ArrayDeque<Event> memQueue
protected ChannelCounter channelCounter
public final SpillableMemoryChannel.DrainOrderQueue drainOrder
Constructor Detail |
---|
public SpillableMemoryChannel()
Method Detail |
---|
protected int getTotalStored()
public int getMemoryCapacity()
public int getOverflowTimeout()
public int getMaxMemQueueSize()
protected Integer getOverflowCapacity()
protected boolean isOverflowDisabled()
public int queueSize()
public void configure(Context context)
configure
in interface Configurable
configure
in class FileChannel
public void start()
LifecycleAware
Starts a service or component.
Implementations should determine the result of any start logic and effect
the return value of LifecycleAware.getLifecycleState()
accordingly.
start
in interface LifecycleAware
start
in class FileChannel
public void stop()
LifecycleAware
Stops a service or component.
Implementations should determine the result of any stop logic and effect
the return value of LifecycleAware.getLifecycleState()
accordingly.
stop
in interface LifecycleAware
stop
in class FileChannel
protected BasicTransactionSemantics createTransaction()
BasicChannelSemantics
Called to create new Transaction
objects, which must
extend BasicTransactionSemantics
. Each object is used
for only one transaction, but is stored in a thread-local and
retrieved by getTransaction
for the duration of that
transaction.
createTransaction
in class FileChannel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |