Examples of PhysicalSourceStaticConfig


Examples of com.linkedin.databus2.relay.config.PhysicalSourceStaticConfig

  @Test
  public void testSCNRegressionStats() throws Exception
  {
    short[] sourceIds = new short[] { 505, 506 };
    String[] sourceNames = new String[] { "source1", "source2" };
    PhysicalSourceStaticConfig pssc =
        buildSimplePssc(sourceIds, sourceNames, "gg:///tmp:xxx");

    DbusEventBufferAppendable mb = createBufMult(pssc);

    // start producer
View Full Code Here

Examples of com.linkedin.databus2.relay.config.PhysicalSourceStaticConfig

  @Test
  public void testTransactionsWithDuplicateSCN() throws Exception
  {
    short[] sourceIds = new short[] { 505, 506 };
    String[] sourceNames = new String[] { "source1", "source2" };
    PhysicalSourceStaticConfig pssc =
        buildSimplePssc(sourceIds, sourceNames, "gg:///tmp:xxx");

    DbusEventBufferAppendable mb = createBufMult(pssc);

    // start producer
View Full Code Here

Examples of com.linkedin.databus2.relay.config.PhysicalSourceStaticConfig

    // setup trail Files directory
    File ggTrailDir = FileUtils.createTempDir("testGGParserStats");

    // configure physical source
    String uri = "gg://" + ggTrailDir.getAbsolutePath() + ":x3";
    PhysicalSourceStaticConfig pssc = buildSimplePssc(sourceIds, sourceNames, uri);
    LOG.info("Uri=" + uri);

    // create schema
    Schema s = Schema.parse(sourceAvroSchema);
    VersionedSchema vs =
View Full Code Here

Examples of com.linkedin.databus2.relay.config.PhysicalSourceStaticConfig

  public void testAddEventToBuffer() throws InvalidConfigException,
      UnsupportedKeyException, DatabusException
  {
    // No rate control
    long rate = 0;
    PhysicalSourceStaticConfig pssc = buildPssc(rate, 0L);
    long scn = 10;
    DbusEventBuffer mb = (DbusEventBuffer)createBufMult(pssc);

    GoldenGateEventProducer gg = new GoldenGateEventProducer(pssc, null, mb,
        null, null);
View Full Code Here

Examples of com.linkedin.databus2.relay.config.PhysicalSourceStaticConfig

          UnsupportedKeyException, DatabusException, IllegalArgumentException,
          InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException
  {
    short[] sourceIds = new short[] { 505, 506 };
    String[] sourceNames = new String[] { "source1", "source2" };
    PhysicalSourceStaticConfig pssc =
        buildSimplePssc(sourceIds, sourceNames, "gg:///tmp:xxx");
    long scn = 10;

    DbusEventBufferAppendable mb = createBufMult(pssc);
View Full Code Here

Examples of com.linkedin.databus2.relay.config.PhysicalSourceStaticConfig

    // 1 event per second required. Send 5 events. Must have 4 sleeps.
    long rate = 1;
    int numEvents = 5;

    PhysicalSourceStaticConfig pssc = buildPssc(rate, throttleDurationInSecs);
    long scn = 10;
    DbusEventBufferAppendable mb = createBufMult(pssc);

    GoldenGateEventProducer gg = new GoldenGateEventProducer(pssc, null, mb,
        null, null);
View Full Code Here

Examples of com.linkedin.databus2.relay.config.PhysicalSourceStaticConfig

    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);
View Full Code Here

Examples of com.linkedin.databus2.relay.config.PhysicalSourceStaticConfig

  @BeforeTest
  public void setUpTest () throws IOException, InvalidConfigException {
    LOG.info("Setting up Test");

    PhysicalSourceStaticConfig pStatConf1 = convertToPhysicalSourceConfig(_configSource1).build();
    PhysicalSourceStaticConfig pStatConf2 = convertToPhysicalSourceConfig(_configSource2).build();
    PhysicalSourceStaticConfig pStatConf3 = convertToPhysicalSourceConfig(_configSource3).build();

    _pConfigs =  new PhysicalSourceStaticConfig [] {pStatConf1, pStatConf2, pStatConf3};

    // generate testData
    int scn = 100;
View Full Code Here

Examples of com.linkedin.databus2.relay.config.PhysicalSourceStaticConfig

  @Test
  public void verifyReadingLogicalPartitionWildcard() throws IOException, ScnNotFoundException, InvalidConfigException, DatabusException, OffsetNotFoundException {
     createBufMult();

     PhysicalSourceStaticConfig pStatConf1 = convertToPhysicalSourceConfig(_configSource1).build();
     PhysicalSourceStaticConfig pStatConf2 = convertToPhysicalSourceConfig(_configSource2).build();

     PhysicalPartition pP = pStatConf1.getPhysicalPartition();
     DbusEventBufferAppendable buf = _eventBufferMult.getDbusEventBufferAppendable(pP);

     buf.startEvents();
     byte [] schema = "abcdefghijklmnop".getBytes(Charset.defaultCharset());
     assertTrue(buf.appendEvent(new DbusEventKey(1), (short)100, (short)0,
                                   System.currentTimeMillis() * 1000000, (short)2,
                                   schema, new byte[100], false, null));

     assertTrue(buf.appendEvent(new DbusEventKey(1), (short)100, (short)1,
         System.currentTimeMillis() * 1000000, (short)2,
         schema, new byte[100], false, null));
     buf.endEvents(100, null);

     pP = pStatConf2.getPhysicalPartition();
     buf = _eventBufferMult.getDbusEventBufferAppendable(pP);
     buf.startEvents();

     assertTrue(buf.appendEvent(new DbusEventKey(1), (short)101, (short)2,
         System.currentTimeMillis() * 1000000, (short)2,
View Full Code Here

Examples of com.linkedin.databus2.relay.config.PhysicalSourceStaticConfig

    Set<Integer> srcIds = new HashSet<Integer>(2);
    srcIds.add(1);

    // total expected events from source 1 is 5
    batchReading(srcIds, 5);
    PhysicalSourceStaticConfig pConfig = convertToPhysicalSourceConfig(_configSource3).build();
    LOG.info("one more buffer for " + pConfig);
    DbusEventBuffer buf = _eventBufferMult.addNewBuffer(pConfig, _config);
    buf.start(100);

    // add events to the new buffer
    byte [] schema = "ABCDEFGHIJKLMNOP".getBytes(Charset.defaultCharset());
    for(int i=100; i<110; i++) {
      if(i%2 == 0)
        buf.startEvents();
      assertTrue(buf.appendEvent(new DbusEventKey(i),
                                 pConfig.getPhysicalPartition().getId().shortValue(),
                                 (short)0, // logical source id
                                 System.currentTimeMillis(),
                                 (short)(i<105?21:22),
                                 schema,
                                 (""+i).getBytes(Charset.defaultCharset()), false, null));
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.