anujmodi2021 commented on code in PR #8212:
URL: https://github.com/apache/hadoop/pull/8212#discussion_r3023857063


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsAdaptiveInputStream.java:
##########
@@ -83,7 +83,14 @@ protected int readOneBlock(final byte[] b, final int off, 
final int len) throws
 
       // Reset Read Type back to normal and set again based on code flow.
       getTracingContext().setReadType(ReadType.NORMAL_READ);
-      if (shouldAlwaysReadBufferSize()) {
+
+      // If restrictGpsOnOpenFile config is enabled, skip prefetch for the 
first read since contentLength
+      // is not available yet to determine prefetch block size.

Review Comment:
   Comment seem to be misleading. prefetch block size is configurable, this 
should say "yet to determine how much to prefetch" maybe



##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsInputStream.java:
##########
@@ -561,11 +574,60 @@ protected int readInternal(final long position, final 
byte[] b, final int offset
     }
   }
 
+  /**
+   * Creates an exception indicating that a read operation was attempted on a 
directory.
+   *
+   * @return an {@link AbfsRestOperationException} indicating the operation is 
not permitted on a directory
+   */
+  private IOException directoryReadException() {

Review Comment:
   This should be an UnsupportedOperationException wrapping the server returned 
exception?
   



##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/contracts/services/AzureServiceErrorCode.java:
##########
@@ -66,6 +66,8 @@ public enum AzureServiceErrorCode {
   INVALID_APPEND_OPERATION("InvalidAppendOperation", 
HttpURLConnection.HTTP_CONFLICT, null),
   UNAUTHORIZED_BLOB_OVERWRITE("UnauthorizedBlobOverwrite", 
HttpURLConnection.HTTP_FORBIDDEN,
           "This request is not authorized to perform blob overwrites."),
+  INVALID_RANGE("InvalidRange", 416,

Review Comment:
   Yes, let's define in AbfsHttpConstants



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

To unsubscribe, e-mail: [email protected]

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