Configuration conf = new Configuration();
URI uri = URI.create("ramfs://mapoutput" + "_tmp");
InMemoryFileSystem inMemFs = (InMemoryFileSystem)FileSystem.get(uri, conf);
Path testPath = new Path("/file_1");
inMemFs.reserveSpaceWithCheckSum(testPath, 1024);
FSDataOutputStream fout = inMemFs.create(testPath);
fout.write("testing".getBytes());
fout.close();
assertTrue("checksum exists", inMemFs.exists(inMemFs.getChecksumFile(testPath)));
inMemFs.delete(testPath, true);
assertTrue("checksum deleted", !inMemFs.exists(inMemFs.getChecksumFile(testPath)));