Package com.linkedin.databus.core

Examples of com.linkedin.databus.core.DatabusRuntimeException


    }

    VersionedSchema schema = getMetadataSchema(metadataPart);
    if (null == schema)
    {
      throw new DatabusRuntimeException("No schema available to decode metadata for event " + e);
    }

    byte[] dataBytes = null;
    if (dataBuffer.hasArray())
    {
View Full Code Here


    VersionedSchema writerSchema = _schemaSet.getById(schemaId);

    if (null == writerSchema)
    {
      LOG.error("Unable to find schema for id " + schemaId + "; event = " + e);
      throw new DatabusRuntimeException("No schema available to decode event " + e);
    }

    ByteBuffer valueBuffer = e.value();
    byte[] valueBytes = new byte[valueBuffer.remaining()];
    valueBuffer.get(valueBytes);
View Full Code Here

    }

    VersionedSchema schema = getMetadataSchema(metadataPart);
    if (null == schema)
    {
      throw new DatabusRuntimeException("No schema available to decode metadata for event " + e);
    }

    return schema;
  }
View Full Code Here

      {
        _log.info(String.format("Open Replicator starting from %s@%d", binlogFile, offset));
        _or.start();
      } catch (Exception e)
      {
        throw new DatabusRuntimeException("failed to start open replicator: " + e.getMessage(), e);
      }
      _log.info("Event Producer Thread done");

    }
View Full Code Here

      startSource(newTableName, newTableId);
    }
    else
    {
      _log.error("Unexpected : TableMap Event obtained :" + tme);
      throw new DatabusRuntimeException("Unexpected : TableMap Event obtained :" +
          " _currTableName = " + _currTableName +
          " _curTableId = " + _currTableId +
          " newTableName = " + newTableName +
          " newTableId = " + newTableId);
    }

    if (errorTransition)
    {
      throw new DatabusRuntimeException("TableName and TableId should change simultaneously or not" +
          " _currTableName = " + _currTableName +
          " _curTableId = " + _currTableId +
          " newTableName = " + newTableName +
          " newTableId = " + newTableId);
    }
View Full Code Here

    {
      _transaction = new Transaction();
    }
    else
    {
      throw new DatabusRuntimeException("Got startXtion without an endXtion for previous transaction");
    }
  }
View Full Code Here

    _currTxnTimestamp = e.getHeader().getTimestamp() * 1000000L;
    long txnReadLatency = System.nanoTime() - _currTxnStartReadTimestamp;
    boolean em = ((e instanceof QueryEvent) || ( e instanceof XidEvent));
    if (! em)
    {
      throw new DatabusRuntimeException("endXtion should be called with either QueryEvent of XidEvent");
    }
    _transaction.setSizeInBytes(_currTxnSizeInBytes);
    _transaction.setTxnNanoTimestamp(_currTxnTimestamp);
    _transaction.setTxnReadLatencyNanos(txnReadLatency);
    try
    {
      _txnProcessor.onEndTransaction(_transaction);
    } catch (DatabusException e3)
    {
      _log.error("Got exception in the transaction handler ",e3);
      throw new DatabusRuntimeException(e3);
    }
    finally
    {
      reset();

View Full Code Here

    {
      Short srcId = _tableUriToSrcIdMap.get(_currTableName);

      if (null == srcId)
      {
        throw new DatabusRuntimeException("Could not find a matching logical source for table Uri (" + _currTableName + ")" );
      }
      assert(_transaction != null);
      _perSourceTransaction = new PerSourceTransaction(srcId);
      _transaction.mergePerSourceTransaction(_perSourceTransaction);
    }
    else
    {
      throw new DatabusRuntimeException("Seems like a startSource has been received without an endSource for previous source");
    }
  }
View Full Code Here

    {
      _perSourceTransaction = null;
    }
    else
    {
      throw new DatabusRuntimeException("_perSourceTransaction should not be null in endSource()");
    }
  }
View Full Code Here

        DbChangeEntry db = new DbChangeEntry(scn, timestampInNanos, gr, doc, isReplicated, schema, kps);
        _perSourceTransaction.mergeDbChangeEntrySet(db);
      }
    } catch (NoSuchSchemaException ne)
    {
      throw new DatabusRuntimeException(ne);
    } catch (DatabusException de)
    {
      throw new DatabusRuntimeException(de);
    }
  }
View Full Code Here

TOP

Related Classes of com.linkedin.databus.core.DatabusRuntimeException

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.