You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/04/01 06:26:14 UTC

[GitHub] [ozone] GlenGeng commented on a change in pull request #2077: HDDS-4987. Import container should not delete container contents if container already exists

GlenGeng commented on a change in pull request #2077:
URL: https://github.com/apache/ozone/pull/2077#discussion_r605404496



##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainer.java
##########
@@ -496,11 +497,17 @@ public void importContainerData(InputStream input,
       KeyValueContainerUtil.parseKVContainerData(containerData, config);
 
     } catch (Exception ex) {
+      if (ex instanceof StorageContainerException &&

Review comment:
       NIT. Following may be better to handle the exception cases.
   
   ```
   } catch (StorageContainerException ex) {
     throw ex;
   } catch (Exception ex) {
     //delete all the temporary data in case of any exception.
     ...
   }
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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