@DELETE
  @Path("/trash/emptyTrash")
  @Produces(MediaType.APPLICATION_JSON)
  public Response emptyTrash() {
    try {
      HdfsApi api = getApi();
      api.emptyTrash();
      return Response.ok(new FileOperationResult(true)).build();
    } catch (WebApplicationException ex) {
      throw ex;
    } catch (Exception ex) {
      throw new ServiceFormattedException(ex.getMessage(), ex);
    }
  }
Empty trash
@return response with success
contrib/views/commons/src/main/java/org/apache/ambari/view/commons/hdfs/FileOperationService.java