rakeshadr commented on pull request #1775:
URL: https://github.com/apache/ozone/pull/1775#issuecomment-758483302


   > Almost looks good to me, I noticed one another similar API 
KeyManagerImpl#lookupFile, we may also needed to update , right?
   > 
   > ```java
   >   /**
   >    * OzoneFS api to lookup for a file.
   >    *
   >    * @param args Key args
   >    * @throws OMException if given key is not found or it is not a file
   >    *                     if bucket does not exist
   >    * @throws IOException if there is error in the db
   >    *                     invalid arguments
   >    */
   >   @Override
   >   public OmKeyInfo lookupFile(OmKeyArgs args, String clientAddress)
   >       throws IOException {
   >     Preconditions.checkNotNull(args, "Key args can not be null");
   >     String volumeName = args.getVolumeName();
   >     String bucketName = args.getBucketName();
   >     String keyName = args.getKeyName();
   >     OzoneFileStatus fileStatus = getOzoneFileStatus(volumeName, bucketName,
   >             keyName, args.getRefreshPipeline(), args.getSortDatanodes(),
   >             clientAddress);
   >       //if key is not of type file or if key is not found we throw an 
exception
   >     if (fileStatus.isFile()) {
   >       return fileStatus.getKeyInfo();
   >     }
   >     throw new OMException("Can not write to directory: " + keyName,
   >         ResultCodes.NOT_A_FILE);
   >   }
   > ```
   
   Sorry, I didnt understand your comment. Could you please explain it more. 
Thanks!
   
   FYI, lookupFile() is FS semantics API, which don't have normalizeKey() 
mechanism.


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to