[
https://issues.apache.org/jira/browse/HDFS-12974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16309210#comment-16309210
]
fang zhenyi commented on HDFS-12974:
------------------------------------
Thanks [~xiaochen] for giving me sugesstion.
I find that AuthorizationException class does not provide the stack trace. The
exception I got from creating the encrypted zone was an AuthorizationException.
StringUtils # stringifyException Requires the stack trace to return the
result.StringUtils # stringifyException will return null if exception is
AuthorizationException.So CryptoAdmin#prettifyException can not get useful
exeception infomation. Do you have any better suggestions to fix it? I am very
happy to get your sugesstions.
AuthorizationException.java
{code:java}
/**
* An exception class for authorization-related issues.
*
* This class <em>does not</em> provide the stack trace for security purposes.
*/
@InterfaceAudience.Public
@InterfaceStability.Evolving
public class AuthorizationException extends AccessControlException {
{code} .
StringUtils # stringifyException
{code:java}
public static String stringifyException(Throwable e) {
StringWriter stm = new StringWriter();
PrintWriter wrt = new PrintWriter(stm);
e.printStackTrace(wrt);
wrt.close();
return stm.toString();
}
{code}
> Exception information can not be returned when I create transparent
> encryption zone.
> ------------------------------------------------------------------------------------
>
> Key: HDFS-12974
> URL: https://issues.apache.org/jira/browse/HDFS-12974
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: encryption
> Affects Versions: 3.0.0
> Reporter: fang zhenyi
> Assignee: fang zhenyi
> Priority: Minor
> Fix For: 3.1.0
>
> Attachments: HDFS-12974.001.patch
>
>
> When I add the following configuration to the kms-acl.xml file, I create
> encrypted space and I can not get any exception information.
> <property>
> <name>key.acl.key2.GENERATE_EEK</name>
> <value>mr</value>
> </property>
> root@fangzhenyi01:~# hdfs crypto -createZone -keyName key2 -path /zone
> 2018-01-02 10:41:44,632 WARN util.NativeCodeLoader: Unable to load
> native-hadoop library for your platform... using builtin-java classes where
> applicable
> RemoteException:
> root@fangzhenyi01:~#
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]