Package com.linkedin.databus.client.pub

Examples of com.linkedin.databus.client.pub.DbusPartitionInfo


  private static DbusKeyCompositeFilterConfig createFakeFilter() throws DatabusException
  {
    DbusModPartitionedFilterFactory filterFactory = new DbusModPartitionedFilterFactory("source1");
    DbusClusterInfo cluster = new DbusClusterInfo("cluster", 2, 2);
    DbusPartitionInfo partition = new DbusPartitionInfo() {
      @Override
      public long getPartitionId() { return 1; }
      @Override
      public boolean equalsPartition(DbusPartitionInfo other) { return true; }
    };
View Full Code Here


   *           When cluster or partition is not hosted in this instance.
   */
  private RegInfo getV2PartitionRegistration(String cluster, long partition) throws RequestProcessingException
  {
    DatabusV2ClusterRegistrationImpl reg = getV2ClusterRegistration(cluster);
    DbusPartitionInfo p = new DbusPartitionInfoImpl(partition);
    DatabusRegistration r = reg.getPartitionRegs().get(p);

    if (null == r)
      throw new RequestProcessingException("Partition(" + partition + ") for cluster ("
          + cluster + ") not found !!");
View Full Code Here

  @Override
  public synchronized void onGainedPartitionOwnership(int partition)
  {
    _log.info("Partition (" + partition + ") getting added !!");

    DbusPartitionInfo partitionInfo = new DbusPartitionInfoImpl(partition);
    try {
      addPartition(partitionInfo);
    } catch (DatabusClientException e) {
      _log.error("Unable to add partition. Shutting down the cluster !!", e);
      deregister();
View Full Code Here

  @Override
  public synchronized void onLostPartitionOwnership(int partition)
  {
    _log.info("Partition (" + partition + ") getting removed !!");

    DbusPartitionInfo partitionInfo = new DbusPartitionInfoImpl(partition);
    try {
      dropOnePartition(partitionInfo);
    } catch (DatabusException e) {
      _log.error("Unable to drop partition. Shutting down the cluster !!", e);
      deregister();
View Full Code Here

TOP

Related Classes of com.linkedin.databus.client.pub.DbusPartitionInfo

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.