@Test public void testUserReplacement() throws IOException { Properties properties = new Properties(); properties.setProperty(Trash.TRASH_LOCATION_KEY, "/trash/$USER/dir"); Path expectedTrashPath = new Path("/trash/" + UserGroupInformation.getCurrentUser().getUserName() + "/dir"); TrashTestBase trash = new TrashTestBase(properties); Assert.assertTrue(trash.trash.getTrashLocation().equals(expectedTrashPath)); }
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; }