Skip to content

Commit 6a3b9f1

Browse files
ahmarsuhailsteveloughran
authored andcommitted
HADOOP-18254. Disable S3A prefetching by default. (apache#4469)
Contributed by Ahmar Suhail <[email protected]>
1 parent 515cba7 commit 6a3b9f1

File tree

4 files changed

+26
-109
lines changed

4 files changed

+26
-109
lines changed

hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ public void initialize(URI name, Configuration originalConf)
504504
longBytesOption(conf, FS_S3A_BLOCK_SIZE, DEFAULT_BLOCKSIZE, 1);
505505
enableMultiObjectsDelete = conf.getBoolean(ENABLE_MULTI_DELETE, true);
506506

507-
this.prefetchEnabled = conf.getBoolean(PREFETCH_ENABLED_KEY, true);
507+
this.prefetchEnabled = conf.getBoolean(PREFETCH_ENABLED_KEY, false);
508508
this.prefetchBlockSize = intOption(
509509
conf, PREFETCH_BLOCK_SIZE_KEY, PREFETCH_BLOCK_DEFAULT_SIZE, PREFETCH_BLOCK_DEFAULT_SIZE);
510510
this.prefetchBlockCount =

hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/read/README.md

Lines changed: 0 additions & 107 deletions
This file was deleted.

hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/index.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ full details.
4747
* [Auditing](./auditing.html).
4848
* [Auditing Architecture](./auditing_architecture.html).
4949
* [Testing](./testing.html)
50+
* [Prefetching](./prefetching.html)
5051

5152
## <a name="overview"></a> Overview
5253

@@ -1090,6 +1091,29 @@ options are covered in [Testing](./testing.md).
10901091
</description>
10911092
</property>
10921093

1094+
<property>
1095+
<name>fs.s3a.prefetch.enabled</name>
1096+
<value>false</value>
1097+
<description>
1098+
Enables prefetching and caching when reading from input stream.
1099+
</description>
1100+
</property>
1101+
1102+
<property>
1103+
<name>fs.s3a.prefetch.block.size</name>
1104+
<value>8MB</value>
1105+
<description>
1106+
The size of a single prefetched block of data.
1107+
</description>
1108+
</property>
1109+
1110+
<property>
1111+
<name>fs.s3a.prefetch.block.count</name>
1112+
<value>8</value>
1113+
<description>
1114+
Maximum number of blocks prefetched concurrently at any given time.
1115+
</description>
1116+
</property>
10931117
```
10941118

10951119
## <a name="retry_and_recovery"></a>Retry and Recovery

hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/prefetching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Multiple blocks may be read in parallel.
3939

4040
|Property |Meaning |Default |
4141
|---|---|---|
42-
|`fs.s3a.prefetch.enabled` |Enable the prefetch input stream |`true` |
42+
|`fs.s3a.prefetch.enabled` |Enable the prefetch input stream |`false` |
4343
|`fs.s3a.prefetch.block.size` |Size of a block |`8M` |
4444
|`fs.s3a.prefetch.block.count` |Number of blocks to prefetch |`8` |
4545

0 commit comments

Comments
 (0)