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_r371589321
##########
File path:
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java
##########
@@ -442,32 +451,39 @@ public static boolean isCMFileUri(Path fromPath) {
public void run() {
try {
LOG.info("CMClearer started");
-
- long now = System.currentTimeMillis();
- FileSystem fs = cmroot.getFileSystem(conf);
- FileStatus[] files = fs.listStatus(cmroot);
-
- for (FileStatus file : files) {
- long modifiedTime = file.getModificationTime();
- if (now - modifiedTime > secRetain*1000) {
- try {
- if
(fs.getXAttrs(file.getPath()).containsKey(REMAIN_IN_TRASH_TAG)) {
- boolean succ = Trash.moveToAppropriateTrash(fs,
file.getPath(), conf);
- if (succ) {
- LOG.debug("Move " + file.toString() + " to trash");
- } else {
- LOG.warn("Fail to move " + file.toString() + " to trash");
- }
- } else {
- boolean succ = fs.delete(file.getPath(), false);
- if (succ) {
- LOG.debug("Remove " + file.toString());
+ for (String encryptionZone : encryptionZones) {
+ Path cmroot;
Review comment:
Do we have any existing test case for CMCleaner ?
----------------------------------------------------------------
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]