Package com.linkedin.databus.client.registration

Examples of com.linkedin.databus.client.registration.ClusterRegistrationStaticConfig


        String clusterName = e.getValue().getClusterName();

        if (clientClusterStaticConfigs.containsKey(clusterName))
            throw new InvalidConfigException("Duplicate configuration for client cluster :" + clusterName);

        ClusterRegistrationStaticConfig c = e.getValue().build();

        clientClusterStaticConfigs.put(clusterName, c);
      }

      return new StaticConfig(getCheckpointPersistence().build(), sconfig,
View Full Code Here


    if ( _activeClusters.contains(cluster))
      throw new DatabusClientException("Cluster :" + cluster + " has already been registed to this client instance." +
                                       " Only one registration per cluster is allowed for a databus client instance !!");

    ClusterRegistrationStaticConfig c = _clientStaticConfig.getClientCluster(cluster);

    if ( null == c )
      throw new DatabusClientException("Cluster Configuration for cluster (" + cluster + ") not provided !!");

    if ( null == consumerFactory)
      throw new DatabusClientException("Consumer Factory is null !!");

    ClusterCheckpointPersistenceProvider.StaticConfig ckptPersistenceProviderConfig =
        new ClusterCheckpointPersistenceProvider.StaticConfig(c.getZkAddr(),c.getClusterName(),c.getMaxCkptWritesSkipped(),c.getCheckpointIntervalMs());

    DbusClusterInfo clusterInfo = new DbusClusterInfo(c.getClusterName(), c.getNumPartitions(), c.getQuorum());

    RegistrationId regId = RegistrationIdGenerator.generateNewId(c.getClusterName());

    DatabusV2ClusterRegistrationImpl reg =
        new DatabusV2ClusterRegistrationImpl(regId, this, ckptPersistenceProviderConfig, clusterInfo, consumerFactory, filterFactory, partitionListener, sources);
    _regList.add(reg);
    reg.onRegister();
View Full Code Here

        _quorum = quorum;
    }

    public  void createCluster() throws Exception
    {
        ClusterRegistrationStaticConfig c =
                  new ClusterRegistrationStaticConfig(_clusterName, zkAddr, _numPartitions, _quorum, 0,5*60*1000, 30*1000, 60*100);
        _cluster = new DatabusCluster(c);
        LOG.warn("Created cluster object! " + _clusterName + " id = " + _id);
            _notifier = new TestDatabusClusterNotifier(_id);
            //get global and local allocation notifications
            _cluster.addDataNotifier(_notifier);
View Full Code Here

TOP

Related Classes of com.linkedin.databus.client.registration.ClusterRegistrationStaticConfig

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.