org.apache.logging.log4j.flume.appender

Class FlumePersistentManager



  • public class FlumePersistentManager
    extends FlumeAvroManager
    Manager that persists data to Berkeley DB before passing it on to Flume.
    • 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,
                                        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

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.