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

View File

@ -953,8 +953,12 @@ public HdfsDataOutputStream createWrappedOutputStream(DFSOutputStream dfsos,
final CryptoCodec codec = HdfsKMSUtil.getCryptoCodec(conf, feInfo); final CryptoCodec codec = HdfsKMSUtil.getCryptoCodec(conf, feInfo);
KeyVersion decrypted; KeyVersion decrypted;
try (TraceScope ignored = tracer.newScope("decryptEDEK")) { 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, decrypted = HdfsKMSUtil.decryptEncryptedDataEncryptionKey(feInfo,
getKeyProvider()); getKeyProvider());
LOG.debug("Decrypted EDEK for file: {}, output stream: 0x{}",
dfsos.getSrc(), Integer.toHexString(dfsos.hashCode()));
} }
final CryptoOutputStream cryptoOut = final CryptoOutputStream cryptoOut =
new CryptoOutputStream(dfsos, codec, new CryptoOutputStream(dfsos, codec,