hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [hadoop] cxorm commented on a change in pull request #1559: HDDS-1737. Add Volume check in KeyManager and File Operations.
Date Thu, 10 Oct 2019 08:33:35 GMT
cxorm commented on a change in pull request #1559: HDDS-1737. Add Volume check in KeyManager
and File Operations.
URL: https://github.com/apache/hadoop/pull/1559#discussion_r333392433
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMDirectoryCreateRequest.java
 ##########
 @@ -139,12 +140,15 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
       acquiredLock = omMetadataManager.getLock().acquireLock(BUCKET_LOCK,
           volumeName, bucketName);
 
-      // TODO: Not checking volume exist here, once we have full cache we can
-      //  add volume exist check also.
+      // Check volume exist.
+      String volumeKey = omMetadataManager.getVolumeKey(volumeName);
+      if (!omMetadataManager.getVolumeTable().isExist(volumeKey)) {
+        throw new OMException("Volume not found " + volumeName,
 
 Review comment:
   Thanks @bharatviswa504 
   I found the check also can be done by the base class method,
   so I fix it and add some tests.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


Mime
View raw message