org.apache.hadoop.ipc.RemoteException.instantiateException()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(9.0k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中org.apache.hadoop.ipc.RemoteException.instantiateException方法的一些代码示例,展示了RemoteException.instantiateException的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RemoteException.instantiateException方法的具体详情如下:
包路径:org.apache.hadoop.ipc.RemoteException
类名称:RemoteException
方法名:instantiateException

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;
}

相关文章