-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HADOOP-19229. S3A/ABFS: Vector IO on cloud storage: increase threshol…
…d for range merging (#7281) The thresholds at which adjacent vector IO read ranges are coalesced into a single range has been increased, as has the limit at which point they are considered large enough that parallel reads are faster. * The min/max for local filesystems and any other FS without custom support are now 16K and 1M * s3a and abfs use 128K as the minimum size, 2M for max. These values are based on the Facebook Velox paper which stated their thresholds for merging were 20K for local SSD and 500K for cloud storage Contributed by Steve Loughran
- Loading branch information
1 parent
266dad1
commit c3e3228
Showing
6 changed files
with
143 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/Sizes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.hadoop.io; | ||
|
||
import org.apache.hadoop.classification.InterfaceAudience; | ||
import org.apache.hadoop.classification.InterfaceStability; | ||
|
||
/** | ||
* Sizes of binary values and other some common sizes. | ||
* This avoids having to remember the larger binary values, | ||
* and stops IDEs/style checkers complaining about numeric | ||
* values in source code. | ||
*/ | ||
@InterfaceAudience.Public | ||
@InterfaceStability.Evolving | ||
public final class Sizes { | ||
|
||
/** 2^8 bytes: {@value}. */ | ||
public static final int S_256 = 256; | ||
|
||
/** 2^9 bytes: {@value}. */ | ||
public static final int S_512 = S_256 << 1; | ||
|
||
/** 2^10 bytes - 1 KiB: {@value}. */ | ||
public static final int S_1K = S_512 << 1; | ||
|
||
/** 2^11 bytes - 1 KiB: {@value}. */ | ||
public static final int S_2K = S_1K << 1; | ||
|
||
/** 2^12 bytes - 2 KiB: {@value}. */ | ||
public static final int S_4K = S_2K << 1; | ||
|
||
/** 2^13 bytes: {@value}. */ | ||
public static final int S_8K = S_4K << 1; | ||
|
||
/** 2^14 bytes: {@value}. */ | ||
public static final int S_16K = S_8K << 1; | ||
|
||
/** 2^15 bytes: {@value}. */ | ||
public static final int S_32K = S_16K << 1; | ||
|
||
/** 2^16 bytes: {@value}. */ | ||
public static final int S_64K = S_32K << 1; | ||
|
||
/** 2^17 bytes, 128 KiB: {@value}. */ | ||
public static final int S_128K = S_64K << 1; | ||
|
||
/** 2^18 bytes, 256 KiB: {@value}. */ | ||
public static final int S_256K = S_128K << 1; | ||
|
||
/** 2^19 bytes, 512 KiB: {@value}. */ | ||
public static final int S_512K = S_256K << 1; | ||
|
||
/** 2^20 bytes, 1 MiB: {@value}. */ | ||
public static final int S_1M = S_512K << 1; | ||
|
||
/** 2^21 bytes, 2 MiB: {@value}. */ | ||
public static final int S_2M = S_1M << 1; | ||
|
||
/** 2^22 bytes, 4 MiB: {@value}. */ | ||
public static final int S_4M = S_2M << 1; | ||
|
||
/** 2^23 bytes, MiB: {@value}. */ | ||
public static final int S_8M = S_4M << 1; | ||
|
||
/** 2^24 bytes, MiB: {@value}. */ | ||
public static final int S_16M = S_8M << 1; | ||
|
||
/** 2^25 bytes, MiB: {@value}. */ | ||
public static final int S_32M = S_16M << 1; | ||
|
||
/** 5 MiB: {@value}. */ | ||
public static final int S_5M = 5 * S_1M; | ||
|
||
/** 10 MiB: {@value}. */ | ||
public static final int S_10M = 10 * S_1M; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters