本文整理了Java中org.apache.hadoop.ipc.RemoteException.instantiateException
方法的一些代码示例,展示了RemoteException.instantiateException
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RemoteException.instantiateException
方法的具体详情如下:
包路径:org.apache.hadoop.ipc.RemoteException
类名称:RemoteException
方法名:instantiateException
暂无
代码示例来源:origin: org.apache.hadoop/hadoop-common
/**
* Instantiate and return the exception wrapped up by this remote exception.
*
* <p> This unwraps any <code>Throwable</code> that has a constructor taking
* a <code>String</code> as a parameter.
* Otherwise it returns this.
*
* @return <code>Throwable
*/
public IOException unwrapRemoteException() {
try {
Class<?> realClass = Class.forName(getClassName());
return instantiateException(realClass.asSubclass(IOException.class));
} catch(Exception e) {
// cannot instantiate the original exception, just return this
}
return this;
}
代码示例来源:origin: org.apache.hadoop/hadoop-common
/**
* If this remote exception wraps up one of the lookupTypes
* then return this exception.
* <p>
* Unwraps any IOException.
*
* @param lookupTypes the desired exception class. may be null.
* @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;
}
代码示例来源:origin: io.hops/hadoop-common
/**
* Instantiate and return the exception wrapped up by this remote exception.
*
* <p> This unwraps any <code>Throwable</code> that has a constructor taking
* a <code>String</code> as a parameter.
* Otherwise it returns this.
*
* @return <code>Throwable
*/
public IOException unwrapRemoteException() {
try {
Class<?> realClass = Class.forName(getClassName());
return instantiateException(realClass.asSubclass(IOException.class));
} catch(Exception e) {
// cannot instantiate the original exception, just return this
}
return this;
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/**
* Instantiate and return the exception wrapped up by this remote exception.
*
* <p> This unwraps any <code>Throwable</code> that has a constructor taking
* a <code>String</code> as a parameter.
* Otherwise it returns this.
*
* @return <code>Throwable
*/
public IOException unwrapRemoteException() {
try {
Class<?> realClass = Class.forName(getClassName());
return instantiateException(realClass.asSubclass(IOException.class));
} catch(Exception e) {
// cannot instantiate the original exception, just return this
}
return this;
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-common
/**
* Instantiate and return the exception wrapped up by this remote exception.
*
* <p> This unwraps any <code>Throwable</code> that has a constructor taking
* a <code>String</code> as a parameter.
* Otherwise it returns this.
*
* @return <code>Throwable
*/
public IOException unwrapRemoteException() {
try {
Class<?> realClass = Class.forName(getClassName());
return instantiateException(realClass.asSubclass(IOException.class));
} catch(Exception e) {
// cannot instantiate the original exception, just return this
}
return this;
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
/**
* Instantiate and return the exception wrapped up by this remote exception.
*
* <p> This unwraps any <code>Throwable</code> that has a constructor taking
* a <code>String</code> as a parameter.
* Otherwise it returns this.
*
* @return <code>Throwable
*/
public IOException unwrapRemoteException() {
try {
Class<?> realClass = Class.forName(getClassName());
return instantiateException(realClass.asSubclass(IOException.class));
} catch(Exception e) {
// cannot instantiate the original exception, just return this
}
return this;
}
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
/**
* Instantiate and return the exception wrapped up by this remote exception.
*
* <p> This unwraps any <code>Throwable</code> that has a constructor taking
* a <code>String</code> as a parameter.
* Otherwise it returns this.
*
* @return <code>Throwable
*/
public IOException unwrapRemoteException() {
try {
Class<?> realClass = Class.forName(getClassName());
return instantiateException(realClass.asSubclass(IOException.class));
} catch(Exception e) {
// cannot instantiate the original exception, just return this
}
return this;
}
代码示例来源:origin: ch.cern.hadoop/hadoop-common
/**
* Instantiate and return the exception wrapped up by this remote exception.
*
* <p> This unwraps any <code>Throwable</code> that has a constructor taking
* a <code>String</code> as a parameter.
* Otherwise it returns this.
*
* @return <code>Throwable
*/
public IOException unwrapRemoteException() {
try {
Class<?> realClass = Class.forName(getClassName());
return instantiateException(realClass.asSubclass(IOException.class));
} catch(Exception e) {
// cannot instantiate the original exception, just return this
}
return this;
}
代码示例来源:origin: io.hops/hadoop-common
/**
* If this remote exception wraps up one of the lookupTypes
* then return this exception.
* <p>
* Unwraps any IOException.
*
* @param lookupTypes the desired exception class. may be null.
* @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;
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-common
/**
* 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;
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
/**
* 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;
}
代码示例来源:origin: ch.cern.hadoop/hadoop-common
/**
* 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;
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/**
* 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;
}
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
/**
* 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;
}
内容来源于网络,如有侵权,请联系作者删除!