-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Support broadcast segments #14789
Support broadcast segments #14789
Conversation
@@ -34,6 +34,7 @@ public class DruidK8sConstants | |||
public static final String TASK_JSON_ENV = "TASK_JSON"; | |||
public static final String TASK_DIR_ENV = "TASK_DIR"; | |||
public static final String TASK_ID_ENV = "TASK_ID"; | |||
public static final String LOAD_BROADCAST_SEGMENTS_ENV = "LOAD_BROADCAST_SEGMENTS"; |
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.
should this be loadBroadcastSegments
?
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.
this is a env variable so i think it should match the other env variables
@@ -224,7 +224,11 @@ private Collection<EnvVar> getEnv(Task task) | |||
.withValueFrom(new EnvVarSourceBuilder().withFieldRef(new ObjectFieldSelector( | |||
null, | |||
StringUtils.format("metadata.annotations['%s']", DruidK8sConstants.TASK) | |||
)).build()).build() | |||
)).build()).build(), | |||
new EnvVarBuilder() |
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.
My understanding is we what to do things similar to this
Is setting an env variable enough?
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.
this needs to be passed to the java druid internal peon command as a flag, and in the PodTemplateTaskAdapter, we don't actually control how the user configures that command.
But right now there's no way to even see whether the flag should be set, since we set the environment variable here, the user can read it and choose to set --loadBroadcastSegments
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.
LGTM
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.
+1 it would be good to document this new environment variable somewhere so operators know how to use it. It can be done as a separate change.
Since the pod template adapter does not generate the internal peon ... run command itself (the command is passed in the pod templates), we need a way to account for the optional --load-broadcast-segments flag in CliPeon for tasks that are queryable.
Description
Based on the task being launched, pass whether the task can handle queries as a environment variable to the job launched by the pod template adapter. The operator can then configure their k8s command in the pod template to include this env variable in the internal peon run command.
Release note
Allow the PodTemplateTaskAdapter to account for queryable tasks.
Key changed/added classes in this PR
This PR has: