-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[native] Enable node pool type specification when reporting to the coordinator from a C++ worker #24569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[native] Enable node pool type specification when reporting to the coordinator from a C++ worker #24569
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -240,6 +240,7 @@ SystemConfig::SystemConfig() { | |
| BOOL_PROP(kEnableRuntimeMetricsCollection, false), | ||
| BOOL_PROP(kPlanValidatorFailOnNestedLoopJoin, false), | ||
| STR_PROP(kPrestoDefaultNamespacePrefix, "presto.default"), | ||
| STR_PROP(kPoolType, "DEFAULT"), | ||
| }; | ||
| } | ||
|
|
||
|
|
@@ -290,6 +291,17 @@ std::string SystemConfig::prestoVersion() const { | |
| return requiredProperty(std::string(kPrestoVersion)); | ||
| } | ||
|
|
||
| std::string SystemConfig::poolType() const { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wanted to confirm that this is not a registered property... Else it has to be a part of registeredProps_. If you add it to registeredProps_ it might be simpler to initialize the default value as well.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the difference between registeredProps_ and configs?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Registered properties are validated on server startup https://github.com/prestodb/presto/blob/master/presto-native-execution/presto_cpp/main/common/Configs.cpp#L110 Might be better to add it to avoid warnings. |
||
| static const std::unordered_set<std::string> kPoolTypes = {"LEAF", "INTERMEDIATE", "DEFAULT"}; | ||
| static constexpr std::string_view kPoolTypeDefault = "DEFAULT"; | ||
| auto value = optionalProperty<std::string>(kPoolType).value_or(std::string(kPoolTypeDefault)); | ||
| VELOX_USER_CHECK( | ||
| kPoolTypes.count(value), | ||
| "{} must be one of 'LEAF', 'INTERMEDIATE', or 'DEFAULT'", | ||
| kPoolType); | ||
| return value; | ||
| } | ||
|
|
||
| bool SystemConfig::mutableConfig() const { | ||
| return optionalProperty<bool>(kMutableConfig).value(); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the possible values for pool Type ? Might be good to validate the value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The accepted values are here Sure I can add that