public boolean trashEnabled() throws Exception {
    return execute(new PrivilegedExceptionAction<Boolean>() {
      public Boolean run() throws IOException {
        Trash tr = new Trash(fs, conf);
        return tr.isEnabled();
      }
    });
  }
Check is trash enabled

@return true if trash is enabled
@throws Exception
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsApi.java