public static void delete(FileSystem fs, String name) throws IOException {
    Path dir = new Path(name);
    Path data = new Path(dir, MapFile.DATA_FILE_NAME);
    Path index = new Path(dir, MapFile.INDEX_FILE_NAME);
    Path bloom = new Path(dir, BLOOM_FILE_NAME);

    fs.delete(data, true);
    fs.delete(index, true);
    fs.delete(bloom, true);
    fs.delete(dir, true);
  }
@Test
  public void testDeleteFile() {
    BloomMapFile.Writer writer = null;
    try {
      FileSystem fs = FileSystem.getLocal(conf);
      writer = new BloomMapFile.Writer(conf, TEST_FILE,
          MapFile.Writer.keyClass(IntWritable.class),
          MapFile.Writer.valueClass(Text.class));
      assertNotNull("testDeleteFile error !!!", writer);
      writer.close();
      BloomMapFile.delete(fs, TEST_FILE.toString());
    } catch (Exception ex) {
      fail("unexpect ex in testDeleteFile !!!");
    } finally {
      IOUtils.cleanupWithLogger(LOG, writer);
    }
  }