本文整理了Java中org.apache.hadoop.hdfs.server.datanode.DataNode.checkDiskError()
方法的一些代码示例,展示了DataNode.checkDiskError()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataNode.checkDiskError()
方法的具体详情如下:
包路径:org.apache.hadoop.hdfs.server.datanode.DataNode
类名称:DataNode
方法名:checkDiskError
[英]Check the disk error synchronously.
[中]同步检查磁盘错误。
代码示例来源:origin: org.apache.hadoop/hadoop-hdfs
checkDiskError();
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
protected void checkDiskError( IOException e ) throws IOException {
if (e.getMessage() != null &&
e.getMessage().startsWith("No space left on device")) {
throw new DiskOutOfSpaceException("No space left on device");
} else {
checkDiskError();
}
}
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
datanode.checkDiskError(ioe);
throw ioe;
代码示例来源:origin: com.facebook.hadoop/hadoop-core
/** Check if there is no space in disk
* @param e that caused this checkDiskError call
**/
protected void checkDiskError(Exception e ) throws IOException {
if (e instanceof ClosedByInterruptException
|| e instanceof java.io.InterruptedIOException) {
return;
}
LOG.warn("checkDiskError: exception: ", e);
if (e.getMessage() != null &&
e.getMessage().startsWith("No space left on device")) {
throw new DiskOutOfSpaceException("No space left on device");
} else {
checkDiskError();
}
}
代码示例来源:origin: io.fabric8/fabric-hadoop
/** Check if there is no space in disk
* @param e that caused this checkDiskError call
**/
protected void checkDiskError(Exception e ) throws IOException {
LOG.warn("checkDiskError: exception: ", e);
if (e instanceof SocketException || e instanceof SocketTimeoutException
|| e instanceof ClosedByInterruptException
|| e.getMessage().startsWith("An established connection was aborted")
|| e.getMessage().startsWith("Broken pipe")
|| e.getMessage().startsWith("Connection reset")
|| e.getMessage().contains("java.nio.channels.SocketChannel")) {
LOG.info("Not checking disk as checkDiskError was called on a network" +
" related exception");
return;
}
if (e.getMessage() != null &&
e.getMessage().startsWith("No space left on device")) {
throw new DiskOutOfSpaceException("No space left on device");
} else {
checkDiskError();
}
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
datanode.checkDiskError(ioe);
代码示例来源:origin: com.facebook.hadoop/hadoop-core
/**
* Find the file corresponding to the block and return it if it exists.
*/
File getValidateBlockFile(int namespaceId, Block b, boolean checkSize)
throws IOException {
//Should we check for metadata file too?
DatanodeBlockInfo blockInfo = getDatanodeBlockInfo(namespaceId, b);
File f = null;
if (blockInfo != null) {
if (checkSize) {
blockInfo.verifyFinalizedSize();
}
f = blockInfo.getFile();
if(f.exists())
return f;
// if file is not null, but doesn't exist - possibly disk failed
datanode.checkDiskError();
}
if (InterDatanodeProtocol.LOG.isDebugEnabled()) {
InterDatanodeProtocol.LOG.debug("b=" + b + ", f=" + ((f == null) ? "null"
: f));
}
return null;
}
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
datanode.checkDiskError(iex);
throw iex;
代码示例来源:origin: com.facebook.hadoop/hadoop-core
throw iix;
} catch (IOException iex) {
datanode.checkDiskError(iex);
throw iex;
代码示例来源:origin: io.fabric8/fabric-hadoop
checkDiskError(ie);
} catch(IOException e) {
LOG.warn("DataNode.checkDiskError failed in run() with: ", e);
代码示例来源:origin: com.facebook.hadoop/hadoop-core
datanode.checkDiskError(ioe); // may throw an exception here
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
if (cause != null) { // possible disk error
ioe = cause;
datanode.checkDiskError(ioe); // may throw an exception here
代码示例来源:origin: com.facebook.hadoop/hadoop-core
datanode.checkDiskError();
} catch (IOException e) {
LOG.warn("Error when checking disks : " + StringUtils.stringifyException(e));
代码示例来源:origin: com.facebook.hadoop/hadoop-core
checkDiskError();
throw e;
代码示例来源:origin: ch.cern.hadoop/hadoop-hdfs
checkDiskError();
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
checkDiskError();
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
checkDiskError();
throw e;
内容来源于网络,如有侵权,请联系作者删除!