hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject hadoop git commit: HADOOP-11173. Improve error messages for some KeyShell commands.
Date Wed, 26 Nov 2014 00:13:48 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 915176c4e -> 8018d1af5


HADOOP-11173. Improve error messages for some KeyShell commands.

(cherry picked from commit fae266bbf19e44a2595fa62366d9b65e7c996df8)


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

Branch: refs/heads/branch-2
Commit: 8018d1af58330b6d21c858fa5ebfee6a66cd10b3
Parents: 915176c
Author: Andrew Wang <wang@apache.org>
Authored: Tue Nov 25 16:13:32 2014 -0800
Committer: Andrew Wang <wang@apache.org>
Committed: Tue Nov 25 16:13:37 2014 -0800

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt       |  2 ++
 .../java/org/apache/hadoop/crypto/key/KeyShell.java   | 14 +++++++-------
 2 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/8018d1af/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 8700270..a7bd409 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -34,6 +34,8 @@ Release 2.7.0 - UNRELEASED
     HADOOP-11291. Log the cause of SASL connection failures.
     (Stephen Chu via cnauroth)
 
+    HADOOP-11173. Improve error messages for some KeyShell commands. (wang)
+
   OPTIMIZATIONS
 
     HADOOP-11323. WritableComparator#compare keeps reference to byte array.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8018d1af/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyShell.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyShell.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyShell.java
index 3875125..0aa3c85 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyShell.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyShell.java
@@ -298,7 +298,7 @@ public class KeyShell extends Configured implements Tool {
         }
       } catch (IOException e) {
         out.println("Cannot list keys for KeyProvider: " + provider
-            + ": " + e.getMessage());
+            + ": " + e.toString());
         throw e;
       }
     }
@@ -350,12 +350,12 @@ public class KeyShell extends Configured implements Tool {
           printProviderWritten();
         } catch (NoSuchAlgorithmException e) {
           out.println("Cannot roll key: " + keyName + " within KeyProvider: "
-              + provider);
+              + provider + ". " + e.toString());
           throw e;
         }
       } catch (IOException e1) {
         out.println("Cannot roll key: " + keyName + " within KeyProvider: "
-            + provider);
+            + provider + ". " + e1.toString());
         throw e1;
       }
     }
@@ -422,7 +422,7 @@ public class KeyShell extends Configured implements Tool {
           out.println(keyName + " has been successfully deleted.");
           printProviderWritten();
         } catch (IOException e) {
-          out.println(keyName + " has not been deleted.");
+          out.println(keyName + " has not been deleted. " + e.toString());
           throw e;
         }
       }
@@ -484,13 +484,13 @@ public class KeyShell extends Configured implements Tool {
             + options.toString() + ".");
         printProviderWritten();
       } catch (InvalidParameterException e) {
-        out.println(keyName + " has not been created. " + e.getMessage());
+        out.println(keyName + " has not been created. " + e.toString());
         throw e;
       } catch (IOException e) {
-        out.println(keyName + " has not been created. " + e.getMessage());
+        out.println(keyName + " has not been created. " + e.toString());
         throw e;
       } catch (NoSuchAlgorithmException e) {
-        out.println(keyName + " has not been created. " + e.getMessage());
+        out.println(keyName + " has not been created. " + e.toString());
         throw e;
       }
     }


Mime
View raw message