@Override public FSDataInputStream openInputStream() throws IOException { return getFileSystem().open(filePath); }
/** * Discard the state by deleting the file that stores the state. If the parent directory * of the state is empty after deleting the state file, it is also deleted. * * @throws Exception Thrown, if the file deletion (not the directory deletion) fails. */ @Override public void discardState() throws Exception { FileSystem fs = getFileSystem(); fs.delete(filePath, false); }
/** * Discard the state by deleting the file that stores the state. If the parent directory * of the state is empty after deleting the state file, it is also deleted. * * @throws Exception Thrown, if the file deletion (not the directory deletion) fails. */ @Override public void discardState() throws Exception { FileSystem fs = getFileSystem(); fs.delete(filePath, false); }
/** * Discard the state by deleting the file that stores the state. If the parent directory * of the state is empty after deleting the state file, it is also deleted. * * @throws Exception Thrown, if the file deletion (not the directory deletion) fails. */ @Override public void discardState() throws Exception { FileSystem fs = getFileSystem(); fs.delete(filePath, false); }
@Override public FSDataInputStream openInputStream() throws IOException { return getFileSystem().open(filePath); }
@Override public FSDataInputStream openInputStream() throws IOException { return getFileSystem().open(filePath); }
@Override public FSDataInputStream openInputStream() throws IOException { return getFileSystem().open(filePath); }
/** * Discard the state by deleting the file that stores the state. If the parent directory * of the state is empty after deleting the state file, it is also deleted. * * @throws Exception Thrown, if the file deletion (not the directory deletion) fails. */ @Override public void discardState() throws Exception { FileSystem fs = getFileSystem(); fs.delete(filePath, false); if (fs.getKind() == FileSystemKind.FILE_SYSTEM) { try { FileUtils.deletePathIfEmpty(fs, filePath.getParent()); } catch (Exception ignored) {} } }