pranavsaxena-microsoft commented on code in PR #3440:
URL: https://github.com/apache/hadoop/pull/3440#discussion_r1062141142
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java:
##########
@@ -160,42 +168,30 @@ private AbfsClient(final URL baseUrl, final
SharedKeyCredentials sharedKeyCreden
public AbfsClient(final URL baseUrl, final SharedKeyCredentials
sharedKeyCredentials,
final AbfsConfiguration abfsConfiguration,
final AccessTokenProvider tokenProvider,
+ final EncryptionContextProvider encryptionContextProvider,
final AbfsClientContext abfsClientContext)
throws IOException {
- this(baseUrl, sharedKeyCredentials, abfsConfiguration, abfsClientContext);
+ this(baseUrl, sharedKeyCredentials, abfsConfiguration,
+ encryptionContextProvider, abfsClientContext);
this.tokenProvider = tokenProvider;
}
public AbfsClient(final URL baseUrl, final SharedKeyCredentials
sharedKeyCredentials,
final AbfsConfiguration abfsConfiguration,
final SASTokenProvider sasTokenProvider,
+ final EncryptionContextProvider encryptionContextProvider,
final AbfsClientContext abfsClientContext)
throws IOException {
- this(baseUrl, sharedKeyCredentials, abfsConfiguration, abfsClientContext);
+ this(baseUrl, sharedKeyCredentials, abfsConfiguration,
+ encryptionContextProvider, abfsClientContext);
this.sasTokenProvider = sasTokenProvider;
}
- private byte[] getSHA256Hash(String key) throws IOException {
- try {
- final MessageDigest digester = MessageDigest.getInstance("SHA-256");
- return digester.digest(key.getBytes(StandardCharsets.UTF_8));
- } catch (NoSuchAlgorithmException e) {
- throw new IOException(e);
- }
- }
-
- private String getBase64EncodedString(String key) {
- return getBase64EncodedString(key.getBytes(StandardCharsets.UTF_8));
- }
-
- private String getBase64EncodedString(byte[] bytes) {
- return Base64.getEncoder().encodeToString(bytes);
- }
-
@Override
public void close() throws IOException {
if (tokenProvider instanceof Closeable) {
- IOUtils.cleanupWithLogger(LOG, (Closeable) tokenProvider);
+ org.apache.hadoop.io.IOUtils.cleanupWithLogger(LOG,
Review Comment:
restored.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]