Package org.apache.helix.monitoring

Examples of org.apache.helix.monitoring.StateTransitionDataPoint


    ParticipantMonitor monitor = new ParticipantMonitor();

    int monitorNum = 0;

    StateTransitionContext cxt = new StateTransitionContext("cluster", "instance", "db_1","a-b");
    StateTransitionDataPoint data = new StateTransitionDataPoint(1000,1000,true);
    monitor.reportTransitionStat(cxt, data);

    data = new StateTransitionDataPoint(1000,1200,true);
    monitor.reportTransitionStat(cxt, data);

    ParticipantMonitorListener monitorListener = new ParticipantMonitorListener("CLMParticipantReport");
    Thread.sleep(1000);
    AssertJUnit.assertTrue(monitorListener._beanValueMap.size() == monitorNum + 1);

    data = new StateTransitionDataPoint(1000,500,true);
    monitor.reportTransitionStat(cxt, data);
    Thread.sleep(1000);
    AssertJUnit.assertTrue(monitorListener._beanValueMap.size() == monitorNum + 1);

    data = new StateTransitionDataPoint(1000,500,true);
    StateTransitionContext cxt2 = new StateTransitionContext("cluster", "instance", "db_2","a-b");
    monitor.reportTransitionStat(cxt2, data);
    monitor.reportTransitionStat(cxt2, data);
    Thread.sleep(1000);
    AssertJUnit.assertTrue(monitorListener._beanValueMap.size() == monitorNum + 2);
View Full Code Here


            new StateTransitionContext(manager.getClusterName(),
                                       manager.getInstanceName(),
                                       message.getResourceName(),
                                       transition);

        StateTransitionDataPoint data =
            new StateTransitionDataPoint(totalDelay,
                                         executionDelay,
                                         taskResult.isSucess());
        _executor.getParticipantMonitor().reportTransitionStat(cxt, data);
      }
    }
View Full Code Here

    ParticipantMonitor monitor = new ParticipantMonitor();

    int monitorNum = 0;

    StateTransitionContext cxt = new StateTransitionContext("cluster", "instance", "db_1", "a-b");
    StateTransitionDataPoint data = new StateTransitionDataPoint(1000, 1000, true);
    monitor.reportTransitionStat(cxt, data);

    data = new StateTransitionDataPoint(1000, 1200, true);
    monitor.reportTransitionStat(cxt, data);

    ParticipantMonitorListener monitorListener =
        new ParticipantMonitorListener("CLMParticipantReport");
    Thread.sleep(1000);
    AssertJUnit.assertTrue(monitorListener._beanValueMap.size() == monitorNum + 1);

    data = new StateTransitionDataPoint(1000, 500, true);
    monitor.reportTransitionStat(cxt, data);
    Thread.sleep(1000);
    AssertJUnit.assertTrue(monitorListener._beanValueMap.size() == monitorNum + 1);

    data = new StateTransitionDataPoint(1000, 500, true);
    StateTransitionContext cxt2 = new StateTransitionContext("cluster", "instance", "db_2", "a-b");
    monitor.reportTransitionStat(cxt2, data);
    monitor.reportTransitionStat(cxt2, data);
    Thread.sleep(1000);
    AssertJUnit.assertTrue(monitorListener._beanValueMap.size() == monitorNum + 2);
View Full Code Here

        StateTransitionContext cxt =
            new StateTransitionContext(manager.getClusterName(), manager.getInstanceName(),
                message.getResourceName(), transition);

        StateTransitionDataPoint data =
            new StateTransitionDataPoint(totalDelay, executionDelay, taskResult.isSuccess());
        _executor.getParticipantMonitor().reportTransitionStat(cxt, data);
      }
    } else {
      logger.warn("message read time and start execution time not recorded.");
    }
View Full Code Here

        StateTransitionContext cxt =
            new StateTransitionContext(manager.getClusterName(), manager.getInstanceName(), message
                .getResourceId().stringify(), transition);

        StateTransitionDataPoint data =
            new StateTransitionDataPoint(totalDelay, executionDelay, taskResult.isSuccess());
        _executor.getParticipantMonitor().reportTransitionStat(cxt, data);
      }
    } else {
      logger.warn("message read time and start execution time not recorded.");
    }
View Full Code Here

    ParticipantMonitor monitor = new ParticipantMonitor();

    int monitorNum = 0;

    StateTransitionContext cxt = new StateTransitionContext("cluster", "instance", "db_1", "a-b");
    StateTransitionDataPoint data = new StateTransitionDataPoint(1000, 1000, true);
    monitor.reportTransitionStat(cxt, data);

    data = new StateTransitionDataPoint(1000, 1200, true);
    monitor.reportTransitionStat(cxt, data);

    ParticipantMonitorListener monitorListener =
        new ParticipantMonitorListener("CLMParticipantReport");
    Thread.sleep(1000);
    AssertJUnit.assertTrue(monitorListener._beanValueMap.size() == monitorNum + 1);

    data = new StateTransitionDataPoint(1000, 500, true);
    monitor.reportTransitionStat(cxt, data);
    Thread.sleep(1000);
    AssertJUnit.assertTrue(monitorListener._beanValueMap.size() == monitorNum + 1);

    data = new StateTransitionDataPoint(1000, 500, true);
    StateTransitionContext cxt2 = new StateTransitionContext("cluster", "instance", "db_2", "a-b");
    monitor.reportTransitionStat(cxt2, data);
    monitor.reportTransitionStat(cxt2, data);
    Thread.sleep(1000);
    AssertJUnit.assertTrue(monitorListener._beanValueMap.size() == monitorNum + 2);
View Full Code Here

            new StateTransitionContext(manager.getClusterName(),
                                       manager.getInstanceName(),
                                       message.getResourceName(),
                                       transition);

        StateTransitionDataPoint data =
            new StateTransitionDataPoint(totalDelay,
                                         executionDelay,
                                         taskResult.isSuccess());
        _executor.getParticipantMonitor().reportTransitionStat(cxt, data);
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.helix.monitoring.StateTransitionDataPoint

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.