Package com.linkedin.databus2.producers.db

Examples of com.linkedin.databus2.producers.db.ReadEventCycleSummary


      List<EventReaderSummary> sourceSummaries = new ArrayList<EventReaderSummary>();
      for (Integer srcId : _stats.getSources())
      {
        sourceSummaries.add(getSummary(srcId));
      }
      ReadEventCycleSummary summary = new ReadEventCycleSummary(_name, sourceSummaries,
          _stats.getTotalStats().getMaxScn(), System.currentTimeMillis());
      return summary;
    }
View Full Code Here


        List<EventReaderSummary> sourceSummaries = new ArrayList<EventReaderSummary>();
        for (int i=0; i < src1Summaries.size();++i)
        {
          sourceSummaries.add(getDiff(src1Summaries.get(i),src2Summaries.get(i)));
        }
        ReadEventCycleSummary r1 = new ReadEventCycleSummary(src1.getEventSourceName(), sourceSummaries,
            src1.getEndOfWindowScn(), src1.getReadMillis()-src2.getReadMillis());
        return r1;
      }
      return null;
    }
View Full Code Here

    String pPartName = "part1";
    short pPartId = 0;

    PhysicalSourceConfig pc = new PhysicalSourceConfig(pPartName, uri, pPartId);
    for(int i=0; i<sourceIds.length; i++) {
      LogicalSourceConfig lc = new LogicalSourceConfig();
      lc.setId(sourceIds[i]);
      lc.setName(sourceNames[i]);
      lc.setPartitionFunction(partitionFunction);
      lc.setUri(pPartName + "." + sourceNames[i]); // this format is expected by GG
      pc.addSource(lc);
    }


    return pc.build();
View Full Code Here

    String resourceKey = "test";
    String partitionFunction = "constant:1";
    boolean skipInfinityScn = false;
    String queryHints = null;
    LogicalSourceStaticConfig[] sources = new LogicalSourceStaticConfig[1];
    LogicalSourceStaticConfig lssc = new LogicalSourceStaticConfig(id, name,
        uri, partitionFunction, partition, skipInfinityScn, queryHints,
        queryHints, queryHints);
    sources[0] = lssc;
    String role = "MASTER";
    long slowSourceQueryThreshold = 0L;
View Full Code Here

    String partitionFunction = "constant:1";

    String pPartName = "part1";
    short pPartId = 0;

    PhysicalSourceConfig pc = new PhysicalSourceConfig(pPartName, uri, pPartId);
    for(int i=0; i<sourceIds.length; i++) {
      LogicalSourceConfig lc = new LogicalSourceConfig();
      lc.setId(sourceIds[i]);
      lc.setName(sourceNames[i]);
      lc.setPartitionFunction(partitionFunction);
      lc.setUri(pPartName + "." + sourceNames[i]); // this format is expected by GG
      pc.addSource(lc);
    }


    return pc.build();
  }
View Full Code Here

  @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

  @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

    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

TOP

Related Classes of com.linkedin.databus2.producers.db.ReadEventCycleSummary

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.