|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.conf.Configured org.apache.hadoop.fs.Trash
@InterfaceAudience.Public @InterfaceStability.Stable public class Trash
Provides a trash facility which supports pluggable Trash policies. See the implementation of the configured TrashPolicy for more details.
Constructor Summary | |
---|---|
Trash(Configuration conf)
Construct a trash can accessor. |
|
Trash(FileSystem fs,
Configuration conf)
Construct a trash can accessor for the FileSystem provided. |
Method Summary | |
---|---|
void |
checkpoint()
Create a trash checkpoint. |
void |
expunge()
Delete old checkpoint(s). |
Runnable |
getEmptier()
Return a Runnable that periodically empties the trash of all
users, intended to be run by the superuser. |
boolean |
isEnabled()
Returns whether the trash is enabled for this filesystem |
static boolean |
moveToAppropriateTrash(FileSystem fs,
Path p,
Configuration conf)
In case of the symlinks or mount points, one has to move the appropriate trashbin in the actual volume of the path p being deleted. |
boolean |
moveToTrash(Path path)
Move a file or directory to the current trash directory. |
Methods inherited from class org.apache.hadoop.conf.Configured |
---|
getConf, setConf |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Trash(Configuration conf) throws IOException
conf
- a Configuration
IOException
public Trash(FileSystem fs, Configuration conf) throws IOException
fs
- the FileSystemconf
- a Configuration
IOException
Method Detail |
---|
public static boolean moveToAppropriateTrash(FileSystem fs, Path p, Configuration conf) throws IOException
fs
- - the filesystem of path pp
- - the path being deleted - to be moved to trasgconf
- - configuration
IOException
- on errorpublic boolean isEnabled()
public boolean moveToTrash(Path path) throws IOException
IOException
public void checkpoint() throws IOException
IOException
public void expunge() throws IOException
IOException
public Runnable getEmptier() throws IOException
Runnable
that periodically empties the trash of all
users, intended to be run by the superuser.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |