[ https://issues.apache.org/jira/browse/HDFS-11885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16032095#comment-16032095 ]
Rushabh S Shah edited comment on HDFS-11885 at 5/31/17 10:16 PM: ----------------------------------------------------------------- [~andrew.wang]: Thanks for the patch. It looks almost good except for some minor comments. 1. We can skip reading EDEKCacheLoader related conf properties in {{FSNamesystem}}. We can just pass the conf object to EDEKCacheLoader class and let it read in EDEKCacheLoader. This will cleanup the code in {{FSNamesystem}} 2. Why to call {{edekCacheLoader.warmUpEdekCache(0)}} after {{FSNamesystem#createEncryptionZone}} ? 3. The patch applies almost cleanly in branch-2.8 but compilation is failing with the following error. {noformat} [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /Users/rushabhs/hadoop/hadoop-tmp/Hadoop/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestEncryptionZonesWithKMS.java:[159,17] method warmUpEncryptedKeys in class org.apache.hadoop.crypto.key.KeyProviderCryptoExtension cannot be applied to given types; required: java.lang.String[] found: java.lang.Object reason: varargs mismatch; java.lang.Object cannot be converted to java.lang.String [ERROR] /Users/rushabhs/hadoop/hadoop-tmp/Hadoop/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestEncryptionZonesWithKMS.java:[168,50] incompatible types: java.lang.Object cannot be converted to java.lang.String {noformat} Its in {{TestEncryptionZonesWithKMS#testWarmupEDEKCacheDoesNotBlocksCreateZone}} while calling {{when(spy).warmUpEncryptedKeys(Mockito.any()}} warmUpEncryptedKeys expects String object but getting Object. Can you please check on that ? was (Author: shahrs87): [~andrew.wang]: Thanks for the patch. It looks almost good except for some minor comments. I have few comments. 1. We can skip reading EDEKCacheLoader related conf properties in {{FSNamesystem}}. We can just pass the conf object to EDEKCacheLoader class and let it read in EDEKCacheLoader. This will cleanup the code in {{FSNamesystem}} 2. Why to call {{edekCacheLoader.warmUpEdekCache(0)}} after {{FSNamesystem#createEncryptionZone}} ? 3. The patch applies almost cleanly in branch-2.8 but compilation is failing with the following error. {noformat} [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /Users/rushabhs/hadoop/hadoop-tmp/Hadoop/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestEncryptionZonesWithKMS.java:[159,17] method warmUpEncryptedKeys in class org.apache.hadoop.crypto.key.KeyProviderCryptoExtension cannot be applied to given types; required: java.lang.String[] found: java.lang.Object reason: varargs mismatch; java.lang.Object cannot be converted to java.lang.String [ERROR] /Users/rushabhs/hadoop/hadoop-tmp/Hadoop/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestEncryptionZonesWithKMS.java:[168,50] incompatible types: java.lang.Object cannot be converted to java.lang.String {noformat} Its in {{TestEncryptionZonesWithKMS#testWarmupEDEKCacheDoesNotBlocksCreateZone}} while calling {{when(spy).warmUpEncryptedKeys(Mockito.any()}} warmUpEncryptedKeys expects String object but getting Object. Can you please check on that ? > createEncryptionZone should not block on initializing EDEK cache > ---------------------------------------------------------------- > > Key: HDFS-11885 > URL: https://issues.apache.org/jira/browse/HDFS-11885 > Project: Hadoop HDFS > Issue Type: Bug > Components: encryption > Affects Versions: 2.6.5 > Reporter: Andrew Wang > Assignee: Andrew Wang > Priority: Critical > Attachments: HDFS-11885.001.patch, HDFS-11885.002.patch > > > When creating an encryption zone, we call {{ensureKeyIsInitialized}}, which > calls {{provider.warmUpEncryptedKeys(keyName)}}. This is a blocking call, > which attempts to fill the key cache up to the low watermark. > If the KMS is down or slow, this can take a very long time, and cause the > createZone RPC to fail with a timeout. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org