Beispiel #1
0
 // Marks a partition complete, called when replaying journals
 private void completePartitionFromEntry(CompletePartitionEntry entry)
     throws FileDoesNotExistException {
   PartitionInfo info =
       new PartitionInfo(
           entry.getKeyStartBytes().asReadOnlyByteBuffer(),
           entry.getKeyLimitBytes().asReadOnlyByteBuffer(),
           entry.getBlockId());
   completePartitionInternal(entry.getStoreId(), info);
 }
Beispiel #2
0
 private JournalEntry newCompletePartitionEntry(long fileId, PartitionInfo info) {
   CompletePartitionEntry completePartition =
       CompletePartitionEntry.newBuilder()
           .setStoreId(fileId)
           .setBlockId(info.blockId)
           .setKeyStartBytes(ByteString.copyFrom(info.keyStart))
           .setKeyLimitBytes(ByteString.copyFrom(info.keyLimit))
           .build();
   return JournalEntry.newBuilder().setCompletePartition(completePartition).build();
 }