@Test public void testCreationCases() throws IOException { TrashTestBase trash; trash = new TrashTestBase(new Properties(), true, false, true); verify(trash.fs).createNewFile(new Path(trash.trash.getTrashLocation(), Trash.TRASH_IDENTIFIER_FILE)); try { trash = new TrashTestBase(new Properties(), true, false, false); Assert.fail(); } catch(IOException ioe) {} trash = new TrashTestBase(new Properties(), false, false, true); verify(trash.fs).mkdirs(trash.trash.getTrashLocation(), new FsPermission(FsAction.ALL, FsAction.NONE, FsAction.NONE)); verify(trash.fs).createNewFile(new Path(trash.trash.getTrashLocation(), Trash.TRASH_IDENTIFIER_FILE)); }
public Path getTrashLocation() throws IOException { return this.trashLocation; }
Trash implements GobblinTrash { public Path getTrashLocation() throws IOException { return this.trashLocation; } }
Trash implements GobblinTrash { public Path getTrashLocation() throws IOException { return this.trashLocation; } @Deprecated  Trash(FileSystem fs); @Deprecated  Trash(FileSystem fs, Properties props); protected  Trash(FileSystem fs, Properties props, String user); }
Trash implements GobblinTrash { public Path getTrashLocation() throws IOException { return this.trashLocation; } @Deprecated  Trash(FileSystem fs); @Deprecated  Trash(FileSystem fs, Properties props); protected  Trash(FileSystem fs, Properties props, String user); Path getTrashLocation(); @Override boolean moveToTrash(Path path); void createTrashSnapshot(); void purgeTrashSnapshots(); }
Trash implements GobblinTrash { public Path getTrashLocation() throws IOException { return this.trashLocation; } @Deprecated  Trash(FileSystem fs); @Deprecated  Trash(FileSystem fs, Properties props); protected  Trash(FileSystem fs, Properties props, String user); Path getTrashLocation(); @Override boolean moveToTrash(Path path); void createTrashSnapshot(); void purgeTrashSnapshots(); static final String TRASH_LOCATION_KEY; static final String SNAPSHOT_CLEANUP_POLICY_CLASS_KEY; static final String TRASH_SNAPSHOT_PREFIX; static final String TRASH_IDENTIFIER_FILE; static final String DEFAULT_TRASH_DIRECTORY; static final DateTimeFormatter TRASH_SNAPSHOT_NAME_FORMATTER; static final PathFilter TRASH_SNAPSHOT_PATH_FILTER; static final PathFilter TRASH_NOT_SNAPSHOT_PATH_FILTER; }