|
@@ -20,7 +20,6 @@ package org.apache.hadoop.fs.azurebfs;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.lang.reflect.Field;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
import com.google.common.annotations.VisibleForTesting;
|
|
|
import com.google.common.base.Preconditions;
|
|
@@ -219,8 +218,6 @@ public class AbfsConfiguration{
|
|
|
DefaultValue = DEFAULT_SAS_TOKEN_RENEW_PERIOD_FOR_STREAMS_IN_SECONDS)
|
|
|
private long sasTokenRenewPeriodForStreamsInSeconds;
|
|
|
|
|
|
- private Map<String, String> storageAccountKeys;
|
|
|
-
|
|
|
public AbfsConfiguration(final Configuration rawConfig, String accountName)
|
|
|
throws IllegalAccessException, InvalidConfigurationValueException, IOException {
|
|
|
this.rawConfig = ProviderUtils.excludeIncompatibleCredentialProviders(
|
|
@@ -228,7 +225,6 @@ public class AbfsConfiguration{
|
|
|
this.accountName = accountName;
|
|
|
this.isSecure = getBoolean(FS_AZURE_SECURE_MODE, false);
|
|
|
|
|
|
- validateStorageAccountKeys();
|
|
|
Field[] fields = this.getClass().getDeclaredFields();
|
|
|
for (Field field : fields) {
|
|
|
field.setAccessible(true);
|
|
@@ -740,16 +736,6 @@ public class AbfsConfiguration{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- void validateStorageAccountKeys() throws InvalidConfigurationValueException {
|
|
|
- Base64StringConfigurationBasicValidator validator = new Base64StringConfigurationBasicValidator(
|
|
|
- FS_AZURE_ACCOUNT_KEY_PROPERTY_NAME, "", true);
|
|
|
- this.storageAccountKeys = rawConfig.getValByRegex(FS_AZURE_ACCOUNT_KEY_PROPERTY_NAME_REGX);
|
|
|
-
|
|
|
- for (Map.Entry<String, String> account : storageAccountKeys.entrySet()) {
|
|
|
- validator.validate(account.getValue());
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
int validateInt(Field field) throws IllegalAccessException, InvalidConfigurationValueException {
|
|
|
IntegerConfigurationValidatorAnnotation validator = field.getAnnotation(IntegerConfigurationValidatorAnnotation.class);
|
|
|
String value = get(validator.ConfigurationKey());
|