aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorabogutksiy <bogutskiy.alexandr@gmail.com>2024-06-25 00:09:54 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-06-25 00:20:32 +0300
commit7688f2313619a39a60ef3c2734d8efbc49a0a6db (patch)
treec93b1372d1411a56f487859070dd27b0b6f8a2e1
parentf601548e41807e73b16c108b12f905ab53d12e81 (diff)
downloadydb-7688f2313619a39a60ef3c2734d8efbc49a0a6db.tar.gz
deprecated_codecs options improvements
Waiting for pull-request [#616](https://github.com/ytsaurus/ytsaurus/pull/616) to be merged. Then I'll rebase and resolve the conflicts, then this pr will be ready for merge Discussion led to this pr: [link](https://github.com/ytsaurus/ytsaurus/pull/616#discussion_r1616997490) --- 2816c45b6457268a97dedad1968e6f22ba42df8c Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/629
-rw-r--r--yt/yt/core/compression/codec.cpp24
-rw-r--r--yt/yt/core/compression/codec.h6
-rw-r--r--yt/yt/core/compression/unittests/codec_ut.cpp2
3 files changed, 16 insertions, 16 deletions
diff --git a/yt/yt/core/compression/codec.cpp b/yt/yt/core/compression/codec.cpp
index 3edaae9de3..206938ec2d 100644
--- a/yt/yt/core/compression/codec.cpp
+++ b/yt/yt/core/compression/codec.cpp
@@ -413,15 +413,15 @@ ICodec* GetCodec(ECodec id)
////////////////////////////////////////////////////////////////////////////////
-const THashSet<ECodec>& GetDeprecatedCodecIds()
+const THashSet<ECodec>& GetForbiddenCodecs()
{
- static const THashSet<ECodec> deprecatedCodecIds{
+ static const THashSet<ECodec> deprecatedCodecs{
ECodec::QuickLz
};
- return deprecatedCodecIds;
+ return deprecatedCodecs;
}
-const THashMap<TString, TString>& GetDeprecatedCodecNameToAlias()
+const THashMap<TString, TString>& GetForbiddenCodecNameToAlias()
{
static const THashMap<TString, TString> deprecatedCodecNameToAlias = {
{"zlib6", FormatEnum(ECodec::Zlib_6)},
@@ -436,19 +436,19 @@ const THashMap<TString, TString>& GetDeprecatedCodecNameToAlias()
return deprecatedCodecNameToAlias;
}
-const std::vector<ECodec>& GetSupportedCodecIds()
+const std::vector<ECodec>& GetSupportedCodecs()
{
- static const std::vector<ECodec> supportedCodecIds = [] {
- std::vector<ECodec> supportedCodecIds;
+ static const std::vector<ECodec> supportedCodecs = [] {
+ std::vector<ECodec> supportedCodecs;
for (auto codecId : TEnumTraits<ECodec>::GetDomainValues()) {
- if (!GetDeprecatedCodecIds().contains(codecId)) {
- supportedCodecIds.push_back(codecId);
+ if (!GetForbiddenCodecs().contains(codecId)) {
+ supportedCodecs.push_back(codecId);
}
}
- SortUnique(supportedCodecIds);
- return supportedCodecIds;
+ SortUnique(supportedCodecs);
+ return supportedCodecs;
}();
- return supportedCodecIds;
+ return supportedCodecs;
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/compression/codec.h b/yt/yt/core/compression/codec.h
index ec102e6a55..97d62d100d 100644
--- a/yt/yt/core/compression/codec.h
+++ b/yt/yt/core/compression/codec.h
@@ -33,9 +33,9 @@ struct ICodec
ICodec* GetCodec(ECodec id);
//! Deprecated codecs information.
-const THashSet<ECodec>& GetDeprecatedCodecIds();
-const THashMap<TString, TString>& GetDeprecatedCodecNameToAlias();
-const std::vector<ECodec>& GetSupportedCodecIds();
+const THashSet<ECodec>& GetForbiddenCodecs();
+const THashMap<TString, TString>& GetForbiddenCodecNameToAlias();
+const std::vector<ECodec>& GetSupportedCodecs();
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/compression/unittests/codec_ut.cpp b/yt/yt/core/compression/unittests/codec_ut.cpp
index 43923cca71..87cfa8b6ae 100644
--- a/yt/yt/core/compression/unittests/codec_ut.cpp
+++ b/yt/yt/core/compression/unittests/codec_ut.cpp
@@ -101,7 +101,7 @@ INSTANTIATE_TEST_SUITE_P(
All,
TCodecTest,
::testing::Combine(
- ::testing::ValuesIn(GetSupportedCodecIds()),
+ ::testing::ValuesIn(GetSupportedCodecs()),
::testing::ValuesIn(std::vector<ui64>({static_cast<ui64>(-1), 1, 1024}))),
[] (const ::testing::TestParamInfo<std::tuple<ECodec, ui64>>& info) -> std::string {
return