HDFS-13885. Add debug logs in dfsclient around decrypting EDEK. Contributed by Kitti Nanasi.

Signed-off-by: Xiao Chen <xiao@apache.org>
This commit is contained in:
Kitti Nanasi 2018-09-03 22:32:53 -07:00 committed by Xiao Chen
parent 567b5558d5
commit 6e5ffb74dd
1 changed files with 4 additions and 0 deletions

View File

@ -953,8 +953,12 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
final CryptoCodec codec = HdfsKMSUtil.getCryptoCodec(conf, feInfo);
KeyVersion decrypted;
try (TraceScope ignored = tracer.newScope("decryptEDEK")) {
LOG.debug("Start decrypting EDEK for file: {}, output stream: 0x{}",
dfsos.getSrc(), Integer.toHexString(dfsos.hashCode()));
decrypted = HdfsKMSUtil.decryptEncryptedDataEncryptionKey(feInfo,
getKeyProvider());
LOG.debug("Decrypted EDEK for file: {}, output stream: 0x{}",
dfsos.getSrc(), Integer.toHexString(dfsos.hashCode()));
}
final CryptoOutputStream cryptoOut =
new CryptoOutputStream(dfsos, codec,