hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lavkesh Lahngir (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (YARN-3770) SerializedException should also handle java.lang.Error
Date Fri, 05 Jun 2015 10:13:00 GMT

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

Lavkesh Lahngir updated YARN-3770:
----------------------------------
    Description: 
IN SerializedExceptionPBImpl deserialize() method
{code}
    Class classType = null;
    if (YarnException.class.isAssignableFrom(realClass)) {
      classType = YarnException.class;
    } else if (IOException.class.isAssignableFrom(realClass)) {
      classType = IOException.class;
    } else if (RuntimeException.class.isAssignableFrom(realClass)) {
      classType = RuntimeException.class;
    } else {
      classType = Exception.class;
    }
    return instantiateException(realClass.asSubclass(classType), getMessage(),
      cause == null ? null : cause.deSerialize());
  }
{code}
if realClass is a subclass of java.lang.Error deSerialize() throws ClassCastException.
in the last else statement classType should be equal to Trowable.class instead of Exception.class.

  was:
IN SerializedExceptionPBImpl
{code}
    Class classType = null;
    if (YarnException.class.isAssignableFrom(realClass)) {
      classType = YarnException.class;
    } else if (IOException.class.isAssignableFrom(realClass)) {
      classType = IOException.class;
    } else if (RuntimeException.class.isAssignableFrom(realClass)) {
      classType = RuntimeException.class;
    } else {
      classType = Exception.class;
    }
    return instantiateException(realClass.asSubclass(classType), getMessage(),
      cause == null ? null : cause.deSerialize());
  }
{code}
if realClass is a subclass of java.lang.Error deSerialize() throws ClassCastException.
in the last else statement classType should be equal to Trowable.class instead of Exception.class.


> SerializedException should also handle java.lang.Error 
> -------------------------------------------------------
>
>                 Key: YARN-3770
>                 URL: https://issues.apache.org/jira/browse/YARN-3770
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Lavkesh Lahngir
>            Assignee: Lavkesh Lahngir
>
> IN SerializedExceptionPBImpl deserialize() method
> {code}
>     Class classType = null;
>     if (YarnException.class.isAssignableFrom(realClass)) {
>       classType = YarnException.class;
>     } else if (IOException.class.isAssignableFrom(realClass)) {
>       classType = IOException.class;
>     } else if (RuntimeException.class.isAssignableFrom(realClass)) {
>       classType = RuntimeException.class;
>     } else {
>       classType = Exception.class;
>     }
>     return instantiateException(realClass.asSubclass(classType), getMessage(),
>       cause == null ? null : cause.deSerialize());
>   }
> {code}
> if realClass is a subclass of java.lang.Error deSerialize() throws ClassCastException.
> in the last else statement classType should be equal to Trowable.class instead of Exception.class.



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

Mime
View raw message