long bytes = 0;
for (K key : keys)
bytes += translateKey(key).remaining();
// an approximation -- the keyset can change while saving
estimatedTotalBytes = bytes;
CompactionType type;
if (cacheType.equals(ColumnFamilyStore.CacheType.KEY_CACHE_TYPE))
type = CompactionType.KEY_CACHE_SAVE;
else if (cacheType.equals(ColumnFamilyStore.CacheType.ROW_CACHE_TYPE))
type = CompactionType.ROW_CACHE_SAVE;