Package com.linkedin.databus.core

Examples of com.linkedin.databus.core.DatabusRuntimeException


      // Get all relevant pConfig attributes
      //TODO add real instantiation
      EventProducerServiceProvider mockProvider = _producersRegistry.getEventProducerServiceProvider("mock");
      if (null == mockProvider)
      {
        throw new DatabusRuntimeException("relay event producer not available: " + "mock");
      }
      producer = mockProvider.createProducer(pConfig, schemaRegistryService,
                                             dbusEventBuffer,
                                             _inBoundStatsCollectors
                                                     .getStatsCollector(statsCollectorName),
                                             maxScnReaderWriters);
    } else if (uri.startsWith("gg:")){
      producer = new GoldenGateEventProducer(pConfig,
                                             schemaRegistryService,
                                             dbusEventBuffer,
                                             _inBoundStatsCollectors
                                                 .getStatsCollector(statsCollectorName),
                                             maxScnReaderWriters);

    } else if (uri.startsWith("mysql:")){
       LOG.info("Adding OpenReplicatorEventProducer for uri :" + uri);
       final String serviceName = "or";
       EventProducerServiceProvider orProvider = _producersRegistry.getEventProducerServiceProvider(serviceName);
       if (null == orProvider)
       {
         throw new DatabusRuntimeException("relay event producer not available: " + serviceName);
       }
       producer = orProvider.createProducer(pConfig, schemaRegistryService,
                                            dbusEventBuffer,
                                            _inBoundStatsCollectors.getStatsCollector(statsCollectorName),
                                            maxScnReaderWriters);
View Full Code Here


          //if (null != _bootstrapSource) cpNew.setSnapshotSource(_bootstrapSource);
          cpNew.setSnapshotOffset(-1);
          break;
        }
        default:
          throw new DatabusRuntimeException("unsupported checkpoint type: " + _cpType);
      }
    }

    return cpNew;
  }
View Full Code Here

        // isn't thread-safe, so we need one instance per connection
        loggingConsumer = new LoggingConsumer(serverHandle.getClientStaticConfig().getLoggingListener());
      }
      catch (InvalidConfigException e)
      {
        throw new DatabusRuntimeException(e)// alternatively:  declare InvalidConfigException, let it go
      }
    }

    MultiConsumerCallback relayAsyncCallback =
        new MultiConsumerCallback((null != _relayRegistrations) ?
View Full Code Here

    {
      _conn = conn;
    }
    else
    {
      throw new DatabusRuntimeException("Invalid to pass in a null connection object");
    }

    if (null != bootstrapDBCleanerQueryHelper)
    {
      _bootstrapDBCleanerQueryHelper = bootstrapDBCleanerQueryHelper;
    }
    else
    {
      throw new DatabusRuntimeException("Invalid to pass in a null for bootstrapDBCleanerQueryHelper");
    }

  }
View Full Code Here

  public long encode(long genId, int index, int offset)
  {
    final long shiftedOffset = ((long)offset) << _offsetShift;
    if (offset < 0 || shiftedOffset > _offsetMask)
    {
      throw new DatabusRuntimeException("invalid position offset: " + offset);
    }
    final long shiftedIndex = ((long)index) << _indexShift;
    if (index < 0 || shiftedIndex > _indexMask)
    {
      throw new DatabusRuntimeException("invalid position index: " + index);
    }
    final long shiftedGenId = (genId) << _genIdShift;
    if (genId < 0 || shiftedGenId > _genIdMask)
    {
      throw new DatabusRuntimeException("invalid position gen-id: " + genId);
    }

    final long pos = shiftedGenId | shiftedIndex | shiftedOffset;
    return pos;
  }
View Full Code Here

    // proposedOffset > currentBufferLimit and not okToRegress.... weird

    LOG.error("proposedOffset " + proposedOffset + " is greater than " + currentBufferLimit + " capacity = " + currentBufferCapacity);
    LOG.error("currentPosition = " + toString(currentPosition) + " increment = " + increment);
    throw new DatabusRuntimeException("Error in _bufferOffset")// not changing to "buffer position" since widely recognized error
  }
View Full Code Here

      sb.append(";Offset=")
        .append(bufferOffset(position))
        .append("]");
      if (buffers != null && (index < 0 || index >= buffers.length))
      {
        throw new DatabusRuntimeException("invalid position index: " + sb.toString());
      }
      return sb.toString();
    }
  }
View Full Code Here

  {
    if (null != curState.getCurrentSource())
    {
      if (null == _lastCkpt)
      {
        throw new DatabusRuntimeException("Unable to create a checkpoint");
        //NOTE: we cannot create a checkpoint here as we don't know the sinceSCN, bootstrap stage, etc.
      }
      _lastCkpt.onEvent(event);
    }
    return _lastCkpt;
View Full Code Here

        }
      }
    }
    else
    {
      throw new DatabusRuntimeException("Unknown checkpoint type:" + _currState);
    }

    return _currState;
  }
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 = null;
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.