Package com.linkedin.databus2.relay.config.PhysicalSourceStaticConfig

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


          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


    // 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

    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

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

    LogicalSourceStaticConfig[] sourcesStaticConfigs = new LogicalSourceStaticConfig[_sources.size()];
    for (int i = 0 ; i < _sources.size(); ++i)
    {
      sourcesStaticConfigs[i] = _sources.get(i).build();
    }
    ChunkingType chunkingType = ChunkingType.valueOf(_chunkingType);
    return new PhysicalSourceStaticConfig(_name, _id, _uri, _resourceKey,
                                          sourcesStaticConfigs, _role,
                                          _slowSourceQueryThreshold,
                                          _restartScnOffset,
                                          _retries.build(),
View Full Code Here

                    boolean useChunking)
    throws SQLException
  {
    boolean debugEnabled = _log.isDebugEnabled();
    String eventQuery = null;
    ChunkingType type = _chunkingType;

    if ( ! useChunking || (! type.isChunkingEnabled()))
    {
      eventQuery = _eventQueriesBySource.get(source.getSourceId());
    } else {
      if ( type == ChunkingType.SCN_CHUNKING)
          eventQuery = _eventChunkedScnQueriesBySource.get(source.getSourceId());
      else
        eventQuery = _eventChunkedTxnQueriesBySource.get(source.getSourceId());
    }

    if (debugEnabled) _log.debug("source[" + source.getEventView() + "]: " + eventQuery +
          "; skipInfinityScn=" + source.isSkipInfinityScn() + " ; sinceScn=" + sinceScn);

    PreparedStatement pStmt = conn.prepareStatement(eventQuery);
    if ( ! useChunking || (!type.isChunkingEnabled()))
    {
      pStmt.setFetchSize(currentFetchSize);
    pStmt.setLong(1, sinceScn);
    if (! source.isSkipInfinityScn()) pStmt.setLong(2, sinceScn);
    } else {
View Full Code Here

    if(uri == null)
      throw new DatabusException("Uri is required to start the relay");
    uri = uri.trim();
    EventProducer producer = null;
    if (uri.startsWith("jdbc:")) {
      SourceType sourceType = pConfig.getReplBitSetter().getSourceType();
          if (SourceType.TOKEN.equals(sourceType))
            throw new DatabusException("Token Source-type for Replication bit setter config cannot be set for trigger-based Databus relay !!");

      // if a buffer for this partiton exists - we are overwri
      producer = new OracleEventProducerFactory().buildEventProducer(
View Full Code Here

          break;

        default:
          break;
      }
      SchemaId schemaId = schemaStr != null ? SchemaId.createWithMd5(schemaStr) : null;
      byte[] schemaBytes = schemaId != null? schemaId.getByteArray(): new byte[16];
      initBufferWithEvents(eventsBuf, keyBase, numEvents, srcId,schemaBytes, keyCounts, srcidCounts);
    }
View Full Code Here

    // Get the event buffer
    DbusEventBufferAppendable dbusEventBuffer = getEventBuffer()
        .getDbusEventBufferAppendable(pPartition);

    // Get the schema registry service
    SchemaRegistryService schemaRegistryService = getSchemaRegistryService();

    // Get a stats collector per physical source
    addPhysicalPartitionCollectors(pPartition);
    String statsCollectorName = pPartition.toSimpleString();
    /*
 
View Full Code Here

{
  private final SourceIdNameRegistry _sourcesIdNameRegistry;

  public AbstractRelayFactory()
  {
    this(new SourceIdNameRegistry());
  }
View Full Code Here

TOP

Related Classes of com.linkedin.databus2.relay.config.PhysicalSourceStaticConfig.ChunkingType

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.