Package com.linkedin.databus2.core

Examples of com.linkedin.databus2.core.DatabusException


      }
    }


    if(_currentTimeStamp == UNINITIALIZEDTS)
      throw new DatabusException("Unable to locate timestamp in the transaction tag in the xml");

    // start of new transaction
    if(_startTransProcessingTimeNs == 0) {
      _startTransProcessingTimeNs = System.nanoTime();
      _startTransLocation = xmlStreamReader.getLocation().getCharacterOffset();
View Full Code Here


    _numTxnsSeen++;

    if (! _firstTxnSeen )
    {
      if ((_targetScn >= 0) && (_targetScn < _minScn))  // common case:  need to try previous trail file instead
        throw new DatabusException("SinceSCN is less than MinScn available in trail file. Requested SinceSCN is :"
            + _targetScn + " but found only : " + _minScn
            + " in Location " + _txnPos);
    }
    _firstTxnSeen = true;
    _beginTxnSeen = false;
View Full Code Here

  public PrimaryKey(String pKey) throws DatabusException
  {
    if (pKey == null)
    {
      throw new DatabusException("PrimaryKey cannot be null");
    }
    _pKey = pKey;
    String[] pKeyList = _pKey.split(DbusConstants.COMPOUND_KEY_SEPARATOR);
    assert (pKeyList.length >= 1);
    for (String s: pKeyList)
View Full Code Here

    {
      preparedStatement = conn.prepareStatement(sql.toString());
      rs = preparedStatement.executeQuery();

      if (rs == null) {
        throw new DatabusException(
            "No sources to track in this bootstrap producer. ResultSet is null");
      }

      while (rs.next()) {
        handler.processRow(rs);
View Full Code Here

    try
    {
      for (String s : srcUris)
        uris[i++] = new URI(s);
    } catch (URISyntaxException e) {
      throw new DatabusException(e);
    }
    return uris;
  }
View Full Code Here

    long waitTime = 0;
    while (isAnyCleanerRunning())
    {
      if (waitTime >= TERMINATION_TIMEOUT_IN_MS)
      {
        throw new DatabusException("The cleaners have not terminated within " + maxWaitTime + " ms");
      }
      final long sleepIntervalInMs = 100;
      Thread.sleep(sleepIntervalInMs);
      waitTime += sleepIntervalInMs;
    }
View Full Code Here

    try
    {
      for (String s : srcUris)
        uris[i++] = new URI(s);
    } catch (URISyntaxException e) {
      throw new DatabusException(e);
    }
    return uris;
  }
View Full Code Here

      }
    }

    //Adding a new invariant to get rid of checkAndMovetoNextTagSet, each state upon processing the element should have the stream reader at the end tag
    if(!xmlStreamReader.isEndElement())
      throw new DatabusException("The process element is expected to leave the xml stream reader at end element");
    setNextStateProcessor(stateMachine, xmlStreamReader);
  }
View Full Code Here

      LOG.debug("picking scn from token state: " + stateMachine.tokenState.getScn());

    if( (ReplicationBitSetterStaticConfig.SourceType.TOKEN == stateMachine.getReplicationBitConfig().getSourceType())
        && (!stateMachine.tokenState.isSeenReplicationField())
        && (MissingValueBehavior.STOP_WITH_ERROR == stateMachine.getReplicationBitConfig().getMissingValueBehavior()))
      throw new DatabusException("The replication field was not seen in the trail files in the tokens, this field is mandatory! The scn associated is: "+ stateMachine.tokenState.getScn());

    setScn(stateMachine.tokenState.getScn());
   
    if ( stateMachine.tokenState.isSeenReplicationField())
      _isReplicated = stateMachine.tokenState.isReplicated();
View Full Code Here

  public static String uriToGGDir(String uri)
      throws DatabusException
  {
    if (uri == null)
    {
      throw new DatabusException("uri passed is null and not valid");
    }

    Pattern pattern = Pattern.compile("gg://(.*):(.*)");
    Matcher matcher = pattern.matcher(uri);
    if (!matcher.matches() || matcher.groupCount() != 2)
    {
      throw new DatabusException("Expected uri format for gg path not found");
    }

    return matcher.group(1);
  }
View Full Code Here

TOP

Related Classes of com.linkedin.databus2.core.DatabusException

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.