List of usage examples for org.apache.hadoop.hdfs DFSOutputStream abort
void abort() throws IOException
From source file:com.mellanox.r4h.DFSClient.java
License:Apache License
/** Close/abort all files being written. */ private void closeAllFilesBeingWritten(final boolean abort) { for (;;) {//from www . java 2s.c om final long inodeId; final DFSOutputStream out; synchronized (filesBeingWritten) { if (filesBeingWritten.isEmpty()) { return; } inodeId = filesBeingWritten.keySet().iterator().next(); out = filesBeingWritten.remove(inodeId); } if (out != null) { try { if (abort) { out.abort(); } else { out.close(); } } catch (IOException ie) { LOG.error("Failed to " + (abort ? "abort" : "close") + " inode " + inodeId, ie); } } } }