Fix build under LITE (#6758)

Summary:
GetSupportedCompressions needs to be defined under LITE.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6758

Test Plan: build under LITE

Reviewed By: zhichao-cao

Differential Revision: D21247937

Pulled By: cheng-chang

fbshipit-source-id: 880e59d3e107cdd736d16427a68c5641d1318fb4
main
Cheng Chang 5 years ago committed by Facebook GitHub Bot
parent bea91d5d61
commit 4cd859edf1
  1. 23
      options/options_helper.cc

@ -258,6 +258,18 @@ std::unordered_map<std::string, CompressionType>
{"kZSTD", kZSTD}, {"kZSTD", kZSTD},
{"kZSTDNotFinalCompression", kZSTDNotFinalCompression}, {"kZSTDNotFinalCompression", kZSTDNotFinalCompression},
{"kDisableCompressionOption", kDisableCompressionOption}}; {"kDisableCompressionOption", kDisableCompressionOption}};
std::vector<CompressionType> GetSupportedCompressions() {
std::vector<CompressionType> supported_compressions;
for (const auto& comp_to_name : OptionsHelper::compression_type_string_map) {
CompressionType t = comp_to_name.second;
if (t != kDisableCompressionOption && CompressionTypeSupported(t)) {
supported_compressions.push_back(t);
}
}
return supported_compressions;
}
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
const std::string kNameEnv = "env"; const std::string kNameEnv = "env";
@ -1084,17 +1096,6 @@ Status GetStringFromCompressionType(std::string* compression_str,
} }
} }
std::vector<CompressionType> GetSupportedCompressions() {
std::vector<CompressionType> supported_compressions;
for (const auto& comp_to_name : compression_type_string_map) {
CompressionType t = comp_to_name.second;
if (t != kDisableCompressionOption && CompressionTypeSupported(t)) {
supported_compressions.push_back(t);
}
}
return supported_compressions;
}
static Status ParseDBOption(const ConfigOptions& config_options, static Status ParseDBOption(const ConfigOptions& config_options,
const std::string& name, const std::string& name,
const std::string& org_value, const std::string& org_value,

Loading…
Cancel
Save