Examples of EventReaderSummary


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

        for ( OracleTriggerMonitoredSourceInfo sourceInfo : _sources)
        {
          LOG.info("Bootstrapping " + sourceInfo.getEventView());
          _bootstrapSeedWriter.start(maxScn);
          EventReaderSummary summary = readEventsForSource(sourceInfo, maxScn);
          // Script assumes seeding is done for one schema at a time
          // just use one source to get the schema name for sy$txlog
          endScn = getMaxScn(_sources.get(0));
          _bootstrapSeedWriter.endEvents(BootstrapEventBuffer.END_OF_SOURCE, endScn, null);
          summaries.add(summary);
View Full Code Here

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

      }
    }
    long timeEnd = System.currentTimeMillis();
    long elapsedMin = (timeEnd - timeStart)/(MILLISEC_TO_MIN);
    LOG.info("Processed " + numRowsFetched + " rows of Source: " +  sourceInfo.getSourceName() + " in " + elapsedMin + " minutes" );
    return new EventReaderSummary(sourceInfo.getSourceId(), sourceInfo.getSourceName(), -1,
                                  numRowsFetched, totalEventSize, (timeEnd - timeStart),totProcessTime,0,0,0);
  }
View Full Code Here

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

       
        String dir = _config.getAvroSeedInputDirMap().get(sourceInfo.getEventView());
       
        File d = new File(dir);

        EventReaderSummary summary = readEventsFromHadoopFiles(sourceInfo, d, endScn);
        // Script assumes seeding is done for one schema at a time
        _bootstrapEventBuffer.endEvents(BootstrapEventBuffer.END_OF_SOURCE, endScn, null);
        summaries.add(summary);
      }
      } catch (Exception ex) {
View Full Code Here

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

      }
   
    long timeEnd = System.currentTimeMillis();
    long elapsedMin = (timeEnd - timeStart)/(MILLISEC_TO_MIN);
    LOG.info("Processed " + numRead + " rows of Source: " +  sourceInfo.getSourceName() + " in " + elapsedMin + " minutes" );
    return new EventReaderSummary(sourceInfo.getSourceId(), sourceInfo.getSourceName(), -1,
                    (int)numRead, numBytes, (timeEnd - timeStart),(timeEnd-timeStart)/numRead,0,0,0);
  }
View Full Code Here

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

      }
      long endDbUpdatesMs = System.currentTimeMillis();
      long dbUpdatesElapsedTimeMs = endDbUpdatesMs - startDbUpdatesMs;

      // Log Event Summary at logical source level
      EventReaderSummary summary = new EventReaderSummary(sourceId, _monitoredSources.get(sourceId).getSourceName(),
                                                          scn, eventsInDbUpdate, dbUpdatesEventsSize,-1L /* Not supported */,
                                                          dbUpdatesElapsedTimeMs,  timestamp, timestamp, -1L /* Not supported */);
      if (_eventsLog.isInfoEnabled())
      {
        _eventsLog.info(summary.toString());
      }
      summaries.add(summary);

      if(_log.isDebugEnabled())
        _log.debug("There are "+ eventsInDbUpdate + " events seen in the current dbUpdate");
    }

    // Log Event Summary at Physical source level
    ReadEventCycleSummary summary = new ReadEventCycleSummary(_pConfig.getName(),
                                                              summaries,
                                                              scn,
                                                              -1 /* Overall time including query time not calculated */);

    if (_eventsLog.isInfoEnabled())
    {
      _eventsLog.info(summary.toString());
    }

    _log.info("Writing "+ eventsInTransactionCount + " events from transaction with scn: " + scn);
    if(scn <= 0)
      throw new DatabusException("Unable to write events to buffer because of negative/zero scn: " + scn);
View Full Code Here

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

        long endDbUpdatesMs = System.currentTimeMillis();
        long dbUpdatesElapsedTimeMs = endDbUpdatesMs - startDbUpdatesMs;

        // Log Event Summary at logical source level
        EventReaderSummary summary = new EventReaderSummary(sourceId, _monitoredSources.get(sourceId).getSourceName(),
                                                            scn, t.getDbChangeEntrySet().size(), dbUpdatesEventsSize,-1L /* Not supported */,
                                                            dbUpdatesElapsedTimeMs,  timestamp, timestamp, -1L /* Not supported */);
        if (_eventsLog.isInfoEnabled())
        {
          _eventsLog.info(summary.toString());
        }
        summaries.add(summary);

        long tsEnd = System.currentTimeMillis();
        perSourceStats.addTimeOfLastDBAccess(tsEnd);
        globalStats.addTimeOfLastDBAccess(tsEnd);
      }
      _eventBuffer.endEvents(scn, _relayInboundStatsCollector);
      // Log Event Summary at Physical source level
      ReadEventCycleSummary summary = new ReadEventCycleSummary(_physicalSourceStaticConfig.getName(),
                                                                summaries,
                                                                scn,
                                                                -1 /* Overall time including query time not calculated */);

      if (_eventsLog.isInfoEnabled())
      {
        _eventsLog.info(summary.toString());
      }
    }
View Full Code Here

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

    protected EventReaderSummary getSummary(int sourceId)
    {
      DbusEventsTotalStats stats = _stats.getSourceStats(sourceId);
      if (stats != null)
      {
        EventReaderSummary summary = new EventReaderSummary( (short) sourceId, stats.getDimension(),
            stats.getMaxScn(), (int) stats.getNumDataEvents(),
            stats.getSizeDataEvents()*(int) (stats.getNumDataEvents()),
            System.currentTimeMillis(), 0, _stats.getTotalStats().getTimestampMinScnEvent(),
            stats.getTimestampMaxScnEvent(),0L);
        return summary;
View Full Code Here

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

    /**
     * produce diff of eventreader summary s1-s2
     */
    protected EventReaderSummary getDiff(EventReaderSummary s1, EventReaderSummary s2)
    {
      EventReaderSummary diff = new EventReaderSummary(s1.getSourceId(), s1.getSourceName(), s1.getEndOfPeriodSCN(),
          s1.getNumberOfEvents()-s2.getNumberOfEvents(), s1.getSizeOfSerializedEvents()-s2.getSizeOfSerializedEvents(), s1.getReadMillis()-s2.getReadMillis(),
          s1.getEventMillis(),
          s2.getTimeProdEnd(), s1.getTimeProdEnd(), s1.getQueryExecTime());
      return diff;
    }
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.