Repository: hadoop
Updated Branches:
  refs/heads/HDFS-7240 765759fa6 -> a61aafdf6


HDFS-12805. Ozone: Redundant characters printed in exception log. Contributed 
by Yiqun Lin.


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

Branch: refs/heads/HDFS-7240
Commit: a61aafdf6927abe2b96d7cbca2e0d32c6a92320a
Parents: 765759f
Author: Xiaoyu Yao <[email protected]>
Authored: Wed Nov 15 11:40:44 2017 -0800
Committer: Xiaoyu Yao <[email protected]>
Committed: Wed Nov 15 11:40:44 2017 -0800

----------------------------------------------------------------------
 .../hadoop/ozone/web/handlers/BucketProcessTemplate.java |  4 ++--
 .../hadoop/ozone/web/handlers/KeyProcessTemplate.java    |  6 +++---
 .../hadoop/ozone/web/handlers/VolumeProcessTemplate.java | 11 +++++------
 3 files changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/a61aafdf/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/handlers/BucketProcessTemplate.java
----------------------------------------------------------------------
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/handlers/BucketProcessTemplate.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/handlers/BucketProcessTemplate.java
index e2881a2..4736746 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/handlers/BucketProcessTemplate.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/handlers/BucketProcessTemplate.java
@@ -99,7 +99,7 @@ public abstract class BucketProcessTemplate {
       return response;
 
     } catch (IllegalArgumentException argEx) {
-      LOG.error("Invalid bucket. ex:{}", argEx);
+      LOG.error("Invalid bucket.", argEx);
       throw ErrorTable.newError(ErrorTable.INVALID_BUCKET_NAME, userArgs,
           argEx);
     } catch (IOException fsExp) {
@@ -149,7 +149,7 @@ public abstract class BucketProcessTemplate {
    */
   void handleIOException(String bucket, String reqID, String hostName,
                          IOException fsExp) throws OzoneException {
-    LOG.error("IOException: {}", fsExp);
+    LOG.error("IOException:", fsExp);
 
     OzoneException exp = null;
     if (fsExp instanceof FileAlreadyExistsException) {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/a61aafdf/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/handlers/KeyProcessTemplate.java
----------------------------------------------------------------------
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/handlers/KeyProcessTemplate.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/handlers/KeyProcessTemplate.java
index 084a691..dcf0fc5 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/handlers/KeyProcessTemplate.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/handlers/KeyProcessTemplate.java
@@ -94,10 +94,10 @@ public abstract class KeyProcessTemplate {
       return response;
 
     } catch (IllegalArgumentException argExp) {
-      LOG.error("Invalid bucket in key call. ex:{}", argExp);
+      LOG.error("Invalid bucket in key call.", argExp);
       throw newError(INVALID_BUCKET_NAME, userArgs, argExp);
     } catch (IOException fsExp) {
-      LOG.error("IOException. ex : {}", fsExp);
+      LOG.error("IOException:", fsExp);
       // Map KEY_NOT_FOUND to INVALID_KEY
       if (fsExp.getMessage().endsWith(
           KeySpaceManagerProtocolProtos.Status.KEY_NOT_FOUND.name())) {
@@ -109,7 +109,7 @@ public abstract class KeyProcessTemplate {
       throw ErrorTable.newError(ErrorTable.SERVER_ERROR, userArgs, fsExp);
     } catch (NoSuchAlgorithmException algoEx) {
       LOG.error("NoSuchAlgorithmException. Probably indicates an unusual java "
-          + "installation.  ex : {}", algoEx);
+          + "installation.", algoEx);
       throw ErrorTable.newError(SERVER_ERROR, userArgs, algoEx);
     }
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/a61aafdf/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/handlers/VolumeProcessTemplate.java
----------------------------------------------------------------------
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/handlers/VolumeProcessTemplate.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/handlers/VolumeProcessTemplate.java
index 6ab1fbf..0cd652a 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/handlers/VolumeProcessTemplate.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/handlers/VolumeProcessTemplate.java
@@ -97,7 +97,7 @@ public abstract class VolumeProcessTemplate {
       return response;
 
     } catch (IllegalArgumentException ex) {
-      LOG.error("illegal argument. {}", ex);
+      LOG.error("Illegal argument.", ex);
       throw ErrorTable.newError(ErrorTable.INVALID_VOLUME_NAME, userArgs, ex);
     } catch (IOException ex) {
       handleIOException(volume, reqID, hostName, ex);
@@ -130,7 +130,7 @@ public abstract class VolumeProcessTemplate {
    */
   private void handleIOException(String volume, String reqID, String hostName,
                                  IOException fsExp) throws OzoneException {
-    LOG.error("IOException: {}", fsExp);
+    LOG.error("IOException:", fsExp);
     OzoneException exp = null;
 
     if ((fsExp != null && fsExp.getMessage().endsWith(
@@ -178,7 +178,7 @@ public abstract class VolumeProcessTemplate {
     try {
       args.setQuota(quota);
     } catch (IllegalArgumentException ex) {
-      LOG.debug("Malformed Quota: {}", ex);
+      LOG.debug("Malformed Quota.", ex);
       throw ErrorTable.newError(ErrorTable.MALFORMED_QUOTA, args, ex);
     }
   }
@@ -235,7 +235,7 @@ public abstract class VolumeProcessTemplate {
       ListVolumes volumes = fs.listVolumes(listArgs);
       return OzoneUtils.getResponse(user, HTTP_OK, volumes.toJsonString());
     } catch (IOException ex) {
-      LOG.debug("unable to get the volume list for the user. Ex: {}", ex);
+      LOG.debug("unable to get the volume list for the user.", ex);
       OzoneException exp = ErrorTable.newError(ErrorTable.SERVER_ERROR,
           user, ex);
       exp.setMessage("unable to get the volume list for the user");
@@ -264,8 +264,7 @@ public abstract class VolumeProcessTemplate {
       ListBuckets bucketList = fs.listBuckets(listArgs);
       return OzoneUtils.getResponse(args, HTTP_OK, bucketList.toJsonString());
     } catch (IOException ex) {
-      LOG.debug("unable to get the bucket list for the specified volume." +
-          " Ex: {}", ex);
+      LOG.debug("unable to get the bucket list for the specified volume.", ex);
       OzoneException exp =
           ErrorTable.newError(ErrorTable.SERVER_ERROR, args, ex);
       exp.setMessage("unable to get the bucket list for the specified 
volume.");


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to