Package com.linkedin.databus2.core

Examples of com.linkedin.databus2.core.BackoffTimerStaticConfigBuilder.build()


    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


      lc.setUri(pPartName + "." + sourceNames[i]); // this format is expected by GG
      pc.addSource(lc);
    }


    return pc.build();
  }

  @Test
  public void testAddEventToBuffer() throws InvalidConfigException,
      UnsupportedKeyException, DatabusException
View Full Code Here

            FileSystemSchemaRegistryService.build(_sStaticConfig.getSchemaRegistry().getFileSystem());

      for(LogicalSourceConfig sourceConfig : physicalSourceConfig.getSources())
      {
        OracleTriggerMonitoredSourceInfo source =
            factory.buildOracleMonitoredSourceInfo(sourceConfig.build(), physicalSourceConfig.build(), schemaRegistryService);
        _sources.add(source);
      }
      _sSeeder = new BootstrapDBSeeder(_sStaticConfig.getBootstrap(),_sources);

      _sBootstrapBuffer = new BootstrapEventBuffer(_sStaticConfig.getController().getCommitInterval() * 2);
 
View Full Code Here

          LOG.fatal(msg);
          throw new InvalidConfigException(msg);
        }
        seenUris.add(srcUri);
        OracleTriggerMonitoredSourceInfo source =
            factory.buildOracleMonitoredSourceInfo(sourceConfig.build(), physicalSourceConfig.build(), schemaRegistryService);
        _sources.add(source);
      }
      _sSeeder = new BootstrapDBSeeder(_sStaticConfig.getBootstrap(),_sources);

      _sBootstrapBuffer = new BootstrapEventBuffer(_sStaticConfig.getController().getCommitInterval() * 2);
 
View Full Code Here

        throw new InvalidConfigException(e);
      }
      pConfig.checkForNulls();
      LOG.info("Generated Physical source config: name= " + pConfig.getId());

      list[i] = pConfig.build();
    }
    /*
    for(PhysicalSourceStaticConfig pCfg : pConfigs) {
      for(LogicalSourceStaticConfig lSC : pCfg.getSources()) {
        config.setSourceName("" + lSC.getId(), lSC.getName());
View Full Code Here

      PhysicalSourceStaticConfig[] pStaticConfigs = new PhysicalSourceStaticConfig[1];
      for (LogicalSourceConfig lsc : pConfig.getSources())
      {
        httpRelayConfig.setSourceName("" + lsc.getId(), lsc.getName());
      }
      pStaticConfigs[0] = pConfig.build();
      relay = new DatabusRelayMain(httpRelayConfig.build(), pStaticConfigs);

      relay.start();

      // Insert one event into the relay.
View Full Code Here

      isr.close();
      isr = new InputStreamReader(IOUtils.toInputStream(_configSource2));
      PhysicalSourceConfig pConfig2 = mapper.readValue(isr, PhysicalSourceConfig.class);

      PhysicalSourceStaticConfig pStatConf1 = pConfig1.build();
      PhysicalSourceStaticConfig pStatConf2 = pConfig2.build();

      _physConfigs =  new PhysicalSourceStaticConfig [] {pStatConf1, pStatConf2};

      DbusEventBuffer.Config conf = new DbusEventBuffer.Config();
      conf.setAllocationPolicy("MMAPPED_MEMORY");
View Full Code Here

    //Physical sources config without event buffer
    PhysicalSourceConfig config = new PhysicalSourceConfig();
    config.setName("testname");
    config.setUri("testuri");
    config.setSource(0,loConfig);
    PhysicalSourcesStaticConfigWithoutEbuffer = config.build();
    PhysicalSourcesConfigWithoutEBuffer = config;

    //Physical sources config with event buffer
    PhysicalSourceConfig config2 = new PhysicalSourceConfig();
    config2.setName("testname");
View Full Code Here

    config2.setName("testname");
    config2.setUri("testuri");
    config2.getDbusEventBuffer().setMaxSize(eventBufferMaxSize);
    config2.getDbusEventBuffer().setScnIndexSize(scnIndexSize);
    config2.getDbusEventBuffer().setAverageEventSize(eventBufferReadBufferSize);
    PhysicalSourcesStaticConfigWithEBuffer = config2.build();
    PhysicalSourcesConfigWithEBuffer = config2;

    //Global event buffer config
    DbusEventBuffer.Config ebufConfig = new DbusEventBuffer.Config();
    ebufConfig.setMaxSize(globaleventBufferMaxSize);
View Full Code Here

      for(LogicalSourceConfig ls : pConfig.getSources())
        logListIds.append(ls.getId() + ":" + ls.getName() + ",");
      LOG.info(logListIds);
      // set the memeber
      _pConfigs = new ArrayList<PhysicalSourceStaticConfig>(1);
      _pConfigs.add(pConfig.build());
    }

    public List<PhysicalSourceStaticConfig> getPhysicalSources() {
      return _pConfigs;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.