Configuration defaultConf = new Configuration();
Path tempFile = new Path("target/accumulo-test/import/sample.rf");
Path failures = new Path("target/accumulo-test/failures/");
FileSystem fs = FileSystem.get(new URI("file:///"), defaultConf);
fs.deleteOnExit(tempFile);
fs.deleteOnExit(failures);
fs.delete(failures, true);
fs.delete(tempFile, true);
fs.mkdirs(failures);
fs.mkdirs(tempFile.getParent());
FileSKVWriter writer = FileOperations.getInstance().openWriter(tempFile.toString(), fs, defaultConf, AccumuloConfiguration.getDefaultConfiguration());