[ 
https://issues.apache.org/jira/browse/HBASE-27780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryan Beaudreault updated HBASE-27780:
--------------------------------------
    Description: 
HBASE-27347 ported FileChangeWatcher from ZK so that we can reload certificates 
when the keystore/truststore files change. I'd like to make a few improvements:
 # Add more context to the thread name, so that we can disambiguate when 
multiple are launched for different cluster connections or paths
 # We currently launch a separate FileChangeWatcher for each of keystorePath 
and truststorePath, but in many cases they may be the same path. The runnable 
which gets called is identical for these, so this just results in extra work 
for no reason. We should check the configured paths and only launch one 
FileChangeWatcher if the two paths are identical.
 # it currently watches the entire directory of the keystorePath. I could see 
this being useful if it could handle changes in various paths with a single 
watcher and only trigger the callback for the relevant path. That’s not what it 
does, so I think ideally it would just watch the file path. Or alternatively 
filter the events by the path. We put our keystores in the global tmp dir for 
various reasons, and as such this is triggering all the time for changes to 
totally unrelated paths in that global dir. 

  was:
HBASE-27347 ported FileChangeWatcher from ZK so that we can reload certificates 
when the keystore/truststore files change. I'd like to make a few improvements:
 # Add more context to the thread name, so that we can disambiguate when 
multiple are launched for different cluster connections or paths
 # We currently launch a separate FileChangeWatcher for each of keystorePath 
and truststorePath, but in many cases they may be the same path. The runnable 
which gets called is identical for these, so this just results in extra work 
for no reason. We should check the configured paths and only launch one 
FileChangeWatcher if the two paths are identical.


> FileChangeWatcher improvements
> ------------------------------
>
>                 Key: HBASE-27780
>                 URL: https://issues.apache.org/jira/browse/HBASE-27780
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Bryan Beaudreault
>            Priority: Major
>
> HBASE-27347 ported FileChangeWatcher from ZK so that we can reload 
> certificates when the keystore/truststore files change. I'd like to make a 
> few improvements:
>  # Add more context to the thread name, so that we can disambiguate when 
> multiple are launched for different cluster connections or paths
>  # We currently launch a separate FileChangeWatcher for each of keystorePath 
> and truststorePath, but in many cases they may be the same path. The runnable 
> which gets called is identical for these, so this just results in extra work 
> for no reason. We should check the configured paths and only launch one 
> FileChangeWatcher if the two paths are identical.
>  # it currently watches the entire directory of the keystorePath. I could see 
> this being useful if it could handle changes in various paths with a single 
> watcher and only trigger the callback for the relevant path. That’s not what 
> it does, so I think ideally it would just watch the file path. Or 
> alternatively filter the events by the path. We put our keystores in the 
> global tmp dir for various reasons, and as such this is triggering all the 
> time for changes to totally unrelated paths in that global dir. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to