use of com.yahoo.vespa.clustercontroller.utils.util.NoMetricReporter in project vespa by vespa-engine.
the class FleetController method createForStandAlone.
public static FleetController createForStandAlone(FleetControllerOptions options) throws Exception {
Timer timer = new RealTimer();
RpcServer rpcServer = new RpcServer(timer, timer, options.clusterName, options.fleetControllerIndex, options.slobrokBackOffPolicy);
StatusPageServer statusPageServer = new StatusPageServer(timer, timer, options.httpPort);
return create(options, timer, statusPageServer, rpcServer, new NoMetricReporter());
}
use of com.yahoo.vespa.clustercontroller.utils.util.NoMetricReporter in project vespa by vespa-engine.
the class FleetControllerTest method createFleetController.
protected FleetController createFleetController(boolean useFakeTimer, FleetControllerOptions options, boolean startThread, StatusPageServerInterface status) throws Exception {
Timer timer = useFakeTimer ? this.timer : new RealTimer();
MetricUpdater metricUpdater = new MetricUpdater(new NoMetricReporter(), options.fleetControllerIndex);
EventLog log = new EventLog(timer, metricUpdater);
ContentCluster cluster = new ContentCluster(options.clusterName, options.nodes, options.storageDistribution, options.minStorageNodesUp, options.minRatioOfStorageNodesUp);
NodeStateGatherer stateGatherer = new NodeStateGatherer(timer, timer, log);
Communicator communicator = new RPCCommunicator(RPCCommunicator.createRealSupervisor(), timer, options.fleetControllerIndex, options.nodeStateRequestTimeoutMS, options.nodeStateRequestTimeoutEarliestPercentage, options.nodeStateRequestTimeoutLatestPercentage, options.nodeStateRequestRoundTripTimeMaxSeconds);
SlobrokClient lookUp = new SlobrokClient(timer);
lookUp.setSlobrokConnectionSpecs(new String[0]);
if (status == null) {
status = new StatusPageServer(timer, timer, options.httpPort);
}
RpcServer rpcServer = new RpcServer(timer, timer, options.clusterName, options.fleetControllerIndex, options.slobrokBackOffPolicy);
DatabaseHandler database = new DatabaseHandler(timer, options.zooKeeperServerAddress, options.fleetControllerIndex, timer);
StateChangeHandler stateGenerator = new StateChangeHandler(timer, log, metricUpdater);
SystemStateBroadcaster stateBroadcaster = new SystemStateBroadcaster(timer, timer);
MasterElectionHandler masterElectionHandler = new MasterElectionHandler(options.fleetControllerIndex, options.fleetControllerCount, timer, timer);
FleetController controller = new FleetController(timer, log, cluster, stateGatherer, communicator, status, rpcServer, lookUp, database, stateGenerator, stateBroadcaster, masterElectionHandler, metricUpdater, options);
if (startThread) {
controller.start();
}
return controller;
}
use of com.yahoo.vespa.clustercontroller.utils.util.NoMetricReporter in project vespa by vespa-engine.
the class StateChangeTest method initialize.
private void initialize(FleetControllerOptions options) throws Exception {
List<Node> nodes = new ArrayList<>();
for (int i = 0; i < options.nodes.size(); ++i) {
nodes.add(new Node(NodeType.STORAGE, i));
nodes.add(new Node(NodeType.DISTRIBUTOR, i));
}
communicator = new DummyCommunicator(nodes, timer);
MetricUpdater metricUpdater = new MetricUpdater(new NoMetricReporter(), options.fleetControllerIndex);
eventLog = new EventLog(timer, metricUpdater);
ContentCluster cluster = new ContentCluster(options.clusterName, options.nodes, options.storageDistribution, options.minStorageNodesUp, options.minRatioOfStorageNodesUp);
NodeStateGatherer stateGatherer = new NodeStateGatherer(timer, timer, eventLog);
DatabaseHandler database = new DatabaseHandler(timer, options.zooKeeperServerAddress, options.fleetControllerIndex, timer);
StateChangeHandler stateGenerator = new StateChangeHandler(timer, eventLog, metricUpdater);
SystemStateBroadcaster stateBroadcaster = new SystemStateBroadcaster(timer, timer);
MasterElectionHandler masterElectionHandler = new MasterElectionHandler(options.fleetControllerIndex, options.fleetControllerCount, timer, timer);
ctrl = new FleetController(timer, eventLog, cluster, stateGatherer, communicator, null, null, communicator, database, stateGenerator, stateBroadcaster, masterElectionHandler, metricUpdater, options);
ctrl.tick();
if (options.fleetControllerCount == 1) {
markAllNodesAsUp(options);
}
}
use of com.yahoo.vespa.clustercontroller.utils.util.NoMetricReporter in project vespa by vespa-engine.
the class ClusterFixture method createNodeStateChangeHandlerForCluster.
public StateChangeHandler createNodeStateChangeHandlerForCluster() {
final int controllerIndex = 0;
MetricUpdater metricUpdater = new MetricUpdater(new NoMetricReporter(), controllerIndex);
return new StateChangeHandler(timer, eventLog, metricUpdater);
}
Aggregations