mukul1987 commented on a change in pull request #623: HDDS-2941. file create : 
create key table entries for intermediate directories in the path
URL: https://github.com/apache/hadoop-ozone/pull/623#discussion_r389253641
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMFileCreateRequest.java
 ##########
 @@ -379,6 +358,65 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager,
     return omClientResponse;
   }
 
+  private void checkAllParentsExist(OzoneManager ozoneManager,
+      KeyArgs keyArgs,
+      OMFileRequest.OMPathInfo pathInfo) throws IOException {
+    Boolean canBeCreated = false;
+    String keyName = keyArgs.getKeyName();
+    OMFileRequest.OMDirectoryResult omDirectoryResult =
+        pathInfo.getDirectoryResult();
+
+    if (ozoneManager.createPrefixEntries()) {
+      // if immediate parent exists, assume higher level directories exist.
+      if (pathInfo.getDirectParentExists()) {
+        canBeCreated = true;
+      }
 
 Review comment:
   we can throw an exception here, as parent does not exsit.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to