Package org.apache.helix.Mocks

Examples of org.apache.helix.Mocks.MockManager


    message.setToState("Slave");
    message.setPartitionName("TestDB_0");
    message.setResourceName("TestDB");
    message.setStateModelDef("MasterSlave");

    MockManager manager = new MockManager("clusterName");
    // DataAccessor accessor = manager.getDataAccessor();
    HelixDataAccessor accessor = manager.getHelixDataAccessor();
    StateModelConfigGenerator generator = new StateModelConfigGenerator();
    StateModelDefinition stateModelDef =
        new StateModelDefinition(generator.generateConfigForMasterSlave());
    Builder keyBuilder = accessor.keyBuilder();
    accessor.setProperty(keyBuilder.stateModelDef("MasterSlave"), stateModelDef);
View Full Code Here


    message.setTgtName("localhost");
    message.setStateModelDef("MasterSlave");
    message.setStateModelFactoryName(HelixConstants.DEFAULT_STATE_MODEL_FACTORY);
    MockStateModel stateModel = new MockStateModel();
    NotificationContext context;
    MockManager manager = new MockManager("clusterName");
//    DataAccessor accessor = manager.getDataAccessor();
    HelixDataAccessor accessor = manager.getHelixDataAccessor();
    StateModelConfigGenerator generator = new StateModelConfigGenerator();
    StateModelDefinition stateModelDef = new StateModelDefinition(
        generator.generateConfigForMasterSlave());
    Builder keyBuilder = accessor.keyBuilder();
    accessor.setProperty(keyBuilder.stateModelDef("MasterSlave"), stateModelDef);
View Full Code Here

    message.setStateModelDef("MasterSlave");
    message.setStateModelFactoryName(HelixConstants.DEFAULT_STATE_MODEL_FACTORY);
    MockStateModelAnnotated stateModel = new MockStateModelAnnotated();
    NotificationContext context;

    MockManager manager = new MockManager("clusterName");
//    DataAccessor accessor = manager.getDataAccessor();
    HelixDataAccessor accessor = manager.getHelixDataAccessor();

    StateModelConfigGenerator generator = new StateModelConfigGenerator();
    StateModelDefinition stateModelDef = new StateModelDefinition(
        generator.generateConfigForMasterSlave());
//    accessor.setProperty(PropertyType.STATEMODELDEFS, stateModelDef, "MasterSlave");
View Full Code Here

  PerformanceHealthReportProvider _healthProvider;
  MockManager _helixManager;

  public void incrementPartitionStat() throws Exception
  {
    _helixManager = new MockManager(CLUSTER_NAME);
    _healthProvider.incrementPartitionStat(STAT_NAME, PARTITION_NAME);
  }
View Full Code Here

    _healthProvider.incrementPartitionStat(STAT_NAME, PARTITION_NAME);
  }

  public void transmitReport() throws Exception
  {
    _helixManager = new MockManager(CLUSTER_NAME);
     Map<String, Map<String, String>> partitionReport = _healthProvider
                  .getRecentPartitionHealthReport();
     ZNRecord record = new ZNRecord(_healthProvider.getReportName());
     if (partitionReport != null) {
           record.setMapFields(partitionReport);
View Full Code Here

  protected MockHealthReportProvider _mockProvider;
 
   @BeforeMethod (groups = {"unitTest"})
  public void setup()
  {
     _providerImpl = new ParticipantHealthReportCollectorImpl(new MockManager(), "instance_123");
     _mockProvider = new MockHealthReportProvider();
  }
View Full Code Here

  public final String           CON          = AlertParser.CONSTANT_NAME;

  @BeforeMethod()
  public void setup()
  {
    _helixManager = new MockManager(CLUSTER_NAME);
    _alertsHolder = new AlertsHolder(_helixManager, new HealthDataCache());
  }
View Full Code Here

  @BeforeMethod (groups = {"unitTest"})
  public void setup()
  {
    HealthDataCache cache = new HealthDataCache();
    _helixManager = new MockManager(CLUSTER_NAME);
    _alertsHolder = new AlertsHolder(_helixManager, cache);
    _statsHolder = _alertsHolder._statsHolder;
  }
View Full Code Here

  StatsHolder                   _statsHolder;

  @BeforeMethod(groups = { "unitTest" })
  public void setup()
  {
    _helixManager = new MockManager(CLUSTER_NAME);
    _statsHolder = new StatsHolder(_helixManager, new HealthDataCache());
  }
View Full Code Here

  StatsHolder                   _statsHolder;

  @BeforeMethod(groups = { "unitTest" })
  public void setup()
  {
    _helixManager = new MockManager(CLUSTER_NAME);
    _statsHolder = new StatsHolder(_helixManager, new HealthDataCache());
  }
View Full Code Here

TOP

Related Classes of org.apache.helix.Mocks.MockManager

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.