Skip to content

Commit

Permalink
YQ-3447 support ydb scheme ls for resource pools (#6956)
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigoriyPA committed Jul 23, 2024
1 parent 2e00aaa commit 60451f5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions ydb/core/tx/replication/controller/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ inline TMaybe<TReplication::ETargetKind> TryTargetKindFromEntryType(NYdb::NSchem
case NYdb::NScheme::ESchemeEntryType::ExternalTable:
case NYdb::NScheme::ESchemeEntryType::ExternalDataSource:
case NYdb::NScheme::ESchemeEntryType::View:
case NYdb::NScheme::ESchemeEntryType::ResourcePool:
return Nothing();
}
}
Expand Down
3 changes: 2 additions & 1 deletion ydb/mvp/core/core_ydb_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,8 @@ struct THandlerActorYdb {
{"CoordinationNode", "coordination"},
{"ColumnStore", "column-store"},
{"ExternalTable", "external-table"},
{"ExternalDataSource", "external-data-source"}
{"ExternalDataSource", "external-data-source"},
{"ResourcePool", "resource-pool"}
};
if (const auto* mapping = specialCases.FindPtr(schemeEntry)) {
return *mapping;
Expand Down
1 change: 1 addition & 0 deletions ydb/public/api/protos/ydb_scheme.proto
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ message Entry {
EXTERNAL_TABLE = 18;
EXTERNAL_DATA_SOURCE = 19;
VIEW = 20;
RESOURCE_POOL = 21;
}

// Name of scheme entry (dir2 of /dir1/dir2)
Expand Down
5 changes: 5 additions & 0 deletions ydb/public/lib/ydb_cli/common/print_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ void PrintSchemeEntry(IOutputStream& o, const NScheme::TSchemeEntry& entry, NCol
case NScheme::ESchemeEntryType::ExternalDataSource:
o << colors.LightWhite();
break;
case NScheme::ESchemeEntryType::ResourcePool:
o << colors.LightWhite();
break;
default:
o << colors.RedColor();
}
Expand Down Expand Up @@ -106,6 +109,8 @@ TString EntryTypeToString(NScheme::ESchemeEntryType entry) {
return "view";
case NScheme::ESchemeEntryType::Replication:
return "replication";
case NScheme::ESchemeEntryType::ResourcePool:
return "resource-pool";
case NScheme::ESchemeEntryType::Unknown:
case NScheme::ESchemeEntryType::Sequence:
return "unknown";
Expand Down
2 changes: 2 additions & 0 deletions ydb/public/sdk/cpp/client/ydb_scheme/scheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ static ESchemeEntryType ConvertProtoEntryType(::Ydb::Scheme::Entry::Type entry)
return ESchemeEntryType::ExternalDataSource;
case ::Ydb::Scheme::Entry::VIEW:
return ESchemeEntryType::View;
case ::Ydb::Scheme::Entry::RESOURCE_POOL:
return ESchemeEntryType::ResourcePool;
default:
return ESchemeEntryType::Unknown;
}
Expand Down
3 changes: 2 additions & 1 deletion ydb/public/sdk/cpp/client/ydb_scheme/scheme.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ enum class ESchemeEntryType : i32 {
Topic = 17,
ExternalTable = 18,
ExternalDataSource = 19,
View = 20
View = 20,
ResourcePool = 21
};

struct TVirtualTimestamp {
Expand Down

0 comments on commit 60451f5

Please sign in to comment.