You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-commits@hadoop.apache.org by ar...@apache.org on 2019/10/25 16:57:58 UTC

[hadoop-ozone] branch master updated: Revert "HDDS-2206. Separate handling for OMException and IOException in the Ozone Manager. Contributed by Supratim Deka (#12)"

This is an automated email from the ASF dual-hosted git repository.

arp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new e1641fb  Revert "HDDS-2206. Separate handling for OMException and IOException in the Ozone Manager. Contributed by Supratim Deka (#12)"
e1641fb is described below

commit e1641fb602991eee2407086f8386f18f09b4e862
Author: Arpit Agarwal <aa...@cloudera.com>
AuthorDate: Fri Oct 25 09:57:28 2019 -0700

    Revert "HDDS-2206. Separate handling for OMException and IOException in the Ozone Manager. Contributed by Supratim Deka (#12)"
    
    This reverts commit 445fe6231db370d21887cbbcc7c3e26c197dc74a.
---
 .../OzoneManagerProtocolServerSideTranslatorPB.java       | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerProtocolServerSideTranslatorPB.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerProtocolServerSideTranslatorPB.java
index cc62cc5..e0fbf45 100644
--- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerProtocolServerSideTranslatorPB.java
+++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerProtocolServerSideTranslatorPB.java
@@ -22,7 +22,6 @@ import org.apache.hadoop.hdds.server.OzoneProtocolMessageDispatcher;
 import org.apache.hadoop.ozone.OmUtils;
 import org.apache.hadoop.ozone.om.OzoneManager;
 import org.apache.hadoop.ozone.om.exceptions.NotLeaderException;
-import org.apache.hadoop.ozone.om.exceptions.OMException;
 import org.apache.hadoop.ozone.om.protocolPB.OzoneManagerProtocolPB;
 import org.apache.hadoop.ozone.om.ratis.OzoneManagerDoubleBuffer;
 import org.apache.hadoop.ozone.om.ratis.OzoneManagerRatisServer;
@@ -35,7 +34,6 @@ import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRespo
 
 import com.google.protobuf.RpcController;
 import com.google.protobuf.ServiceException;
-import org.apache.hadoop.util.StringUtils;
 import org.apache.ratis.protocol.RaftPeerId;
 import org.apache.ratis.util.ExitUtils;
 import org.slf4j.Logger;
@@ -153,21 +151,12 @@ public class OzoneManagerProtocolServerSideTranslatorPB implements
             OzoneManagerRatisUtils.exceptionToResponseStatus(exception))
         .setCmdType(cmdType)
         .setSuccess(false);
-    String errorMsg = exceptionErrorMessage(exception);
-    if (errorMsg != null) {
-      omResponse.setMessage(errorMsg);
+    if (exception.getMessage() != null) {
+      omResponse.setMessage(exception.getMessage());
     }
     return omResponse.build();
   }
 
-  private String exceptionErrorMessage(IOException ex) {
-    if (ex instanceof OMException) {
-      return ex.getMessage();
-    } else {
-      return StringUtils.stringifyException(ex);
-    }
-  }
-
   /**
    * Submits request to OM's Ratis server.
    */


---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-commits-help@hadoop.apache.org