@Override public boolean initOutPathLocalFS(Path outPath, WriteMode writeMode, boolean createDirectory) throws IOException { return unsafeFileSystem.initOutPathLocalFS(outPath, writeMode, createDirectory); }
if(!fs.initOutPathLocalFS(p, writeMode, false)) { if(!fs.initOutPathLocalFS(p, writeMode, true)) {
@Override public void go() throws Exception { fs.initOutPathLocalFS(path.getParent(), WriteMode.OVERWRITE, true); try (FSDataOutputStream out = fs.create(path, WriteMode.OVERWRITE)) { out.write(11); } } }
@Override public boolean initOutPathLocalFS(Path outPath, WriteMode writeMode, boolean createDirectory) throws IOException { return unsafeFileSystem.initOutPathLocalFS(outPath, writeMode, createDirectory); }
@Override public boolean initOutPathLocalFS(Path outPath, WriteMode writeMode, boolean createDirectory) throws IOException { return unsafeFileSystem.initOutPathLocalFS(outPath, writeMode, createDirectory); }
@Override public void initializeGlobal(int parallelism) throws IOException { this.parallelism = parallelism; // Prepare root output directory final FileSystem fs = rootOutputPath.getFileSystem(); if (fs.isDistributedFS()) { if (!fs.initOutPathDistFS(rootOutputPath, writeMode, true)) { throw new IOException("Failed to initialize output root directory: " + rootOutputPath); } } else { if (writeMode == FileSystem.WriteMode.OVERWRITE) { try { fs.delete(rootOutputPath, true); } catch (IOException e) { throw new IOException("Could not remove existing output root directory: " + rootOutputPath, e); } } if (!fs.initOutPathLocalFS(rootOutputPath, writeMode, true)) { throw new IOException("Failed to initialize output root directory: " + rootOutputPath); } } }
@Override public void initializeGlobal(int parallelism) throws IOException { this.parallelism = parallelism; // Prepare root output directory final FileSystem fs = rootOutputPath.getFileSystem(); if (fs.isDistributedFS()) { if (!fs.initOutPathDistFS(rootOutputPath, writeMode, true)) { throw new IOException("Failed to initialize output root directory: " + rootOutputPath); } } else { if (writeMode == FileSystem.WriteMode.OVERWRITE) { try { fs.delete(rootOutputPath, true); } catch (IOException e) { throw new IOException("Could not remove existing output root directory: " + rootOutputPath, e); } } if (!fs.initOutPathLocalFS(rootOutputPath, writeMode, true)) { throw new IOException("Failed to initialize output root directory: " + rootOutputPath); } } }
if(!fs.initOutPathLocalFS(p, writeMode, false)) { if(!fs.initOutPathLocalFS(p, writeMode, true)) {
if(!fs.initOutPathLocalFS(p, writeMode, false)) { if(!fs.initOutPathLocalFS(p, writeMode, true)) {