1)有谁能帮我介绍一下“Remoteexception”的概念吗?一般意味着什么?“RemoteException”在HDFS中的含义是什么?
2)又是什么意思unwrapRemoteException?不知道它的意思是“如果这个远程异常包装了lookupTypes之一”
/**
* If this remote exception wraps up one of the lookupTypes
* then return this exception.
* <p>
* Unwraps any IOException.
*
* @param lookupTypes the desired exception class.
* @return IOException, which is either the lookupClass exception or this.
*/
public IOException unwrapRemoteException(Class<?>... lookupTypes) {
if(lookupTypes == null)
return this;
for(Class<?> lookupClass : lookupTypes) {
if(!lookupClass.getName().equals(getClassName()))
continue;
try {
return instantiateException(lookupClass.asSubclass(IOException.class));
} catch(Exception e) {
// cannot instantiate lookupClass, just return this
return this;
}
}
// wrapped up exception is not in lookupTypes, just return this
return this;
}
(Hadoop_HDFS_Open_Source:https://github.com/apache/hadoop)
提前感谢!任何帮助都感激不尽!