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_r373917644
##########
File path:
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java
##########
@@ -531,30 +541,23 @@ private static Path getCmRoot(Path path) throws
IOException {
Path cmroot = null;
if (enabled) {
HdfsEncryptionShim pathEncryptionShim =
hadoopShims.createHdfsEncryptionShim(path.getFileSystem(conf), conf);
- if (!pathEncryptionShim.isPathEncrypted(path)) {
- if (encryptionZones.containsKey(NO_ENCRYPTION)) {
- cmroot = encryptionZones.get(NO_ENCRYPTION);
- } else {
+ if (pathEncryptionShim.isPathEncrypted(path)) {
+ String encryptionZonePath = path.getFileSystem(conf).getUri()
+ + pathEncryptionShim.getEncryptionZoneForPath(path).getPath();
+ cmroot = new Path(encryptionZonePath + Path.SEPARATOR +
encryptedCmRootDir);
+ if (!encryptionZones.contains(encryptionZonePath)) {
Review comment:
This check is done twice
----------------------------------------------------------------
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]