Examples of BootstrapDBException


Examples of com.linkedin.databus2.core.container.request.BootstrapDBException

      {
        remoteException = new BootstrapDatabaseTooYoungException();
      }
      else if (err.equalsIgnoreCase(BootstrapDBException.class.getName()))
      {
        remoteException = new BootstrapDBException();
      }
      else if (err.equalsIgnoreCase(SQLException.class.getName()))
      {
        remoteException = new SQLException();
      }
View Full Code Here

Examples of com.linkedin.databus2.core.container.request.BootstrapDBException

    if ((null == sourceNames) || (sourceNames.isEmpty()))
    {
      String msg = "SourceNames is empty for getMinWindowSCNFromStateTable !!";
      LOG.error(msg);
      throw new BootstrapDBException(msg);
    }

    for (String s : sourceNames)
    {
      SourceStatusInfo info = getSrcIdStatusFromDB(s, false);
      if (info.getSrcId() <0)
      {
        String msg = "Unable to determine sourceId for sourceName :" + s + " Source List is :" + sourceNames;
        LOG.error(msg);
        throw new BootstrapDBException(msg);
      }

      srcIdList.add(info.getSrcId());
    }
View Full Code Here

Examples of com.linkedin.databus2.core.container.request.BootstrapDBException

        bootstrapProducerStaticConfig.getBootstrapDBName());
    if (!_dbDao.doesMinScnTableExist())
    {
      LOG.error("Bootstrap table not found! Please create table: "
          + BootstrapDBMetaDataDAO.CREATE_MINSCN_TABLE);
      throw new BootstrapDBException(
          "Bootstrap DB does not have necessary meta data table! "
              + BootstrapDBMetaDataDAO.MIN_SCN_TABLE_NAME);
    }
    initBootstrapDBMetadata();
View Full Code Here

Examples of com.linkedin.databus2.core.container.request.BootstrapDBException

        {
          // Bootstrapping bootstrap Producer not yet supported !!
          String msg = "Bootstrap Producer starting from non-online consumption mode for sources :"
              + sourceNames + ", Ckpt :" + cp;
          LOG.error(msg);
          throw new BootstrapDBException(msg);
        }
        else
        {
          String msg = null;
          if (((cp.getWindowScn() > scn) && (scn > -1))
              || ((cp.getWindowScn() < scn) && (scn > -1)))
          {

            if (((cp.getWindowScn() > scn) && (scn > -1)))
              LOG.warn("Non-Empty checkpint. Bootstrap Producer is at SCN:"
                  + scn
                  + ", while checkpoint is :"
                  + cp
                  + ", Could result in gap in event consumption. Repairing ckpt !!");
            else
              LOG.info("Non-Empty checkpoint. Bootstrap Producer is at SCN:"
                  + scn + ", while checkpoint is :" + cp
                  + ", Copying producer Scn to checkpoint !!");

            cp.setWindowScn(scn);
            cp.setWindowOffset(-1);
            try
            {
              provider.removeCheckpoint(sourceNames);
              provider.storeCheckpoint(sourceNames, cp);

              // Check if persisted properly
              cp = provider.loadCheckpoint(sourceNames);
              if ((null == cp)
                  || (cp.getWindowScn() != scn)
                  || (cp.getWindowOffset() != -1)
                  || (cp.getConsumptionMode() != DbusClientMode.ONLINE_CONSUMPTION))
              {
                msg = "Unable to repair and store the new checkpoint (" + cp
                    + ") to make it same as producer SCN (" + scn + ") !!";
                LOG.fatal(msg);
                throw new BootstrapDBException(msg);
              }
            } catch (IOException ex)
            {
              msg = "Unable to repair and store the new checkpoint (" + cp
                  + ") to make it same as producer SCN (" + scn + ") !!";
              LOG.fatal(msg, ex);
              throw new BootstrapDBException(msg);
            }
          }
        }
      }
      else
      {
        /**
         * Currently since bootstrapping is not available, a null ckpt would
         * result in flexible checkpoint and could result in gap !!
         */
        if (scn > -1)
        {
          String msg = "Empty checkpoint. Bootstrap Producer SCN is at SCN:"
              + scn
              + ", while checkpoint is null !! Could result in gap in event consumption. Repairing ckpt !!";
          LOG.warn(msg);
          cp = new Checkpoint();
          cp.setWindowScn(scn);
          cp.setWindowOffset(-1);
          cp.setConsumptionMode(DbusClientMode.ONLINE_CONSUMPTION);
          try
          {
            provider.removeCheckpoint(sourceNames);
            provider.storeCheckpoint(sourceNames, cp);

            // Check if persisted properly
            cp = provider.loadCheckpoint(sourceNames);
            if ((null == cp)
                || (cp.getWindowScn() != scn)
                || (cp.getWindowOffset() != -1)
                || (cp.getConsumptionMode() != DbusClientMode.ONLINE_CONSUMPTION))
            {
              LOG.fatal("Unable to repair and store the checkpoint (" + cp
                  + ") to make it same as producer SCN (" + scn + ") !!");
              throw new BootstrapDBException(msg);
            }
          } catch (IOException ex)
          {
            msg = "Unable to repair and store the checkpoint (" + cp
                + ") to make it same as producer SCN (" + scn + ") !!";
            LOG.fatal(msg, ex);
            throw new BootstrapDBException(msg);
          }
        }
      }
    }
    LOG.info("Validating bootstrap DB checkpoints done successfully!!");
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.