LOG.debug("purge is set to true. Not moving to Trash " + f); } else { result = Trash.moveToAppropriateTrash(fs, f, conf); if (result) { LOG.trace("Moved to trash: " + f);
private boolean moveToTrash(PathData item) throws IOException { boolean success = false; if (!skipTrash) { try { success = Trash.moveToAppropriateTrash(item.fs, item.path, getConf()); } catch(FileNotFoundException fnfe) { throw fnfe; } catch (IOException ioe) { String msg = ioe.getMessage(); if (ioe.getCause() != null) { msg += ": " + ioe.getCause().getMessage(); } throw new IOException(msg + ". Consider using -skipTrash option", ioe); } } return success; } }
LOG.debug("purge is set to true. Not moving to Trash " + f); } else { result = Trash.moveToAppropriateTrash(fs, f, conf); if (result) { LOG.trace("Moved to trash: " + f);
try { if (fs.getXAttrs(file.getPath()).containsKey(REMAIN_IN_TRASH_TAG)) { boolean succ = Trash.moveToAppropriateTrash(fs, file.getPath(), conf); if (succ) { LOG.debug("Move " + file.toString() + " to trash");
@Override public boolean moveToAppropriateTrash(FileSystem fs, Path path, Configuration conf) throws IOException { return Trash.moveToAppropriateTrash(fs, path, conf); }
@Override public boolean moveToAppropriateTrash(FileSystem fs, Path path, Configuration conf) throws IOException { return Trash.moveToAppropriateTrash(fs, path, conf); }
@Override public boolean moveToAppropriateTrash(FileSystem fs, Path path, Configuration conf) throws IOException { return Trash.moveToAppropriateTrash(fs, path, conf); }
private boolean moveToTrash(PathData item) throws IOException { boolean success = false; if (!skipTrash) { try { success = Trash.moveToAppropriateTrash(item.fs, item.path, getConf()); } catch(FileNotFoundException fnfe) { throw fnfe; } catch (IOException ioe) { String msg = ioe.getMessage(); if (ioe.getCause() != null) { msg += ": " + ioe.getCause().getMessage(); } throw new IOException(msg + ". Consider using -skipTrash option", ioe); } } return success; } }
private boolean moveToTrash(PathData item) throws IOException { boolean success = false; if (!skipTrash) { try { success = Trash.moveToAppropriateTrash(item.fs, item.path, getConf()); } catch(FileNotFoundException fnfe) { throw fnfe; } catch (IOException ioe) { String msg = ioe.getMessage(); if (ioe.getCause() != null) { msg += ": " + ioe.getCause().getMessage(); } throw new IOException(msg + ". Consider using -skipTrash option", ioe); } } return success; } }
private boolean moveToTrash(PathData item) throws IOException { boolean success = false; if (!skipTrash) { try { success = Trash.moveToAppropriateTrash(item.fs, item.path, getConf()); } catch(FileNotFoundException fnfe) { throw fnfe; } catch (IOException ioe) { String msg = ioe.getMessage(); if (ioe.getCause() != null) { msg += ": " + ioe.getCause().getMessage(); } throw new IOException(msg + ". Consider using -skipTrash option", ioe); } } return success; } }
private boolean moveToTrash(PathData item) throws IOException { boolean success = false; if (!skipTrash) { try { success = Trash.moveToAppropriateTrash(item.fs, item.path, getConf()); } catch(FileNotFoundException fnfe) { throw fnfe; } catch (IOException ioe) { String msg = ioe.getMessage(); if (ioe.getCause() != null) { msg += ": " + ioe.getCause().getMessage(); } throw new IOException(msg + ". Consider using -skipTrash option", ioe); } } return success; } }
LOG.debug("purge is set to true. Not moving to Trash " + f); } else { result = Trash.moveToAppropriateTrash(fs, f, conf); if (result) { LOG.trace("Moved to trash: " + f);
public static boolean moveToTrash(FileSystem fs, Path path) throws IOException { boolean move = Trash.moveToAppropriateTrash(fs, path, CascadingUtil.get().getJobConf()); if (!move) { throw new RuntimeException("Trash disabled or path already in trash: " + path); } return true; }
deleted = useTrash ? Trash.moveToAppropriateTrash(fs, path, fs.getConf()) : fs.delete(path, true /* include any files */); } else { deleted = useTrash ? Trash.moveToAppropriateTrash(fs, absolute, fs.getConf()) : fs.delete(absolute, true /* include any files */);
if (rootFileSystem.exists(metadataDirectory)) { if(useTrash){ if (Trash.moveToAppropriateTrash(rootFileSystem, metadataDirectory, conf)) { return true; } else {
if (dataFS.exists(dataLocation)) { changed = (useTrash ? Trash.moveToAppropriateTrash(dataFS, dataLocation, dataFS.getConf()) : dataFS.delete(dataLocation, true));