List of usage examples for org.apache.hadoop.fs Trash isEnabled
public boolean isEnabled()
From source file:org.apache.ambari.view.filebrowser.HdfsApi.java
License:Apache License
/** * Check is trash enabled/* w w w. ja va2 s.co m*/ * @return true if trash is enabled * @throws Exception */ public boolean trashEnabled() throws Exception { return ugi.doAs(new PrivilegedExceptionAction<Boolean>() { public Boolean run() throws IOException { Trash tr = new Trash(fs, conf); return tr.isEnabled(); } }); }
From source file:org.apache.ambari.view.utils.hdfs.HdfsApi.java
License:Apache License
/** * Check is trash enabled//from ww w . j ava 2 s . c o m * @return true if trash is enabled * @throws Exception */ public boolean trashEnabled() throws Exception { return execute(new PrivilegedExceptionAction<Boolean>() { public Boolean run() throws IOException { Trash tr = new Trash(fs, conf); return tr.isEnabled(); } }); }