Package com.linkedin.databus.bootstrap.api

Examples of com.linkedin.databus.bootstrap.api.BootstrapEventProcessResult


                                ResultSet rs,
                                BootstrapEventCallback callback,
                                long maxRowsPerFetch) throws SQLException,
                                BootstrapProcessingException
  {
    BootstrapEventProcessResult result = null;
    long windowScn = Long.MIN_VALUE;
    long numRowsReadFromDb = 0// Number or rows returned in the result-set so far
    while (rs.next())
    {
      numRowsReadFromDb++;
      long rid = rs.getLong(1);

      result = callback.onEvent(rs, _curStatsCollector);
      if ((result.isClientBufferLimitExceeded()) || (result.isError()))
      { // This break is important because we don't want to checkpoint the current
        // row if it is not sent due to client buffer space limitation.
        break;
      }
View Full Code Here


      values.add(rs.getBytes(4));
    } catch (Exception ex) {
      throw new BootstrapProcessingException(ex);
    }
   
    return new BootstrapEventProcessResult(1, false, false);
  }
View Full Code Here

    {
      LOG.error("SQLException encountered while sending to client row " + rid);
      throw new BootstrapProcessingException(e);
    }

    return new BootstrapEventProcessResult(_numRowsWritten, exceededBufferLimit, dropped);
  }
View Full Code Here

  {
    BootstrapProcessor bp = new BootstrapProcessor();

    long processedRowCount = 1;
    // order of args : processedRowCount, isLimitExceeded, isDropped, isError
    BootstrapEventProcessResult result_ok = new BootstrapEventProcessResult(processedRowCount, false, false, false);
    BootstrapEventProcessResult result_err = new BootstrapEventProcessResult(processedRowCount, false, false, true);
    BootstrapEventProcessResult result_ile = new BootstrapEventProcessResult(processedRowCount, true, false, false);

    Checkpoint ckpt_ss = new Checkpoint("{\"consumption_mode\":\"BOOTSTRAP_SNAPSHOT\", \"bootstrap_since_scn\":0," +
        "\"bootstrap_start_scn\":1000,\"bootstrap_target_scn\":2000,\"bootstrap_catchup_source_index\":0," +
        "\"bootstrap_snapshot_source_index\":1}");
    ckpt_ss.assertCheckpoint();
View Full Code Here

  {
    BootstrapProcessor bp = new BootstrapProcessor();

    long processedRowCount = 1;
    // order of args : processedRowCount, isLimitExceeded, isDropped, isError
    BootstrapEventProcessResult result_ok = new BootstrapEventProcessResult(processedRowCount, false, false, false);
    BootstrapEventProcessResult result_zero_ok = new BootstrapEventProcessResult(0, false, false, false);
    BootstrapEventProcessResult result_err = new BootstrapEventProcessResult(processedRowCount, false, false, true);
    BootstrapEventProcessResult result_zero_ile = new BootstrapEventProcessResult(0, true, false, false);

    Checkpoint ckpt_ss = new Checkpoint("{\"consumption_mode\":\"BOOTSTRAP_SNAPSHOT\", \"bootstrap_since_scn\":0," +
        "\"bootstrap_start_scn\":1000,\"bootstrap_target_scn\":2000,\"bootstrap_catchup_source_index\":0," +
        "\"bootstrap_snapshot_source_index\":1}");
    ckpt_ss.assertCheckpoint();
View Full Code Here

TOP

Related Classes of com.linkedin.databus.bootstrap.api.BootstrapEventProcessResult

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.