public void testCreateWriteDelete() throws Exception {
    for (int i = 0; i < TEST_DIR_NUM; ++i) {
      String path = "testDirectory" + i;
      fs.mkdirs(getTestPath(path));
      fs.delete(getTestPath(path), true);
    }
    assertEquals(TEST_DIR_NUM, metrics.numCreateDirOps.getCurrentIntervalValue());

    for (int i = 0; i < TEST_FILE_NUM; ++i) {
      String file = "/tmp" + i + ".txt";
      DFSTestUtil.createFile(fs, new Path(file), FILE_LEN, (short) 1, 1L);
      fs.delete(new Path(file), false);
    }
    assertEquals(TEST_FILE_NUM, metrics.writeOps.getCurrentIntervalValue());
    assertEquals(FILE_LEN * TEST_FILE_NUM, metrics.writeSize.getCurrentIntervalValue());
    assertEquals(TEST_FILE_NUM, metrics.numCreateFileOps.getCurrentIntervalValue());
  }