Log { private void roll(int index) throws IOException { roll(index, null); } Log(long checkpointInterval, long maxFileSize, int queueSize,
      File checkpointDir, File... logDirs);  static final String PREFIX; }
@Test public void testRoll() throws IOException, InterruptedException { log.shutdownWorker(); for (int i = 0; i < 1000; i++) { FlumeEvent eventIn = TestUtils.newPersistableEvent(); long transactionID = ++this.transactionID; FlumeEventPointer eventPointer = log.put(transactionID, eventIn); FlumeEvent eventOut = log.get(eventPointer); Assert.assertNotNull(eventOut); Assert.assertEquals(eventIn.getHeaders(), eventOut.getHeaders()); Assert.assertArrayEquals(eventIn.getBody(), eventOut.getBody()); } int logCount = 0; for(File dataDir : dataDirs) { for(File logFile : dataDir.listFiles()) { if(logFile.getName().startsWith("log-")) { logCount++; } } } Assert.assertEquals(78, logCount); }