maheshk114 commented on a change in pull request #883: HIVE-22736 Support
multiple encryption zones in replication
URL: https://github.com/apache/hive/pull/883#discussion_r371589038
##########
File path:
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java
##########
@@ -150,16 +152,23 @@ private ReplChangeManager(Configuration conf) throws
MetaException {
if (MetastoreConf.getBoolVar(conf, ConfVars.REPLCMENABLED)) {
ReplChangeManager.enabled = true;
ReplChangeManager.conf = conf;
-
+ cmRootDir = MetastoreConf.getVar(conf, ConfVars.REPLCMDIR);
+ encryptedCmRootDir = MetastoreConf.getVar(conf,
ConfVars.REPLCMENCRYPTEDDIR);
//Create default cm root
- Path cmroot = new Path(MetastoreConf.getVar(conf,
ConfVars.REPLCMDIR));
+ Path cmroot = new Path(cmRootDir);
+ HdfsEncryptionShim pathEncryptionShim = hadoopShims
+ .createHdfsEncryptionShim(cmroot.getFileSystem(conf), conf);
+ if (pathEncryptionShim.isPathEncrypted(cmroot)) {
+ LOG.warn(ConfVars.REPLCMDIR + " should not be encrypted. To pass
cm dir for encrypted path use "
Review comment:
It will create issue if user has a single encryption zone setup and he has
created a directory with permission to hive as cmroot. And user has not given
the permission to create directory on encryption zone root to hive. In that
case we will try to create .cmroot (the default value) and will fail. Should we
consider this case ?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]