Skip to content

Commit b718b3c

Browse files
committed
javaodocs; import; unnecessary condition.
1 parent 0cd8c8c commit b718b3c

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/extensions/EncryptionContextProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* */
3838
public interface EncryptionContextProvider extends Destroyable {
3939
/**
40-
* Initialize instance
40+
* Initialize instance.
4141
*
4242
* @param configuration rawConfig instance
4343
* @param accountName Account Name (with domain)
@@ -47,7 +47,7 @@ public interface EncryptionContextProvider extends Destroyable {
4747
void initialize(Configuration configuration, String accountName, String fileSystem) throws IOException;
4848

4949
/**
50-
* Fetch encryption context for a given path
50+
* Fetch encryption context for a given path.
5151
*
5252
* @param path file path from filesystem root
5353
* @return encryptionContext key
@@ -56,7 +56,7 @@ public interface EncryptionContextProvider extends Destroyable {
5656
ABFSKey getEncryptionContext(String path) throws IOException;
5757

5858
/**
59-
* Fetch encryption key in-exchange for encryption context
59+
* Fetch encryption key in-exchange for encryption context.
6060
*
6161
* @param path file path from filesystem root
6262
* @param encryptionContext encryptionContext fetched from server

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ private void addEncryptionKeyRequestHeaders(String path,
262262
return;
263263
}
264264
String encodedKey, encodedKeySHA256;
265-
boolean encryptionAdapterCreated = false;
266265
switch (encryptionType) {
267266
case GLOBAL_KEY:
268267
encodedKey = clientProvidedEncryptionKey;
@@ -283,10 +282,6 @@ private void addEncryptionKeyRequestHeaders(String path,
283282
default: return; // no client-provided encryption keys
284283
}
285284

286-
if (encryptionAdapterCreated && encryptionAdapter != null) {
287-
encryptionAdapter.destroy();
288-
}
289-
290285
requestHeaders.add(new AbfsHttpHeader(X_MS_ENCRYPTION_KEY, encodedKey));
291286
requestHeaders.add(
292287
new AbfsHttpHeader(X_MS_ENCRYPTION_KEY_SHA256, encodedKeySHA256));

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@
3939
import org.apache.hadoop.fs.azurebfs.constants.FSOperationType;
4040
import org.apache.hadoop.fs.azurebfs.contracts.exceptions.AbfsRestOperationException;
4141
import org.apache.hadoop.fs.azurebfs.contracts.exceptions.AzureBlobFileSystemException;
42+
import org.apache.hadoop.fs.azurebfs.security.EncryptionAdapter;
4243
import org.apache.hadoop.fs.azurebfs.utils.CachedSASToken;
4344
import org.apache.hadoop.fs.azurebfs.utils.Listener;
4445
import org.apache.hadoop.fs.azurebfs.utils.TracingContext;
45-
import org.apache.hadoop.fs.azurebfs.security.EncryptionAdapter;
4646
import org.apache.hadoop.fs.statistics.IOStatistics;
4747
import org.apache.hadoop.fs.statistics.IOStatisticsSource;
4848

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,6 @@ public synchronized void close() throws IOException {
500500
if (encryptionAdapter != null) {
501501
encryptionAdapter.destroy();
502502
}
503-
504503
if (hasLease()) {
505504
lease.free();
506505
lease = null;

0 commit comments

Comments
 (0)