org.apache.logging.log4j.flume.appender
Class FlumePersistentManager

java.lang.Object
  extended by org.apache.logging.log4j.core.appender.AbstractManager
      extended by org.apache.logging.log4j.flume.appender.AbstractFlumeManager
          extended by org.apache.logging.log4j.flume.appender.FlumeAvroManager
              extended by org.apache.logging.log4j.flume.appender.FlumePersistentManager

public class FlumePersistentManager
extends FlumeAvroManager

Manager that persists data to Berkeley DB before passing it on to Flume.


Field Summary
static String KEY_PROVIDER
          Attribute name for the key provider.
 
Fields inherited from class org.apache.logging.log4j.core.appender.AbstractManager
count, LOGGER
 
Constructor Summary
protected FlumePersistentManager(String name, String shortName, Agent[] agents, int batchSize, int retries, int connectionTimeout, int requestTimeout, int delay, com.sleepycat.je.Database database, com.sleepycat.je.Environment environment, SecretKey secretKey, int lockTimeoutRetryCount)
          Constructor
 
Method Summary
static FlumePersistentManager getManager(String name, Agent[] agents, org.apache.logging.log4j.core.config.Property[] properties, int batchSize, int retries, int connectionTimeout, int requestTimeout, int delayMillis, int lockTimeoutRetryCount, String dataDir)
          Returns a FlumeAvroManager.
protected  void releaseSub()
           
 void send(org.apache.flume.Event event)
           
 
Methods inherited from class org.apache.logging.log4j.flume.appender.FlumeAvroManager
getAgents, getBatchSize, getConnectTimeoutMillis, getCurrent, getManager, getRequestTimeoutMillis, getRetries, send
 
Methods inherited from class org.apache.logging.log4j.core.appender.AbstractManager
getContentFormat, getCount, getManager, getName, hasManager, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_PROVIDER

public static final String KEY_PROVIDER
Attribute name for the key provider.

See Also:
Constant Field Values
Constructor Detail

FlumePersistentManager

protected FlumePersistentManager(String name,
                                 String shortName,
                                 Agent[] agents,
                                 int batchSize,
                                 int retries,
                                 int connectionTimeout,
                                 int requestTimeout,
                                 int delay,
                                 com.sleepycat.je.Database database,
                                 com.sleepycat.je.Environment environment,
                                 SecretKey secretKey,
                                 int lockTimeoutRetryCount)
Constructor

Parameters:
name - The unique name of this manager.
shortName - Original name for the Manager.
agents - An array of Agents.
batchSize - The number of events to include in a batch.
retries - The number of times to retry connecting before giving up.
connectionTimeout - The amount of time to wait for a connection to be established.
requestTimeout - The amount of time to wair for a response to a request.
delay - The amount of time to wait between retries.
database - The database to write to.
environment - The database environment.
secretKey - The SecretKey to use for encryption.
lockTimeoutRetryCount - The number of times to retry a lock timeout.
Method Detail

getManager

public static FlumePersistentManager getManager(String name,
                                                Agent[] agents,
                                                org.apache.logging.log4j.core.config.Property[] properties,
                                                int batchSize,
                                                int retries,
                                                int connectionTimeout,
                                                int requestTimeout,
                                                int delayMillis,
                                                int lockTimeoutRetryCount,
                                                String dataDir)
Returns a FlumeAvroManager.

Parameters:
name - The name of the manager.
agents - The agents to use.
properties - Properties to pass to the Manager.
batchSize - The number of events to include in a batch.
retries - The number of times to retry connecting before giving up.
connectionTimeout - The amount of time to wait to establish a connection.
requestTimeout - The amount of time to wait for a response to a request.
delayMillis - Amount of time to delay before delivering a batch.
lockTimeoutRetryCount - The number of times to retry after a lock timeout.
dataDir - The location of the Berkeley database.
Returns:
A FlumeAvroManager.

send

public void send(org.apache.flume.Event event)
Overrides:
send in class FlumeAvroManager

releaseSub

protected void releaseSub()
Overrides:
releaseSub in class FlumeAvroManager


Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.