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

zhihai xu commented on YARN-3745:
---------------------------------

Hi [~lavkesh], thanks for updating the patch. The patch mostly looks good. Some 
nits:
#Can we remove the following code from testDeserializeWithDefaultConstructor? 
these are duplicate test as {{testDeserialize}}, So we can save a little bit 
time to run test.
{code}
    try {
      pb.deSerialize();
      Assert.fail("deSerialze should throw YarnRuntimeException");
    } catch (YarnRuntimeException e) {
      Assert
          .assertEquals(ClassNotFoundException.class, e.getCause().getClass());
    }
{code}
#The typo in the comment is still not fixed: change {{has}} to {{have}}


> SerializedException should also try to instantiate internal exception with 
> the default constructor
> --------------------------------------------------------------------------------------------------
>
>                 Key: YARN-3745
>                 URL: https://issues.apache.org/jira/browse/YARN-3745
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 2.6.0
>            Reporter: Lavkesh Lahngir
>            Assignee: Lavkesh Lahngir
>         Attachments: YARN-3745.1.patch, YARN-3745.2.patch, YARN-3745.patch
>
>
> While deserialising a SerializedException it tries to create internal 
> exception in instantiateException() with cn = 
> cls.getConstructor(String.class).
> if cls does not has a constructor with String parameter it throws 
> Nosuchmethodexception
> for example ClosedChannelException class.  
> We should also try to instantiate exception with default constructor so that 
> inner exception can to propagated.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to