HDFS-7931. DistributedFileSystem should not look for keyProvider in cache if Encryption is disabled (asuresh)
This commit is contained in:
parent
e516706b89
commit
7660da95cb
@ -479,6 +479,9 @@ Release 2.7.1 - UNRELEASED
|
||||
|
||||
HDFS-8081. Split getAdditionalBlock() into two methods. (shv)
|
||||
|
||||
HDFS-7931. DistributedFileSystem should not look for keyProvider in
|
||||
cache if Encryption is disabled (asuresh)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
BUG FIXES
|
||||
|
@ -3538,6 +3538,10 @@ public void setKeyProvider(KeyProvider provider) {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isHDFSEncryptionEnabled() {
|
||||
return conf.get(
|
||||
DFSConfigKeys.DFS_ENCRYPTION_KEY_PROVIDER_URI, null) != null;
|
||||
}
|
||||
/**
|
||||
* Returns the SaslDataTransferClient configured for this DFSClient.
|
||||
*
|
||||
|
@ -2191,7 +2191,7 @@ public Void next(final FileSystem fs, final Path p)
|
||||
public Token<?>[] addDelegationTokens(
|
||||
final String renewer, Credentials credentials) throws IOException {
|
||||
Token<?>[] tokens = super.addDelegationTokens(renewer, credentials);
|
||||
if (dfs.getKeyProvider() != null) {
|
||||
if (dfs.isHDFSEncryptionEnabled()) {
|
||||
KeyProviderDelegationTokenExtension keyProviderDelegationTokenExtension =
|
||||
KeyProviderDelegationTokenExtension.
|
||||
createKeyProviderDelegationTokenExtension(dfs.getKeyProvider());
|
||||
|
Loading…
Reference in New Issue
Block a user