@Override public boolean deleteDir(FileSystem fs, Path f, boolean recursive, boolean ifPurge, Configuration conf) throws MetaException { try { if (FileUtils.moveToTrash(fs, f, conf, ifPurge)) { return true; } if (fs.exists(f)) { throw new MetaException("Unable to delete directory: " + f); } return true; } catch (FileNotFoundException e) { return true; // ok even if there is not data } catch (Exception e) { MetaStoreUtils.logAndThrowMetaException(e); } return false; } }