[ 
https://issues.apache.org/jira/browse/HADOOP-16431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16891542#comment-16891542
 ] 

Lisheng Sun commented on HADOOP-16431:
--------------------------------------

{code:java}
[ERROR] Failed to execute goal 
org.apache.hadoop:hadoop-maven-plugins:3.3.0-SNAPSHOT:protoc (compile-protoc) 
on project hadoop-common: org.apache.maven.plugin.MojoExecutionException: 
protoc version is 'libprotoc 3.0.0', expected version is '2.5.0' -> [Help 
1]{code}
this failure is unrelated to this patch. From the output log,it should be 
protoc version problem.  The protoc version should be 2.5.0.

> Remove useless log in IOUtils.java and ExceptionDiags.java
> ----------------------------------------------------------
>
>                 Key: HADOOP-16431
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16431
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Lisheng Sun
>            Assignee: Lisheng Sun
>            Priority: Minor
>             Fix For: 3.3.0
>
>         Attachments: HADOOP-16431.001.patch, HADOOP-16431.002.patch
>
>
> When there is no String Constructor for the exception, we Log a Warn Message, 
> and rethrow the exception. We can change the Log level to TRACE/DEBUG.
> {code:java}
> private static <T extends IOException> T wrapWithMessage(
>   T exception, String msg) {
>   Class<? extends Throwable> clazz = exception.getClass();
>   try {
>     Constructor<? extends Throwable> ctor =
>       clazz.getConstructor(String.class);
>     Throwable t = ctor.newInstance(msg);
>     return (T) (t.initCause(exception));
>   } catch (Throwable e) {
>     LOG.trace("Unable to wrap exception of type " +
>              clazz + ": it has no (String) constructor", e);
>     return exception;
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to