You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Yongjun Zhang (JIRA)" <ji...@apache.org> on 2017/04/20 19:34:04 UTC

[jira] [Updated] (HADOOP-14333) HADOOP-14104 changed DFSClient API isHDFSEncryptionEnabled, impacted hacky hive code

     [ https://issues.apache.org/jira/browse/HADOOP-14333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yongjun Zhang updated HADOOP-14333:
-----------------------------------
    Description: 
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}


  was:
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.




> 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
>
> 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: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org