hadoop-ozone-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adorosz...@apache.org
Subject [hadoop-ozone] branch master updated: HDDS-3075. Fix ScmCli exception message when container not found (#642)
Date Sat, 07 Mar 2020 07:35:15 GMT
This is an automated email from the ASF dual-hosted git repository.

adoroszlai 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 f8c48b7  HDDS-3075. Fix ScmCli exception message when container not found (#642)
f8c48b7 is described below

commit f8c48b7bd2175d57d485ba5b44e9397e69494568
Author: Siddharth <swagle@apache.org>
AuthorDate: Fri Mar 6 23:35:07 2020 -0800

    HDDS-3075. Fix ScmCli exception message when container not found (#642)
---
 .../apache/hadoop/hdds/scm/container/states/ContainerStateMap.java  | 3 ++-
 .../tools/src/main/java/org/apache/hadoop/hdds/scm/cli/SCMCLI.java  | 6 +-----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/states/ContainerStateMap.java
b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/states/ContainerStateMap.java
index 13802cd..8cef966 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/states/ContainerStateMap.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/states/ContainerStateMap.java
@@ -538,7 +538,8 @@ public class ContainerStateMap {
   private void checkIfContainerExist(ContainerID containerID)
       throws ContainerNotFoundException {
     if (!containerMap.containsKey(containerID)) {
-      throw new ContainerNotFoundException("#" + containerID.getId());
+      throw new ContainerNotFoundException("Container with id #" +
+          containerID.getId() + " not found.");
     }
   }
 
diff --git a/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/SCMCLI.java b/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/SCMCLI.java
index 44a3156..735c6f3 100644
--- a/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/SCMCLI.java
+++ b/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/SCMCLI.java
@@ -84,17 +84,13 @@ public class SCMCLI extends GenericCli {
     new SCMCLI().run(argv);
   }
 
-  public ScmClient createScmClient()
-      throws IOException {
+  public ScmClient createScmClient() throws IOException {
     OzoneConfiguration ozoneConf = createOzoneConfiguration();
     checkAndSetSCMAddressArg(ozoneConf);
 
-
     return new ContainerOperationClient(ozoneConf);
   }
 
-
-
   public void checkContainerExists(ScmClient scmClient, long containerId)
       throws IOException {
     ContainerInfo container = scmClient.getContainer(containerId);


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


Mime
View raw message