[ https://issues.apache.org/jira/browse/HDFS-7067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14275897#comment-14275897 ]
Hadoop QA commented on HDFS-7067: --------------------------------- {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12686872/HDFS-7067.002.patch against trunk revision 10ac5ab. {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:green}+1 tests included{color}. The patch appears to include 1 new or modified test files. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javadoc{color}. There were no new javadoc warning messages. {color:green}+1 eclipse:eclipse{color}. The patch built with eclipse:eclipse. {color:green}+1 findbugs{color}. The patch does not introduce any new Findbugs (version 2.0.3) warnings. {color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings. {color:red}-1 core tests{color}. The patch failed these unit tests in hadoop-common-project/hadoop-common: org.apache.hadoop.crypto.key.TestKeyProviderFactory Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/9199//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9199//console This message is automatically generated. > ClassCastException while using a key created by keytool to create encryption > zone. > ----------------------------------------------------------------------------------- > > Key: HDFS-7067 > URL: https://issues.apache.org/jira/browse/HDFS-7067 > Project: Hadoop HDFS > Issue Type: Bug > Components: encryption > Affects Versions: 2.6.0 > Reporter: Yi Yao > Assignee: Charles Lamb > Priority: Minor > Attachments: HDFS-7067.001.patch, HDFS-7067.002.patch, > hdfs7067.keystore > > > I'm using transparent encryption. If I create a key for KMS keystore via > keytool and use the key to create an encryption zone. I get a > ClassCastException rather than an exception with decent error message. I know > we should use 'hadoop key create' to create a key. It's better to provide an > decent error message to remind user to use the right way to create a KMS key. > [LOG] > ERROR[user=hdfs] Method:'GET' Exception:'java.lang.ClassCastException: > javax.crypto.spec.SecretKeySpec cannot be cast to > org.apache.hadoop.crypto.key.JavaKeyStoreProvider$KeyMetadata' -- This message was sent by Atlassian JIRA (v6.3.4#6332)