static const std::string kRawValueSize;
static const std::string kNumDataBlocks;
static const std::string kNumEntries;
+ static const std::string kDeletedKeys;
+ static const std::string kMergeOperands;
static const std::string kNumRangeDeletions;
static const std::string kFormatVersion;
static const std::string kFixedKeyLen;
static const std::string kPrefixExtractorName;
static const std::string kPropertyCollectors;
static const std::string kCompression;
+ static const std::string kCompressionOptions;
static const std::string kCreationTime;
static const std::string kOldestKeyTime;
};
return Add(key, value);
}
+ // Called after each new block is cut
+ virtual void BlockAdd(uint64_t /* blockRawBytes */,
+ uint64_t /* blockCompressedBytesFast */,
+ uint64_t /* blockCompressedBytesSlow */) {
+ // Nothing to do here. Callback registers can override.
+ return;
+ }
+
// Finish() will be called when a table has already been built and is ready
// for writing the properties block.
// @params properties User will add their collected statistics to
uint64_t num_data_blocks = 0;
// the number of entries in this table
uint64_t num_entries = 0;
+ // the number of deletions in the table
+ uint64_t num_deletions = 0;
+ // the number of merge operands in the table
+ uint64_t num_merge_operands = 0;
// the number of range deletions in this table
uint64_t num_range_deletions = 0;
// format version, reserved for backward compatibility
// The compression algo used to compress the SST files.
std::string compression_name;
+ // Compression options used to compress the SST files.
+ std::string compression_options;
+
// user collected properties
UserCollectedProperties user_collected_properties;
UserCollectedProperties readable_properties;
// Below is a list of non-basic properties that are collected by database
// itself. Especially some properties regarding to the internal keys (which
// is unknown to `table`).
+//
+// DEPRECATED: these properties now belong as TableProperties members. Please
+// use TableProperties::num_deletions and TableProperties::num_merge_operands,
+// respectively.
extern uint64_t GetDeletedKeys(const UserCollectedProperties& props);
extern uint64_t GetMergeOperands(const UserCollectedProperties& props,
bool* property_present);