Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
1.6.2
-
None
-
None
-
emr-5.29.0
Hadoop KMS 2.8.5
Description
I am getting cast exception from Writer when using encryption and EMR Hadoop KMS to manage keys.
Exception in thread "main" java.lang.ClassCastException: org.apache.hadoop.crypto.key.kms.KMSClientProvider cannot be cast to org.apache.hadoop.crypto.key.KeyProviderCryptoExtension at org.apache.orc.impl.HadoopShimsPre2_7$KeyProviderImpl.createLocalKey(HadoopShimsPre2_7.java:168) at org.apache.orc.impl.WriterImpl.visitTypeTree(WriterImpl.java:894) at org.apache.orc.impl.WriterImpl.visitTypeTree(WriterImpl.java:904) at org.apache.orc.impl.WriterImpl.setupEncryption(WriterImpl.java:927) at org.apache.orc.impl.WriterImpl.<init>(WriterImpl.java:160) at org.apache.orc.OrcFile.createWriter(OrcFile.java:971)
Changing (KeyProviderCryptoExtension)this.provider to (KeyProviderCryptoExtension.CryptoExtension)this.provider at HadoopShimsPre2_7.java:168 and :188 fixes this for me.
Code to replicate attached - requires to point to a valid Hadoop KMS containing "test_key" key.
Attachments
Attachments
Issue Links
- is superceded by
-
ORC-711 Support CryptoExtension in create/decryptLocalKey
- Closed