You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by sp...@apache.org on 2018/10/09 18:45:30 UTC

hive git commit: HIVE-20224: ReplChangeManager.java Remove Logging Guards (Morio Ramdenbourg, reviewed by Sergio Pena)

Repository: hive
Updated Branches:
  refs/heads/master 2d2ab674f -> 8b7043626


HIVE-20224: ReplChangeManager.java Remove Logging Guards (Morio Ramdenbourg, reviewed by Sergio Pena)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/8b704362
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/8b704362
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/8b704362

Branch: refs/heads/master
Commit: 8b7043626f73fbf5a7c2c3f8db8413a67722fd42
Parents: 2d2ab67
Author: Sergio Pena <se...@cloudera.com>
Authored: Tue Oct 9 13:44:52 2018 -0500
Committer: Sergio Pena <se...@cloudera.com>
Committed: Tue Oct 9 13:44:52 2018 -0500

----------------------------------------------------------------------
 .../hive/metastore/ReplChangeManager.java       | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/8b704362/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java
index 893c9f4..b5fc994 100644
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java
+++ b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java
@@ -250,9 +250,7 @@ public class ReplChangeManager {
 
         count++;
       } else {
-        if (LOG.isDebugEnabled()) {
-          LOG.debug("A file with the same content of {} already exists, ignore", path.toString());
-        }
+        LOG.debug("A file with the same content of {} already exists, ignore", path.toString());
         // Need to extend the tenancy if we saw a newer file with the same content
         fs.setTimes(cmPath, now, -1);
       }
@@ -366,9 +364,7 @@ public class ReplChangeManager {
       encodedUri = encodedUri + URI_FRAGMENT_SEPARATOR + URI_FRAGMENT_SEPARATOR;
     }
     encodedUri = encodedUri + URI_FRAGMENT_SEPARATOR + ((encodedSubDir != null) ? encodedSubDir : "");
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("Encoded URI: " + encodedUri);
-    }
+    LOG.debug("Encoded URI: " + encodedUri);
     return encodedUri;
   }
 
@@ -391,9 +387,7 @@ public class ReplChangeManager {
     if ((uriAndFragment.length > 3)  && !StringUtils.isEmpty(uriAndFragment[3])) {
       result[3] = uriAndFragment[3];
     }
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("Reading Encoded URI: " + result[0] + ":: " + result[1] + ":: " + result[2] + ":: " + result[3]);
-    }
+    LOG.debug("Reading Encoded URI: " + result[0] + ":: " + result[1] + ":: " + result[2] + ":: " + result[3]);
     return result;
   }
 
@@ -432,18 +426,14 @@ public class ReplChangeManager {
               if (fs.getXAttrs(file.getPath()).containsKey(REMAIN_IN_TRASH_TAG)) {
                 boolean succ = Trash.moveToAppropriateTrash(fs, file.getPath(), conf);
                 if (succ) {
-                  if (LOG.isDebugEnabled()) {
-                    LOG.debug("Move " + file.toString() + " to trash");
-                  }
+                  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) {
-                  if (LOG.isDebugEnabled()) {
-                    LOG.debug("Remove " + file.toString());
-                  }
+                  LOG.debug("Remove " + file.toString());
                 } else {
                   LOG.warn("Fail to remove " + file.toString());
                 }