[
https://issues.apache.org/jira/browse/HADOOP-14333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15977514#comment-15977514
]
Yongjun Zhang commented on HADOOP-14333:
----------------------------------------
HI [~shahrs87],
Agree that returning false when exception is thrown is not quite right.
However, currently {{DFSClient#isHDFSEncryptionEnabled}} is only called by
{{DistributedFileSystem#getTrashRoot}} (which simply issue a warning message
and ignore the exception, and treat it as if false is returned) in Hadoop code,
which is used only by FSShell.
Then it's the hive code that tries to use it.
How do we expect any client code to handle if there is exception thrown from
this code? retry? That'd means a big change on hive side I guess.
Maybe we can temporarily change the behavior here to issue a warning message
and return false when exception is throw. Then coordinate a change between
hadoop and hive (if hive is currently the only hacky user). Right now hive
issue is a compile time issue.
What do you think?
Thanks.
> HADOOP-14104 changed DFSClient API isHDFSEncryptionEnabled, impacted hacky
> hive code
> -------------------------------------------------------------------------------------
>
> Key: HADOOP-14333
> URL: https://issues.apache.org/jira/browse/HADOOP-14333
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Yongjun Zhang
> Assignee: Yongjun Zhang
>
> Though Hive should be fixed not to access DFSClient which is private to
> HADOOP, removing the throws added by HADOOP-14104 is a quicker solution to
> unblock hive.
> Hive code
> {code}
> private boolean isEncryptionEnabled(DFSClient client, Configuration conf) {
> try {
> DFSClient.class.getMethod("isHDFSEncryptionEnabled");
> } catch (NoSuchMethodException e) {
> // the method is available since Hadoop-2.7.1
> // if we run with an older Hadoop, check this ourselves
> return !conf.getTrimmed(DFSConfigKeys.DFS_ENCRYPTION_KEY_PROVIDER_URI,
> "").isEmpty();
> }
> return client.isHDFSEncryptionEnabled();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]