public void writeCheckpointV2File(File storeDir, CheckpointV2 checkpoint) {
    File offsetFile = new File(storeDir, CHECKPOINT_FILE_NAME);
    byte[] fileContents = CHECKPOINT_V2_SERDE.toBytes(checkpoint);
    FileUtil fileUtil = new FileUtil();
    fileUtil.writeWithChecksum(offsetFile, new String(fileContents));
  }
Writes the checkpoint to the store checkpoint directory based on the checkpointId.

@param storeDir store or store checkpoint directory to write the checkpoint to
@param checkpoint checkpoint v2 containing the checkpoint Id
samza-core/src/main/java/org/apache/samza/storage/StorageManagerUtil.java