hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whe...@apache.org
Subject [1/2] hadoop git commit: Revert "HDFS-9170. Move libhdfs / fuse-dfs / libwebhdfs to hdfs-client. Contributed by Haohui Mai."
Date Wed, 30 Sep 2015 00:52:03 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 cf873fff9 -> 58bdc9c67


http://git-wip-us.apache.org/repos/asf/hadoop/blob/58bdc9c6/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java
index d69aeb1..6a2818f 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java
@@ -240,12 +240,16 @@ public class WebHdfsFileSystem extends FileSystem
       // refetch tokens.  even if ugi has credentials, don't attempt
       // to get another token to match hdfs/rpc behavior
       if (token != null) {
-        LOG.debug("Using UGI token: {}", token);
+        if(LOG.isDebugEnabled()) {
+          LOG.debug("Using UGI token: {}", token);
+        }
         canRefreshDelegationToken = false;
       } else {
         token = getDelegationToken(null);
         if (token != null) {
-          LOG.debug("Fetched new token: {}", token);
+          if(LOG.isDebugEnabled()) {
+            LOG.debug("Fetched new token: {}", token);
+          }
         } else { // security is disabled
           canRefreshDelegationToken = false;
         }
@@ -260,7 +264,9 @@ public class WebHdfsFileSystem extends FileSystem
     boolean replaced = false;
     if (canRefreshDelegationToken) {
       Token<?> token = getDelegationToken(null);
-      LOG.debug("Replaced expired token: {}", token);
+      if(LOG.isDebugEnabled()) {
+        LOG.debug("Replaced expired token: {}", token);
+      }
       setDelegationToken(token);
       replaced = (token != null);
     }
@@ -445,7 +451,9 @@ public class WebHdfsFileSystem extends FileSystem
     InetSocketAddress nnAddr = getCurrentNNAddr();
     final URL url = new URL(getTransportScheme(), nnAddr.getHostName(),
           nnAddr.getPort(), path + '?' + query);
-    LOG.trace("url={}", url);
+    if (LOG.isTraceEnabled()) {
+      LOG.trace("url={}", url);
+    }
     return url;
   }
 
@@ -480,7 +488,9 @@ public class WebHdfsFileSystem extends FileSystem
         + Param.toSortedString("&", getAuthParameters(op))
         + Param.toSortedString("&", parameters);
     final URL url = getNamenodeURL(path, query);
-    LOG.trace("url={}", url);
+    if (LOG.isTraceEnabled()) {
+      LOG.trace("url={}", url);
+    }
     return url;
   }
 
@@ -768,7 +778,9 @@ public class WebHdfsFileSystem extends FileSystem
       } catch (Exception e) { // catch json parser errors
         final IOException ioe =
             new IOException("Response decoding failure: "+e.toString(), e);
-        LOG.debug("Response decoding failure.", e);
+        if (LOG.isDebugEnabled()) {
+          LOG.debug("Response decoding failure: {}", e.toString(), e);
+        }
         throw ioe;
       } finally {
         conn.disconnect();
@@ -1239,7 +1251,9 @@ public class WebHdfsFileSystem extends FileSystem
         cancelDelegationToken(delegationToken);
       }
     } catch (IOException ioe) {
-      LOG.debug("Token cancel failed: ", ioe);
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Token cancel failed: ", ioe);
+      }
     } finally {
       super.close();
     }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/58bdc9c6/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index d82ee41..7d366ad 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -655,9 +655,6 @@ Release 2.8.0 - UNRELEASED
     HDFS-8696. Make the lower and higher watermark in the DN Netty server
     configurable. (Xiaobing Zhou via wheat9)
 
-    HDFS-8971. Remove guards when calling LOG.debug() and LOG.trace() in client
-    package. (Mingliang Liu via wheat9)
-
   OPTIMIZATIONS
 
     HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than


Mime
View raw message