本文整理汇总了Java中org.apache.hadoop.yarn.proto.YarnProtos.SerializedExceptionProtoOrBuilder类的典型用法代码示例。如果您正苦于以下问题:Java SerializedExceptionProtoOrBuilder类的具体用法?Java SerializedExceptionProtoOrBuilder怎么用?Java SerializedExceptionProtoOrBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SerializedExceptionProtoOrBuilder类属于org.apache.hadoop.yarn.proto.YarnProtos包,在下文中一共展示了SerializedExceptionProtoOrBuilder类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deSerialize
import org.apache.hadoop.yarn.proto.YarnProtos.SerializedExceptionProtoOrBuilder; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public Throwable deSerialize() {
SerializedException cause = getCause();
SerializedExceptionProtoOrBuilder p = viaProto ? proto : builder;
Class<?> realClass = null;
try {
realClass = Class.forName(p.getClassName());
} catch (ClassNotFoundException e) {
throw new YarnRuntimeException(e);
}
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());
}
示例2: deSerialize
import org.apache.hadoop.yarn.proto.YarnProtos.SerializedExceptionProtoOrBuilder; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public Throwable deSerialize() {
SerializedException cause = getCause();
SerializedExceptionProtoOrBuilder p = viaProto ? proto : builder;
Class<?> realClass = null;
try {
realClass = Class.forName(p.getClassName());
} catch (ClassNotFoundException e) {
throw new YarnRuntimeException(e);
}
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 = Throwable.class;
}
return instantiateException(realClass.asSubclass(classType), getMessage(),
cause == null ? null : cause.deSerialize());
}
示例3: getCause
import org.apache.hadoop.yarn.proto.YarnProtos.SerializedExceptionProtoOrBuilder; //导入依赖的package包/类
@Override
public SerializedException getCause() {
SerializedExceptionProtoOrBuilder p = viaProto ? proto : builder;
if (p.hasCause()) {
return new SerializedExceptionPBImpl(p.getCause());
} else {
return null;
}
}
示例4: getMessage
import org.apache.hadoop.yarn.proto.YarnProtos.SerializedExceptionProtoOrBuilder; //导入依赖的package包/类
@Override
public String getMessage() {
SerializedExceptionProtoOrBuilder p = viaProto ? proto : builder;
return p.getMessage();
}
示例5: getRemoteTrace
import org.apache.hadoop.yarn.proto.YarnProtos.SerializedExceptionProtoOrBuilder; //导入依赖的package包/类
@Override
public String getRemoteTrace() {
SerializedExceptionProtoOrBuilder p = viaProto ? proto : builder;
return p.getTrace();
}