That method does a lot actually.  Anytime a zookeeper change happens during
runtime, the curator client created on line 84 in ConfiguredBolt calls that
method on line 91.  Think of it as a callback for zookeeper updates.

Ryan

On Fri, Mar 31, 2017 at 7:49 AM, moshe jarusalem <tuu...@gmail.com> wrote:

> Hi All,
> I have been looking the codes for ConfiguredBolt and its derivatives. I
> realized that updateConfig is actually not doing much?
>
> Would you describe how you manage configuration changes might be needed
> after bolts are initialized and running?
>
>
> for convenience, I copied the code here
>
> public void updateConfig(String path, byte[] data) throws IOException {
>   if (data.length != 0) {
>     String name = path.substring(path.lastIndexOf("/") + 1);
>     if (path.startsWith(ConfigurationType.ENRICHMENT.getZookeeperRoot())) {
>       getConfigurations().updateSensorEnrichmentConfig(name, data);
>       reloadCallback(name, ConfigurationType.ENRICHMENT);
>     } else if (ConfigurationType.GLOBAL.getZookeeperRoot().equals(path)) {
>       getConfigurations().updateGlobalConfig(data);
>       reloadCallback(name, ConfigurationType.GLOBAL);
>     }
>   }
>
>
>
> Thanks,
>
>

Reply via email to