Examples of BootstrapDatabaseTooOldException


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

    public Throwable getException(ChunkedBodyReadableByteChannel readChannel)
    {
      switch(_exType)
      {
      case NO_EXCEPTION: return null;
      case BOOTSTRAP_TOO_OLD_EXCEPTION: return new BootstrapDatabaseTooOldException();
      default: return new Exception();
      }
    }
View Full Code Here

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

        curState.getRelayConnection().enableReadFromLatestScn(true);
          _currentState.setRelayFellOff(false);
        curState.switchToStreamResponseDone();
      } else {
        _log.fatal("Got SCNNotFoundException but Read Latest SCN Window and bootstrap are disabled !!");
        _remoteExceptionHandler.handleException(new BootstrapDatabaseTooOldException(knownRemoteError));
        enqueueMessage = false;
      }
    } else {
      _log.info("Requested scn " + cp.getWindowScn() +
          " not found on relay; switching to bootstrap service");
View Full Code Here

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

      {
        remoteException = new ScnNotFoundException();
      }
      else if (err.equalsIgnoreCase(BootstrapDatabaseTooOldException.class.getName()))
      {
        remoteException = new BootstrapDatabaseTooOldException();
      }
      else if (err.equalsIgnoreCase( PullerRetriesExhaustedException.class.getName()))
      {
        remoteException = new PullerRetriesExhaustedException();
      }
View Full Code Here

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

          if ( producerScn < startScn)
          {
            String msg = "Bootstrap Producer has lower SCN than Applier SCN. This is unexpected !! Producer SCN :" + producerScn + ", Applier SCN :" + startScn;
            LOG.fatal(msg);
            throw new BootstrapDatabaseTooOldException(msg);
          }

          if (producerScn < sinceScn)
          { // bootstrap producer needs sometime to consumer events in the buffer, wait a bit.
            LOG.warn("Bootstrap producer has not caught up to all events in its buffer yet to server client properly");
            Thread.sleep(QUERY_WAIT_TIME_SLICE);
          }
        }
        catch (InterruptedException e)
        {
          // keeps on sleeping until timed out
        }
        catch (SQLException e)
        {
          LOG.warn("SQLException encountered while querying for start scn", e);

        }
        finally
        {
        DBHelper.close(rs,getScnStmt, null);
        }
      }

      // Slow Producer case
      if ( producerScn < sinceScn)
      {
        String msg = "Bootstrap producer is slower than the client. Client is at SCN :" + sinceScn
                      + ", Producer is at SCN :" + producerScn + ", Applier is at SCN :" + startScn;
        LOG.error(msg);
        throw new BootstrapDatabaseTooOldException(msg);
      }

      LOG.info("StartSCN Request for sources :" + sources + ",Client SCN :" + sinceScn + ",Producer SCN :" + producerScn + ", Applier SCN :" + startScn);
      return startScn;
    }
View Full Code Here

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

    switch (status)
    {
      case BootstrapProducerStatus.ACTIVE:
        return;
      case BootstrapProducerStatus.FELL_OFF_RELAY:
        throw new BootstrapDatabaseTooOldException("The bootstrap database for source :" + source + " is too old!");
      case BootstrapProducerStatus.SEEDING:
        throw new BootstrapDatabaseTooOldException("The bootstrap database for source :" + source + " is being seeded!");
      case BootstrapProducerStatus.SEEDING_CATCHUP:
        throw new BootstrapDatabaseTooOldException("The bootstrap database for source :" + source + " is seeded but not yet consistent!");
      case BootstrapProducerStatus.INACTIVE:
        throw new BootstrapDatabaseTooOldException("Bootstrapping for source :" + source + " is disabled");
      default:
        // nothing to do at this point for those status
    }
  }
View Full Code Here

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

        if (_bootstrapProducerStaticConfig.isBootstrapDBStateCheck())
        {
          if (!BootstrapProducerStatus.isReadyForConsumption(srcIdStatus
              .getStatus()))
            throw new BootstrapDatabaseTooOldException(
                "Bootstrap DB is not ready to read from relay !! Status :"
                    + srcIdStatus);
        }
      }
    }
View Full Code Here

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

        {
          // TO allow test framework to listen to relay directly,DBStateCheck
          // flag is used
          if (!BootstrapProducerStatus.isReadyForConsumption(srcIdStatus
              .getStatus()))
            throw new BootstrapDatabaseTooOldException(
                "Bootstrap DB not ready to read events from relay, Status :"
                    + srcIdStatus);
        }

        refresh();
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.