HADOOP-11629. WASB filesystem should not start BandwidthGaugeUpdater if fs.azure.skip.metrics set to true. Contributed by Shanyu Zhao.
This commit is contained in:
parent
1a68fc4346
commit
5731c0e0d0
|
@ -1002,6 +1002,9 @@ Release 2.7.0 - UNRELEASED
|
||||||
HADOOP-11480. Typo in hadoop-aws/index.md uses wrong scheme for
|
HADOOP-11480. Typo in hadoop-aws/index.md uses wrong scheme for
|
||||||
test.fs.s3.name. (Ted Yu via aajisaka)
|
test.fs.s3.name. (Ted Yu via aajisaka)
|
||||||
|
|
||||||
|
HADOOP-11629. WASB filesystem should not start BandwidthGaugeUpdater if
|
||||||
|
fs.azure.skip.metrics set to true. (Shanyu Zhao via cnauroth)
|
||||||
|
|
||||||
Release 2.6.1 - UNRELEASED
|
Release 2.6.1 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -387,9 +387,8 @@ public class AzureNativeFileSystemStore implements NativeFileSystemStore {
|
||||||
if (null == instrumentation) {
|
if (null == instrumentation) {
|
||||||
throw new IllegalArgumentException("Null instrumentation");
|
throw new IllegalArgumentException("Null instrumentation");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.instrumentation = instrumentation;
|
this.instrumentation = instrumentation;
|
||||||
this.bandwidthGaugeUpdater = new BandwidthGaugeUpdater(instrumentation);
|
|
||||||
if (null == this.storageInteractionLayer) {
|
if (null == this.storageInteractionLayer) {
|
||||||
this.storageInteractionLayer = new StorageInterfaceImpl();
|
this.storageInteractionLayer = new StorageInterfaceImpl();
|
||||||
}
|
}
|
||||||
|
@ -405,7 +404,13 @@ public class AzureNativeFileSystemStore implements NativeFileSystemStore {
|
||||||
//
|
//
|
||||||
if (null == conf) {
|
if (null == conf) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"Cannot initialize WASB file system, URI is null");
|
"Cannot initialize WASB file system, conf is null");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!conf.getBoolean(
|
||||||
|
NativeAzureFileSystem.SKIP_AZURE_METRICS_PROPERTY_NAME, false)) {
|
||||||
|
//If not skip azure metrics, create bandwidthGaugeUpdater
|
||||||
|
this.bandwidthGaugeUpdater = new BandwidthGaugeUpdater(instrumentation);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Incoming parameters validated. Capture the URI and the job configuration
|
// Incoming parameters validated. Capture the URI and the job configuration
|
||||||
|
@ -1782,10 +1787,13 @@ public class AzureNativeFileSystemStore implements NativeFileSystemStore {
|
||||||
selfThrottlingWriteFactor);
|
selfThrottlingWriteFactor);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResponseReceivedMetricUpdater.hook(
|
if(bandwidthGaugeUpdater != null) {
|
||||||
operationContext,
|
//bandwidthGaugeUpdater is null when we config to skip azure metrics
|
||||||
instrumentation,
|
ResponseReceivedMetricUpdater.hook(
|
||||||
bandwidthGaugeUpdater);
|
operationContext,
|
||||||
|
instrumentation,
|
||||||
|
bandwidthGaugeUpdater);
|
||||||
|
}
|
||||||
|
|
||||||
// Bind operation context to receive send request callbacks on this operation.
|
// Bind operation context to receive send request callbacks on this operation.
|
||||||
// If reads concurrent to OOB writes are allowed, the interception will reset
|
// If reads concurrent to OOB writes are allowed, the interception will reset
|
||||||
|
@ -2561,7 +2569,10 @@ public class AzureNativeFileSystemStore implements NativeFileSystemStore {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
bandwidthGaugeUpdater.close();
|
if(bandwidthGaugeUpdater != null) {
|
||||||
|
bandwidthGaugeUpdater.close();
|
||||||
|
bandwidthGaugeUpdater = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finalizer to ensure complete shutdown
|
// Finalizer to ensure complete shutdown
|
||||||
|
|
Loading…
Reference in New Issue