예제 #1
0
 public static long getMinRepairedAt(Set<SSTableReader> actuallyCompact) {
   long minRepairedAt = Long.MAX_VALUE;
   for (SSTableReader sstable : actuallyCompact)
     minRepairedAt = Math.min(minRepairedAt, sstable.getSSTableMetadata().repairedAt);
   if (minRepairedAt == Long.MAX_VALUE) return ActiveRepairService.UNREPAIRED_SSTABLE;
   return minRepairedAt;
 }
예제 #2
0
  public boolean shouldInclude(SSTableReader sstable) {
    List<ByteBuffer> minColumnNames = sstable.getSSTableMetadata().minColumnNames;
    List<ByteBuffer> maxColumnNames = sstable.getSSTableMetadata().maxColumnNames;
    CellNameType comparator = sstable.metadata.comparator;

    if (minColumnNames.isEmpty() || maxColumnNames.isEmpty()) return true;

    for (ColumnSlice slice : slices)
      if (slice.intersects(minColumnNames, maxColumnNames, comparator, reversed)) return true;

    return false;
  }