Skip to content

Commit 43d9471

Browse files
committed
HADOOP-18517. fs.azure.enable.readahead removed from openFile() options
Removed the fs.azure.enable.readahead option from openFile(); its a sysadmin option only. For openFile(), I think we should focus on "policy", rather than explicit tuning options. e.g "random/vectored" could disable prefetching; sequential would enable it... Change-Id: I26d2a75f8c0815bf35a9fa876c94b9cfe7b8dc5c
1 parent 3db7b36 commit 43d9471

File tree

4 files changed

+2
-8
lines changed

4 files changed

+2
-8
lines changed

hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -806,15 +806,11 @@ private AbfsInputStreamContext populateAbfsInputStreamContext(
806806
.map(c -> c.getBoolean(FS_AZURE_BUFFERED_PREAD_DISABLE, false))
807807
.orElse(false);
808808
// readahead is cluster config unless openfile explicitly sets it.
809-
boolean readahead = abfsConfiguration.isReadAheadEnabled();
810-
boolean readAheadEnabled = options
811-
.map(c -> c.getBoolean(FS_AZURE_ENABLE_READAHEAD, readahead))
812-
.orElse(readahead);
813809
return new AbfsInputStreamContext(abfsConfiguration.getSasTokenRenewPeriodForStreamsInSeconds())
814810
.withReadBufferSize(abfsConfiguration.getReadBufferSize())
815811
.withReadAheadQueueDepth(abfsConfiguration.getReadAheadQueueDepth())
816812
.withTolerateOobAppends(abfsConfiguration.getTolerateOobAppends())
817-
.isReadAheadEnabled(readAheadEnabled)
813+
.isReadAheadEnabled(abfsConfiguration.isReadAheadEnabled())
818814
.withReadSmallFilesCompletely(abfsConfiguration.readSmallFilesCompletely())
819815
.withOptimizeFooterRead(abfsConfiguration.optimizeFooterRead())
820816
.withReadAheadRange(abfsConfiguration.getReadAheadRange())

hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/constants/ConfigurationKeys.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public final class ConfigurationKeys {
188188
public static final String AZURE_KEY_ACCOUNT_SHELLKEYPROVIDER_SCRIPT = "fs.azure.shellkeyprovider.script";
189189

190190
/**
191-
* Enable or disable readahead buffer in AbfsInputStream. It is enabled by default.
191+
* Enable or disable readahead buffer in AbfsInputStream.
192192
* Value: {@value}.
193193
*/
194194
public static final String FS_AZURE_ENABLE_READAHEAD = "fs.azure.enable.readahead";

hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsInputStream.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,6 @@ byte[] getBuffer() {
748748
@VisibleForTesting
749749
public boolean isReadAheadEnabled() {
750750
return readAheadEnabled;
751-
752751
}
753752

754753
@VisibleForTesting

hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsInputStreamContext.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ public AbfsInputStreamContext isReadAheadEnabled(
8080
return this;
8181
}
8282

83-
8483
public AbfsInputStreamContext withReadAheadRange(
8584
final int readAheadRange) {
8685
this.readAheadRange = readAheadRange;

0 commit comments

Comments
 (0)