// @Ignore @Test public void testMultiRollingFileFailedWriteOverwriteCache1() { prepareTest(); EvenOddHDFSExactlyOnceWriter writer = new EvenOddHDFSExactlyOnceWriter(); writer.setAppend(false); writer.setMaxOpenFiles(1); testMultiRollingFileFailedWriteOverwriteHelperCache1(writer, ProcessingMode.EXACTLY_ONCE); // Even file String evenFileName = testMeta.getDir() + File.separator + EVEN_FILE; String correctContents = "0\n" + "4\n" + "6\n"; checkOutput(0, evenFileName, correctContents); correctContents = "8\n" + "6\n"; checkOutput(1, evenFileName, correctContents); // Odd file String oddFileName = testMeta.getDir() + File.separator + ODD_FILE; correctContents = "1\n" + "5\n" + "7\n"; checkOutput(0, oddFileName, correctContents); correctContents = "9\n" + "7\n"; checkOutput(1, oddFileName, correctContents); }
// @Ignore @Test public void testMultiRollingFileFailedWriteOverwrite() { prepareTest(); EvenOddHDFSExactlyOnceWriter writer = new EvenOddHDFSExactlyOnceWriter(); writer.setAppend(false); testMultiRollingFileFailedWriteOverwriteHelper(writer, ProcessingMode.EXACTLY_ONCE); }
// @Ignore @Test public void testMultiRollingFileFailedWriteCache1() { prepareTest(); EvenOddHDFSExactlyOnceWriter writer = new EvenOddHDFSExactlyOnceWriter(); writer.setAppend(true); writer.setMaxOpenFiles(1); testMultiRollingFileFailedWriteHelperHelper(writer, ProcessingMode.EXACTLY_ONCE); }
// @Ignore @Test public void testMultiFileFailedWriteOverwrite() { prepareTest(); EvenOddHDFSExactlyOnceWriter writer = new EvenOddHDFSExactlyOnceWriter(); writer.setAppend(false); testMultiFileFailedWriteHelper(writer, ProcessingMode.EXACTLY_ONCE); String evenFileName = testMeta.getDir() + File.separator + EVEN_FILE; String correctContents = "0\n" + "2\n" + "6\n" + "8\n"; checkOutput(-1, evenFileName, correctContents); String oddFileName = testMeta.getDir() + File.separator + ODD_FILE; correctContents = "1\n" + "3\n" + "7\n" + "9\n"; checkOutput(-1, oddFileName, correctContents); }
// @Ignore @Test public void testMultiFileCompletedWriteInitial() { prepareTest(); populateFile(EVEN_FILE, "0\n" + "2\n"); populateFile(ODD_FILE, "1\n" + "3\n"); EvenOddHDFSExactlyOnceWriter writer = new EvenOddHDFSExactlyOnceWriter(); writer.setAppend(true); testMultiFileCompletedWriteHelper(writer, ProcessingMode.EXACTLY_ONCE); String evenFileName = testMeta.getDir() + File.separator + EVEN_FILE; String correctContents = "0\n" + "2\n" + "0\n" + "2\n" + "4\n" + "6\n"; checkOutput(-1, evenFileName, correctContents); String oddFileName = testMeta.getDir() + File.separator + ODD_FILE; correctContents = "1\n" + "3\n" + "1\n" + "3\n" + "5\n" + "7\n"; checkOutput(-1, oddFileName, correctContents); }