symat commented on pull request #2539:
URL: https://github.com/apache/hbase/pull/2539#issuecomment-708287449


   >How will this work when the configuration setting changes? How do we know 
that the key we hash for a given HFile needs to be hashed with the current 
setting via an old one?
   > Do we need to write the key hash algorithm into hfiles?
   
   I'm doing this already, and if the configured algorithm mismatches with the 
one used during HFile write, then I throw an exception now. see: 
https://github.com/apache/hbase/pull/2539/files#diff-a7c16094ae6bcb70679293d81ca8a8849b39ec6b04f94096127b86aca039152dR142-R145
   
   Maybe more sophisticated would be to use the hash algorithm already stored 
in the "old" HFile (after maybe printing a warning?). On the other hand, this 
can lead to the usage of unapproved algorithms. (e.g. MD5 on FIPS compliant 
cluster) I wonder what would be the right behaviour. I tend towards the current 
approach (throwing an exception). What do you think?
   
   (anyway, if someone is not using this new parameter, then he will never see 
this exception, as the algorithm is MD5 by default in the proto file: 
https://github.com/apache/hbase/pull/2539/files#diff-146c5de2ec6c4109bbe29b4aee191f12dc5ea7b610b85aaee2853b2b2bd4701eR34)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to