requiredPaths.add(PropertyPathBuilder.stateModelDef(clusterName)); requiredPaths.add(PropertyPathBuilder.controllerMessage(clusterName)); requiredPaths.add(PropertyPathBuilder.controllerError(clusterName)); requiredPaths.add(PropertyPathBuilder.controllerStatusUpdate(clusterName)); requiredPaths.add(PropertyPathBuilder.controllerHistory(clusterName));
requiredPaths.add(PropertyPathBuilder.stateModelDef(clusterName)); requiredPaths.add(PropertyPathBuilder.controllerMessage(clusterName)); requiredPaths.add(PropertyPathBuilder.controllerError(clusterName)); requiredPaths.add(PropertyPathBuilder.controllerStatusUpdate(clusterName)); requiredPaths.add(PropertyPathBuilder.controllerHistory(clusterName));
@Override public void run() { // For each record in status update and error node // TODO: for now the status updates are dumped to cluster manager log4j log. // We need to think if we should create per-instance log files that contains // per-instance statusUpdates // and errors LOG.info("Scan statusUpdates and errors for cluster: " + _manager.getClusterName() + ", by controller: " + _manager); HelixDataAccessor accessor = _manager.getHelixDataAccessor(); Builder keyBuilder = accessor.keyBuilder(); BaseDataAccessor<ZNRecord> baseAccessor = accessor.getBaseDataAccessor(); List<String> instances = accessor.getChildNames(keyBuilder.instanceConfigs()); for (String instance : instances) { // dump participant status updates String statusUpdatePath = PropertyPathBuilder.instanceStatusUpdate(_manager.getClusterName(), instance); dump(baseAccessor, statusUpdatePath, _thresholdNoChangeMsForStatusUpdates, _maxLeafCount); // dump participant errors String errorPath = PropertyPathBuilder.instanceError(_manager.getClusterName(), instance); dump(baseAccessor, errorPath, _thresholdNoChangeMsForErrors, _maxLeafCount); } // dump controller status updates String controllerStatusUpdatePath = PropertyPathBuilder.controllerStatusUpdate(_manager.getClusterName()); dump(baseAccessor, controllerStatusUpdatePath, _thresholdNoChangeMsForStatusUpdates, _maxLeafCount); // dump controller errors String controllerErrorPath = PropertyPathBuilder.controllerError(_manager.getClusterName()); dump(baseAccessor, controllerErrorPath, _thresholdNoChangeMsForErrors, _maxLeafCount); }
@Override public void run() { // For each record in status update and error node // TODO: for now the status updates are dumped to cluster manager log4j log. // We need to think if we should create per-instance log files that contains // per-instance statusUpdates // and errors LOG.info("Scan statusUpdates and errors for cluster: " + _manager.getClusterName() + ", by controller: " + _manager); HelixDataAccessor accessor = _manager.getHelixDataAccessor(); Builder keyBuilder = accessor.keyBuilder(); BaseDataAccessor<ZNRecord> baseAccessor = accessor.getBaseDataAccessor(); List<String> instances = accessor.getChildNames(keyBuilder.instanceConfigs()); for (String instance : instances) { // dump participant status updates String statusUpdatePath = PropertyPathBuilder.instanceStatusUpdate(_manager.getClusterName(), instance); dump(baseAccessor, statusUpdatePath, _thresholdNoChangeMsForStatusUpdates, _maxLeafCount); // dump participant errors String errorPath = PropertyPathBuilder.instanceError(_manager.getClusterName(), instance); dump(baseAccessor, errorPath, _thresholdNoChangeMsForErrors, _maxLeafCount); } // dump controller status updates String controllerStatusUpdatePath = PropertyPathBuilder.controllerStatusUpdate(_manager.getClusterName()); dump(baseAccessor, controllerStatusUpdatePath, _thresholdNoChangeMsForStatusUpdates, _maxLeafCount); // dump controller errors String controllerErrorPath = PropertyPathBuilder.controllerError(_manager.getClusterName()); dump(baseAccessor, controllerErrorPath, _thresholdNoChangeMsForErrors, _maxLeafCount); }
_zkClient.createPersistent(path); path = PropertyPathBuilder.controllerError(clusterName); _zkClient.createPersistent(path);
_zkClient.createPersistent(path); path = PropertyPathBuilder.controllerError(clusterName); _zkClient.createPersistent(path);
_baseDataAccessor.create(path, new ZNRecord(clusterName), 0); path = PropertyPathBuilder.controllerError(clusterName); _baseDataAccessor.create(path, new ZNRecord(clusterName), 0);