Package com.linkedin.helix.healthcheck

Examples of com.linkedin.helix.healthcheck.ParticipantHealthReportCollectorImpl


      if (fromState.equalsIgnoreCase("SLAVE") && toState.equalsIgnoreCase("MASTER"))
      {
      //add a stat and report to ZK
      //perhaps should keep reporter per instance...
      ParticipantHealthReportCollectorImpl reporter =
          new ParticipantHealthReportCollectorImpl(manager, instance);
      MockEspressoHealthReportProvider provider = new
          MockEspressoHealthReportProvider();
      reporter.addHealthReportProvider(provider);
      String statName = "latency";
      //using constant as timestamp so that when each partition does this transition,
      //they do not advance timestamp, and no stats double-counted
      String timestamp = "12345";
      provider.setStat(_dbName, statName,"15", timestamp);


      //sleep for random time and see about errors.
      /*
      Random r = new Random();
      int x = r.nextInt(30000);
      try {
      Thread.sleep(x);
    } catch (InterruptedException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    */

       reporter.transmitHealthReports();

      /*
        for (int i = 0; i < 5; i++)
        {
          accessor.setProperty(PropertyType.HEALTHREPORT,
View Full Code Here


          && toState.equalsIgnoreCase("MASTER"))
      {

      //add a stat and report to ZK
      //perhaps should keep reporter per instance...
      ParticipantHealthReportCollectorImpl reporter =
          new ParticipantHealthReportCollectorImpl(manager, instance);
      MockEspressoHealthReportProvider provider = new
          MockEspressoHealthReportProvider();
      reporter.addHealthReportProvider(provider);
      String statName = "latency";
      provider.setStat(_dbName, statName,"15");
       reporter.transmitHealthReports();


      /*
        for (int i = 0; i < 5; i++)
        {
View Full Code Here

          && toState.equalsIgnoreCase("MASTER"))
      {

      //add a stat and report to ZK
      //perhaps should keep reporter per instance...
      ParticipantHealthReportCollectorImpl reporter =
          new ParticipantHealthReportCollectorImpl(manager, instance);
      MockEspressoHealthReportProvider provider = new
          MockEspressoHealthReportProvider();
      reporter.addHealthReportProvider(provider);
      String statName = "latency";
      provider.setStat(_dbName, statName,"15");
       reporter.transmitHealthReports();

      /*
        for (int i = 0; i < 5; i++)
        {
          accessor.setProperty(PropertyType.HEALTHREPORT,
View Full Code Here

      if (fromState.equalsIgnoreCase("SLAVE") && toState.equalsIgnoreCase("MASTER"))
      {

        // add a stat and report to ZK
        // perhaps should keep reporter per instance...
        ParticipantHealthReportCollectorImpl reporter =
            new ParticipantHealthReportCollectorImpl(manager, instance);
        MockEspressoHealthReportProvider provider =
            new MockEspressoHealthReportProvider();
        reporter.addHealthReportProvider(provider);
        String statName = "latency";
        provider.setStat(_dbName, statName, "15");
        reporter.transmitHealthReports();

        // sleep long enough for first set of alerts to report and alert to get deleted
        // then change reported data
        try
        {
          Thread.sleep(10000);
        }
        catch (InterruptedException e)
        {
          System.err.println("Error sleeping");
        }
        provider.setStat(_dbName, statName, "1");
        reporter.transmitHealthReports();

        /*
         * for (int i = 0; i < 5; i++) { accessor.setProperty(PropertyType.HEALTHREPORT,
         * new ZNRecord("mockAlerts" + i), instance, "mockAlerts"); try {
         * Thread.sleep(1000); } catch (InterruptedException e) { // TODO Auto-generated
View Full Code Here

    addControllerListener(_helixAccessor);

    if (_participantHealthCheckInfoCollector == null)
    {
      _participantHealthCheckInfoCollector =
          new ParticipantHealthReportCollectorImpl(this, _instanceName);
      _participantHealthCheckInfoCollector.start();
    }
    // start the participant health check timer, also create zk path for health
    // check info
    String healthCheckInfoPath =
View Full Code Here

          && toState.equalsIgnoreCase("MASTER"))
      {

      //add a stat and report to ZK
      //perhaps should keep reporter per instance...
      ParticipantHealthReportCollectorImpl reporter =
          new ParticipantHealthReportCollectorImpl(manager, instance);
      MockEspressoHealthReportProvider provider = new
          MockEspressoHealthReportProvider();
      reporter.addHealthReportProvider(provider);
      String statName = "latency";
      provider.setStat(_dbName, statName,""+(0.1+_alertValue));
      reporter.transmitHealthReports();

      /*
        for (int i = 0; i < 5; i++)
        {
          accessor.setProperty(PropertyType.HEALTHREPORT,
View Full Code Here

          && toState.equalsIgnoreCase("MASTER"))
      {

      //add a stat and report to ZK
      //perhaps should keep reporter per instance...
      ParticipantHealthReportCollectorImpl reporter =
          new ParticipantHealthReportCollectorImpl(manager, instance);
      MockEspressoHealthReportProvider provider = new
          MockEspressoHealthReportProvider();
      reporter.addHealthReportProvider(provider);
      String statName = "latency";
      provider.setStat(_dbName, statName,""+(0.1+_alertValue));
      reporter.transmitHealthReports();

      /*
        for (int i = 0; i < 5; i++)
        {
          accessor.setProperty(PropertyType.HEALTHREPORT,
View Full Code Here

    addControllerListener(_helixAccessor);

    if (_participantHealthCheckInfoCollector == null)
    {
      _participantHealthCheckInfoCollector =
          new ParticipantHealthReportCollectorImpl(this, _instanceName);
      _participantHealthCheckInfoCollector.start();
    }
    // start the participant health check timer, also create zk path for health
    // check info
    String healthCheckInfoPath =
View Full Code Here

TOP

Related Classes of com.linkedin.helix.healthcheck.ParticipantHealthReportCollectorImpl

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.