Package com.linkedin.databus2.core

Examples of com.linkedin.databus2.core.BackoffTimerStaticConfigBuilder


        queryHints, queryHints);
    sources[0] = lssc;
    String role = "MASTER";
    long slowSourceQueryThreshold = 0L;
    long restartScnOffset = 0L;
    BackoffTimerStaticConfigBuilder bsc = new BackoffTimerStaticConfigBuilder();
    ChunkingType ct = ChunkingType.NO_CHUNKING;
    long txnsPerChunk = 0L;
    long scnChunkSize = 0L;
    long chunkedScnThreshold = 0L;
    long maxScnDelayMs = 0L;
    long eventRatePerSec = rate;
    long eventRateThrottleDuration = throttleDuration;
    int largestEventSizeInBytes = 10240;
    long largestWindowSizeInBytes = 10240;
    DbusEventBuffer.Config cfgBuilder = new DbusEventBuffer.Config();
    cfgBuilder.setMaxSize(10 * 1024 * 1024);
    cfgBuilder.setScnIndexSize(2 * 1024 * 1024);
    cfgBuilder.setAllocationPolicy("MMAPPED_MEMORY");

    DbusEventBuffer.StaticConfig dbusEventBuffer = cfgBuilder.build();

    boolean errorOnMissingFields = true;
    String xmlVersion = "1.0";
    String xmlEncoding = "";
    String fieldName = "";
    String regex = "";
    ReplicationBitSetterStaticConfig replicationBitSetter = new ReplicationBitSetterStaticConfig(
        ReplicationBitSetterStaticConfig.SourceType.NONE, fieldName, regex, MissingValueBehavior.STOP_WITH_ERROR);
    PhysicalSourceStaticConfig pssc = new PhysicalSourceStaticConfig(name, id,
        uri, resourceKey, sources, role, slowSourceQueryThreshold,
        restartScnOffset, bsc.build(), ct, txnsPerChunk, scnChunkSize,
        chunkedScnThreshold, maxScnDelayMs, eventRatePerSec, eventRateThrottleDuration, dbusEventBuffer,
        largestEventSizeInBytes, largestWindowSizeInBytes,
        errorOnMissingFields, xmlVersion, xmlEncoding, replicationBitSetter);
    return pssc;
  }
View Full Code Here


      _checkpointThresholdPct = 75.0;
      _keyMin = DEFAULT_KEY_RANGE_MIN;
      _keyMax = DEFAULT_KEY_RANGE_MAX;

      _pullerRetries = new BackoffTimerStaticConfigBuilder();
      _pullerRetries.setInitSleep(DEFAULT_INIT_SLEEP);
      _pullerRetries.setSleepIncFactor(DEFAULT_SLEEP_INC_FACTOR);
      _pullerRetries.setMaxRetryNum(DEFAULT_MAX_RETRY_NUM);

      _bsPullerRetriesBeforeCkptCleanup = new BackoffTimerStaticConfigBuilder();
      _bsPullerRetriesBeforeCkptCleanup
          .setInitSleep(DEFAULT_BSPULLER_CKPTCLEANUP_INIT_SLEEP);
      _bsPullerRetriesBeforeCkptCleanup
          .setSleepIncDelta(DEFAULT_BSPULLER_CKPTCLEANUP_SLEEP_INC_DELTA);
      _bsPullerRetriesBeforeCkptCleanup
          .setMaxRetryNum(DEFAULT_BSPULLER_CKPTCLEANUP_MAX_RETRY_NUM);
      _bsPullerRetriesBeforeCkptCleanup
          .setSleepIncFactor(DEFAULT_BSPULLER_CKPTCLEANUP_SLEEP_INC_FACTOR);

      _numRetriesOnFallOff = DEFAULT_RETRY_ON_FELLOFF_MAX_RETRY_NUM;

      _dispatcherRetries = new BackoffTimerStaticConfigBuilder();
      _dispatcherRetries.setSleepIncFactor(1.1);
      _dispatcherRetries.setMaxRetryNum(-1);
      _enablePullerMessageQueueLogging = DEFAULT_PULLER_MESSAGE_QUEUE_LOGGING;
    }
View Full Code Here

    public BackoffTimerStaticConfigBuilder getBstPullerRetries()
    {
      if (_bstPullerRetries != null) {
        return _bstPullerRetries;
      }
      _bstPullerRetries = new BackoffTimerStaticConfigBuilder();
      _bstPullerRetries.setInitSleep(DEFAULT_INIT_SLEEP);
      _bstPullerRetries.setSleepIncFactor(DEFAULT_SLEEP_INC_FACTOR);
      _bstPullerRetries.setMaxRetryNum(DEFAULT_MAX_RETRY_NUM);
      return _bstPullerRetries;
    }
View Full Code Here

    public BackoffTimerStaticConfigBuilder getBstDispatcherRetries()
    {
      if (_bstDispatcherRetries != null) {
        return _bstDispatcherRetries;
      }
      _bstDispatcherRetries = new BackoffTimerStaticConfigBuilder();
      _bstDispatcherRetries.setSleepIncFactor(1.1);
      _bstDispatcherRetries.setMaxRetryNum(-1);
      return _bstDispatcherRetries;
    }
View Full Code Here

    _resourceKey = "";
    _role = PhysicalSource.PHYSICAL_SOURCE_MASTER;
    _sources = new ArrayList<LogicalSourceConfig>();
    _restartScnOffset = 0;
    _slowSourceQueryThreshold = 3000;
    _retries = new BackoffTimerStaticConfigBuilder();
    _retries.setInitSleep(DEFAULT_DBPOLL_INTERVAL_MILLIS);
    _retries.setMaxRetryNum(-1);
    _retries.setMaxSleep(MAX_DBPOLL_INTERVAL_MILLIS);
    _retries.setSleepIncFactor(2.0);
    _retries.setSleepIncDelta(0);
View Full Code Here

    pConfig.setUri(uri);
    pConfig.setEventRatePerSec(eventRatePerSec);
    pConfig.setRestartScnOffset(restartScnOffset);
    pConfig.setLargestEventSizeInBytes(largestEventSize);
    pConfig.setLargestWindowSizeInBytes(largestWindowSize);
    BackoffTimerStaticConfigBuilder retriesConf = new BackoffTimerStaticConfigBuilder();
    retriesConf.setInitSleep(pollIntervalMs);
    pConfig.setRetries(retriesConf);

    for(LogicalSourceConfig lConf : lSourceConfigs)
    {
      pConfig.addSource(lConf);
View Full Code Here

      _container = new ServerContainer.Config();
      setBootstrapHttpPort(DEFAULT_BOOTSTRAP_HTTP_PORT);
      _client.getCheckpointPersistence().setType(ProviderType.FILE_SYSTEM.toString());
      _client.getCheckpointPersistence().getFileSystem().setRootDirectory("./bootstrap-checkpoints");

      _retryTimer = new BackoffTimerStaticConfigBuilder();
  }
View Full Code Here

  }

  public static ErrorResponse createUnexpectedControlEventErrorResponse(String msg)
  {
    return new ErrorResponse(BinaryProtocol.RESULT_ERR_UNEXPECTED_CONTROL_EVENT,
                             new DatabusException(msg));
  }
View Full Code Here

  }

  public static ErrorResponse createInvalidEvent(String errMsg)
  {
    return new ErrorResponse(BinaryProtocol.RESULT_ERR_INVALID_EVENT,
                             new DatabusException(errMsg));
  }
View Full Code Here

  }

  public static ErrorResponse createUnsupportedDbusEventVersion(String errMsg)
  {
    return new ErrorResponse(BinaryProtocol.RESULT_ERR_UNSUPPORTED_DBUS_EVENT_VERSION,
                             new DatabusException(errMsg));
  }
View Full Code Here

TOP

Related Classes of com.linkedin.databus2.core.BackoffTimerStaticConfigBuilder

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.