Matt Czyz created ORC-596:

             Summary: ClassCastException when using EMR Hadoop KMS with ORC 
                 Key: ORC-596
             Project: ORC
          Issue Type: Bug
          Components: Java
    Affects Versions: 1.6.2
         Environment: emr-5.29.0 
Hadoop KMS 2.8.5
            Reporter: Matt Czyz
         Attachments:, castexception.patch

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 
        at org.apache.orc.impl.WriterImpl.visitTypeTree(
        at org.apache.orc.impl.WriterImpl.visitTypeTree(
        at org.apache.orc.impl.WriterImpl.setupEncryption(
        at org.apache.orc.impl.WriterImpl.<init>(
        at org.apache.orc.OrcFile.createWriter(
Changing _(KeyProviderCryptoExtension)this.provider_ to 
_(KeyProviderCryptoExtension.CryptoExtension)this.provider_ at and :188 fixes this for me.

Code to replicate attached - requires to point to a valid Hadoop KMS containing 
"test_key" key.

This message was sent by Atlassian Jira

Reply via email to