Skip to content

Commit 347a52a

Browse files
Fixing findbugs and license issues related to:
HADOOP-15703. ABFS - Implement client-side throttling. Contributed by Sneha Varma and Thomas Marquardt.
1 parent 97f06b3 commit 347a52a

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ public final class AbfsClientThrottlingIntercept {
4646
private AbfsClientThrottlingIntercept() {
4747
readThrottler = new AbfsClientThrottlingAnalyzer("read");
4848
writeThrottler = new AbfsClientThrottlingAnalyzer("write");
49-
isAutoThrottlingEnabled = true;
50-
LOG.debug("Client-side throttling is enabled for the ABFS file system.");
5149
}
5250

5351
public static synchronized void initializeSingleton(boolean isAutoThrottlingEnabled) {
@@ -56,6 +54,8 @@ public static synchronized void initializeSingleton(boolean isAutoThrottlingEnab
5654
}
5755
if (singleton == null) {
5856
singleton = new AbfsClientThrottlingIntercept();
57+
isAutoThrottlingEnabled = true;
58+
LOG.debug("Client-side throttling is enabled for the ABFS file system.");
5959
}
6060
}
6161

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestAbfsClientThrottlingAnalyzer.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/**
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
119
package org.apache.hadoop.fs.azurebfs.services;
220

321
import org.apache.hadoop.fs.contract.ContractTestUtils;

0 commit comments

Comments
 (0)