Skip to content

Commit

Permalink
Merge branch 'apache:trunk' into YARN-11743
Browse files Browse the repository at this point in the history
  • Loading branch information
p-szucs authored Dec 17, 2024
2 parents 6e6abaa + fc42da7 commit 144ec82
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ public final class FileSystemConfigurations {
private static final int SIXTY_SECONDS = 60_000;

// Retry parameter defaults.
public static final int DEFAULT_MIN_BACKOFF_INTERVAL = 3_000; // 3s
public static final int DEFAULT_MAX_BACKOFF_INTERVAL = 30_000; // 30s
public static final int DEFAULT_MIN_BACKOFF_INTERVAL = 500; // 500ms
public static final int DEFAULT_MAX_BACKOFF_INTERVAL = 25_000; // 25s
public static final boolean DEFAULT_STATIC_RETRY_FOR_CONNECTION_TIMEOUT_ENABLED = true;
public static final int DEFAULT_STATIC_RETRY_INTERVAL = 1_000; // 1s
public static final int DEFAULT_BACKOFF_INTERVAL = 3_000; // 3s
public static final int DEFAULT_BACKOFF_INTERVAL = 500; // 500ms
public static final int DEFAULT_MAX_RETRY_ATTEMPTS = 30;
public static final int DEFAULT_CUSTOM_TOKEN_FETCH_RETRY_COUNT = 3;

Expand Down Expand Up @@ -108,7 +108,7 @@ public final class FileSystemConfigurations {

public static final boolean DEFAULT_ENABLE_FLUSH = true;
public static final boolean DEFAULT_DISABLE_OUTPUTSTREAM_FLUSH = true;
public static final boolean DEFAULT_ENABLE_AUTOTHROTTLING = true;
public static final boolean DEFAULT_ENABLE_AUTOTHROTTLING = false;
public static final int DEFAULT_METRIC_IDLE_TIMEOUT_MS = 60_000;
public static final int DEFAULT_METRIC_ANALYSIS_TIMEOUT_MS = 60_000;
public static final boolean DEFAULT_FS_AZURE_ACCOUNT_LEVEL_THROTTLING_ENABLED = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,24 @@ public void testDefaultMaxIORetryCount() throws Exception {
testMaxIOConfig(abfsConfig);
}

@Test
public void testClientSideThrottlingConfigs() throws Exception {
final Configuration configuration = new Configuration();
configuration.setBoolean(FS_AZURE_ENABLE_AUTOTHROTTLING, true);
AbfsConfiguration abfsConfiguration = new AbfsConfiguration(configuration,
DUMMY_ACCOUNT_NAME);
Assertions.assertThat(abfsConfiguration.isAutoThrottlingEnabled())
.describedAs("Client-side throttling enabled by configuration key")
.isTrue();

configuration.unset(FS_AZURE_ENABLE_AUTOTHROTTLING);
AbfsConfiguration abfsConfiguration2 = new AbfsConfiguration(configuration,
DUMMY_ACCOUNT_NAME);
Assertions.assertThat(abfsConfiguration2.isAutoThrottlingEnabled())
.describedAs("Client-side throttling should be disabled by default")
.isFalse();
}

@Test
public void testThrottlingIntercept() throws Exception {
AzureBlobFileSystem fs = getFileSystem();
Expand Down
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x
<id>${distMgmtSnapshotsId}</id>
<name>${distMgmtSnapshotsName}</name>
<url>${distMgmtSnapshotsUrl}</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
<repository>
<id>repository.jboss.org</id>
Expand Down

0 comments on commit 144ec82

Please sign in to comment.