Package com.cloudera.util

Examples of com.cloudera.util.BackoffPolicy


    EventSink fail4eva = mock(EventSink.Base.class);
    doThrow(new IOException("mock exception")).when(fail4eva).open();
    doReturn(new ReportEvent("stub")).when(fail4eva).getReport();

    // max 5s, backoff initially at 10ms
    BackoffPolicy bop = new CappedExponentialBackoff(10, 5000);

    final InsistentOpenDecorator<EventSink> insistent = new InsistentOpenDecorator<EventSink>(
        fail4eva, bop);
    final StubbornAppendSink<EventSink> stubborn = new StubbornAppendSink<EventSink>(
        insistent);
View Full Code Here


    long initMs = FlumeConfiguration.get().getInsistentOpenInitBackoff();
    long cumulativeMaxMs = FlumeConfiguration.get()
        .getFailoverMaxCumulativeBackoff();
    long maxMs = FlumeConfiguration.get().getFailoverMaxSingleBackoff();
    BackoffPolicy backoff1 = new CumulativeCappedExponentialBackoff(initMs,
        maxMs, cumulativeMaxMs);
    BackoffPolicy backoff2 = new CumulativeCappedExponentialBackoff(initMs,
        maxMs, cumulativeMaxMs);

    // the collector snk has ack checking logic, retry and reopen logic, and
    // needs an extra mask before rolling, writing to disk and forwarding acks
    // (roll detect).
View Full Code Here

TOP

Related Classes of com.cloudera.util.BackoffPolicy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.