Skip to content

Commit 7688f23

Browse files
abogutskiyrobot-piglet
authored andcommitted
deprecated_codecs options improvements
Waiting for pull-request [#616](ytsaurus/ytsaurus#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](ytsaurus/ytsaurus#616 (comment)) --- 2816c45b6457268a97dedad1968e6f22ba42df8c Pull Request resolved: ytsaurus/ytsaurus#629
1 parent f601548 commit 7688f23

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

yt/yt/core/compression/codec.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -413,15 +413,15 @@ ICodec* GetCodec(ECodec id)
413413

414414
////////////////////////////////////////////////////////////////////////////////
415415

416-
const THashSet<ECodec>& GetDeprecatedCodecIds()
416+
const THashSet<ECodec>& GetForbiddenCodecs()
417417
{
418-
static const THashSet<ECodec> deprecatedCodecIds{
418+
static const THashSet<ECodec> deprecatedCodecs{
419419
ECodec::QuickLz
420420
};
421-
return deprecatedCodecIds;
421+
return deprecatedCodecs;
422422
}
423423

424-
const THashMap<TString, TString>& GetDeprecatedCodecNameToAlias()
424+
const THashMap<TString, TString>& GetForbiddenCodecNameToAlias()
425425
{
426426
static const THashMap<TString, TString> deprecatedCodecNameToAlias = {
427427
{"zlib6", FormatEnum(ECodec::Zlib_6)},
@@ -436,19 +436,19 @@ const THashMap<TString, TString>& GetDeprecatedCodecNameToAlias()
436436
return deprecatedCodecNameToAlias;
437437
}
438438

439-
const std::vector<ECodec>& GetSupportedCodecIds()
439+
const std::vector<ECodec>& GetSupportedCodecs()
440440
{
441-
static const std::vector<ECodec> supportedCodecIds = [] {
442-
std::vector<ECodec> supportedCodecIds;
441+
static const std::vector<ECodec> supportedCodecs = [] {
442+
std::vector<ECodec> supportedCodecs;
443443
for (auto codecId : TEnumTraits<ECodec>::GetDomainValues()) {
444-
if (!GetDeprecatedCodecIds().contains(codecId)) {
445-
supportedCodecIds.push_back(codecId);
444+
if (!GetForbiddenCodecs().contains(codecId)) {
445+
supportedCodecs.push_back(codecId);
446446
}
447447
}
448-
SortUnique(supportedCodecIds);
449-
return supportedCodecIds;
448+
SortUnique(supportedCodecs);
449+
return supportedCodecs;
450450
}();
451-
return supportedCodecIds;
451+
return supportedCodecs;
452452
}
453453

454454
////////////////////////////////////////////////////////////////////////////////

yt/yt/core/compression/codec.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ struct ICodec
3333
ICodec* GetCodec(ECodec id);
3434

3535
//! Deprecated codecs information.
36-
const THashSet<ECodec>& GetDeprecatedCodecIds();
37-
const THashMap<TString, TString>& GetDeprecatedCodecNameToAlias();
38-
const std::vector<ECodec>& GetSupportedCodecIds();
36+
const THashSet<ECodec>& GetForbiddenCodecs();
37+
const THashMap<TString, TString>& GetForbiddenCodecNameToAlias();
38+
const std::vector<ECodec>& GetSupportedCodecs();
3939

4040
////////////////////////////////////////////////////////////////////////////////
4141

yt/yt/core/compression/unittests/codec_ut.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ INSTANTIATE_TEST_SUITE_P(
101101
All,
102102
TCodecTest,
103103
::testing::Combine(
104-
::testing::ValuesIn(GetSupportedCodecIds()),
104+
::testing::ValuesIn(GetSupportedCodecs()),
105105
::testing::ValuesIn(std::vector<ui64>({static_cast<ui64>(-1), 1, 1024}))),
106106
[] (const ::testing::TestParamInfo<std::tuple<ECodec, ui64>>& info) -> std::string {
107107
return

0 commit comments

Comments
 (0)