Configuration newConf = new Configuration(conf);
RaidNode.createChecksumStore(newConf, true);
Path raidDir = new Path("/raidtest/1");
HashMap<Codec, Long[]> fileCRCs = new HashMap<Codec, Long[]>();
HashMap<Codec, Path> filePaths = new HashMap<Codec, Path>();
PolicyInfo info = new PolicyInfo();
info.setProperty("targetReplication", Integer.toString(targetReplication));
info.setProperty("metaReplication", Integer.toString(metaReplication));
try {
createTestFiles(raidDir, filePaths, fileCRCs, null);
LOG.info("Test testLargeFailureRateEncoding created test files");
// create the InjectionHandler
for (Codec codec: Codec.getCodecs()) {
Path filePath = filePaths.get(codec);
FileStatus stat = fileSys.getFileStatus(filePath);
info.setCodecId(codec.id);
boolean succeed = false;
TestEncodingHandler h = new TestEncodingHandler(0.5, null, false);
InjectionHandler.set(h);
succeed = runEncodingTasks(newConf, codec, stat, info, 100);
assertTrue("We should succeed", succeed);