@Override public LocalRecoverableWriter createRecoverableWriter() throws IOException { return new LocalRecoverableWriter(this); }
@Override public RecoverableFsDataOutputStream open(Path filePath) throws IOException { final File targetFile = fs.pathToFile(filePath); final File tempFile = generateStagingTempFilePath(targetFile); // try to create the parent final File parent = tempFile.getParentFile(); if (parent != null && !parent.mkdirs() && !parent.exists()) { throw new IOException("Failed to create the parent directory: " + parent); } return new LocalRecoverableFsDataOutputStream(targetFile, tempFile); }
@Override public RecoverableFsDataOutputStream open(Path filePath) throws IOException { final File targetFile = fs.pathToFile(filePath); final File tempFile = generateStagingTempFilePath(targetFile); // try to create the parent final File parent = tempFile.getParentFile(); if (parent != null && !parent.mkdirs() && !parent.exists()) { throw new IOException("Failed to create the parent directory: " + parent); } return new LocalRecoverableFsDataOutputStream(targetFile, tempFile); }
@Override public LocalRecoverableWriter createRecoverableWriter() throws IOException { return new LocalRecoverableWriter(this); }