use of org.corfudb.infrastructure.log.StreamLogFiles in project CorfuDB by CorfuDB.
the class logReaderTest method setUp.
@Before
public void setUp() {
File fDir = new File(LOG_PATH);
fDir.mkdirs();
StreamLogFiles logfile = new StreamLogFiles(getContext(), false);
ByteBuf buf = ByteBufAllocator.DEFAULT.buffer();
Serializers.CORFU.serialize("Hello World".getBytes(), buf);
LogData data = new LogData(DataType.DATA, buf);
logfile.append(0, data);
buf.clear();
Serializers.CORFU.serialize("Happy Days".getBytes(), buf);
data = new LogData(DataType.DATA, buf);
logfile.append(1, data);
buf.clear();
Serializers.CORFU.serialize("Corfu test".getBytes(), buf);
data = new LogData(DataType.DATA, buf);
logfile.append(2, data);
logfile.close();
}
Aggregations