use of org.apache.distributedlog.tools.DistributedLogTool.TruncateCommand in project bookkeeper by apache.
the class TestDistributedLogTool method testToolTruncate.
@Test(timeout = 60000)
public void testToolTruncate() throws Exception {
DistributedLogManager dlm = DLMTestUtil.createNewDLM("TruncateStream", conf, defaultUri);
DLMTestUtil.generateCompletedLogSegments(dlm, conf, 3, 1000);
dlm.close();
TruncateCommand cmd = new TruncateCommand();
cmd.setUri(defaultUri);
cmd.setFilter("TruncateStream");
cmd.setForce(true);
assertEquals(0, cmd.runCmd());
}
Aggregations