use of alluxio.master.journal.checkpoint.CheckpointOutputStream in project alluxio by Alluxio.
the class UfsJournalReaderTest method buildCheckpoint.
/**
* Builds checkpoint.
*
* @param sequenceNumber the sequence number after the checkpoint
* @return the checkpoint data
*/
private byte[] buildCheckpoint(long sequenceNumber) throws Exception {
byte[] bytes = CommonUtils.randomAlphaNumString(10).getBytes();
try (UfsJournalCheckpointWriter writer = UfsJournalCheckpointWriter.create(mJournal, sequenceNumber)) {
CheckpointOutputStream stream = new CheckpointOutputStream(writer, CheckpointType.JOURNAL_ENTRY);
stream.write(bytes);
}
return bytes;
}
Aggregations