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)
提前感謝!任何幫助都感激不盡!