defpersist(timestamp: TimeStamp, checkpoint: Array[Byte]): Unit
persists a pair of timestamp and checkpoint, which
persists a pair of timestamp and checkpoint, which
creates a temporary checkpoint file, checkpoints-$startTime.store, if not exist
2. writes out (timestamp, checkpoint) and marks rotation
3. rotates checkpoint file if needed
renames temporary checkpoint file to checkpoints-$startTime-$endTime.store
b. closes current writer and reset
c. rotation rotates
returns None if no store exists
2. searches checkpoint stores for
complete store checkpoints-$startTime-$endTime.store
where startTime <= timestamp <= endTime
b. temporary store checkpoints-$startTime.store
where startTime <= timestamp
3. renames store to checkpoints-$startTime-$endTime.store
4. deletes all stores whose name has a startTime larger than timestamp
5. looks for the checkpoint in the found store
stores timestamp-checkpoint mapping to Hadoop-compatible filesystem store file layout timestamp1, index1, timestamp2, index2, ... timestampN, indexN