/** * Writes config to path in Zookeeper, /metron/topology/$CONFIG_TYPE/$CONFIG_NAME */ public static void writeConfigToZookeeper(String configPath, byte[] config, String zookeeperUrl) throws Exception { try (CuratorFramework client = getClient(zookeeperUrl)) { client.start(); writeToZookeeper(configPath, config, client); } }
public static void writeConfigToZookeeper(ConfigurationType configType,Optional<String> configName, byte[] configData, CuratorFramework client) throws Exception { writeToZookeeper(getConfigZKPath(configType, configName), configData, client); }
public static void writeGlobalConfigToZookeeper(byte[] globalConfig, CuratorFramework client) throws Exception { GLOBAL.deserialize(new String(globalConfig)); writeToZookeeper(GLOBAL.getZookeeperRoot(), globalConfig, client); }
public static void writeSensorEnrichmentConfigToZookeeper(String sensorType, byte[] configData, CuratorFramework client) throws Exception { ENRICHMENT.deserialize(new String(configData)); writeToZookeeper(ENRICHMENT.getZookeeperRoot() + "/" + sensorType, configData, client); }
public static void writeSensorIndexingConfigToZookeeper(String sensorType, byte[] configData, CuratorFramework client) throws Exception { INDEXING.deserialize(new String(configData)); writeToZookeeper(INDEXING.getZookeeperRoot() + "/" + sensorType, configData, client); }
public static void writeProfilerConfigToZookeeper(byte[] config, CuratorFramework client) throws Exception { PROFILER.deserialize(new String(config)); writeToZookeeper(PROFILER.getZookeeperRoot(), config, client); }
public static void writeSensorParserConfigToZookeeper(String sensorType, byte[] configData, CuratorFramework client) throws Exception { SensorParserConfig c = (SensorParserConfig) PARSER.deserialize(new String(configData)); c.init(); writeToZookeeper(PARSER.getZookeeperRoot() + "/" + sensorType, configData, client); }