-
Notifications
You must be signed in to change notification settings - Fork 1k
[Issue-2299] Support the yarn queue label quick-setting for yarn application mode. #2317
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
Conversation
good job, Thanks for your contribution, I will review it later |
Thank you @wolfboys . ping me if anything you need to communicate about . |
Hi, @wolfboys I added the note hints to the corresponding input, PTAL. |
/** Util class for parsing and checking Yarn queue & Label */ | ||
public class YarnQueueLabelExpression { | ||
|
||
public static final String AT = "@"; |
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.
private is better.
|
||
public static final String AT = "@"; | ||
|
||
public static final String REGEX = "[a-zA-Z0-9_\\-]+"; |
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.
private...
* @param executionMode execution mode. | ||
* @param queueLabel queueLabel expression. | ||
*/ | ||
public static void checkQueueLabelIfNeed(int executionMode, String queueLabel) { |
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.
how about?
public static void checkQueueLabelIfNeed(int executionMode, String queueLabel) {
if (ExecutionMode.isYarnMode(executionMode)) {
if (!YarnQueueLabelExpression.isValid(queueLabel, true)) {
throw new IllegalArgumentException(ERR_HINTS);
}
}
}
* @param queueLabelExp queue and label expression | ||
* @param map the target properties. | ||
*/ | ||
public static <V> void addQueueLabelExprInto(String queueLabelExp, @Nonnull Map<String, V> map) { |
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.
Pass in a Map for filling. Not a good way, how about ?
public static Map<String, String> getQueueLabelMap(String queueLabelExp) {
if (StringUtils.isEmpty(queueLabelExp)) {
return Collections.emptyMap();
}
YarnQueueLabelExpression yarnQueueLabelExpression = of(queueLabelExp);
Map<String, String> map = new HashMap<>(2);
yarnQueueLabelExpression
.getLabelExpression()
.ifPresent(labelExp -> map.put(ConfigConst.KEY_YARN_APP_NODE_LABEL(), labelExp));
map.put(ConfigConst.KEY_YARN_APP_QUEUE(), yarnQueueLabelExpression.queue);
return map;
}
Also I don't know if both "KEY_YARN_APP_NODE_LABEL" and "KEY_YARN_APP_QUEUE" need to put
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.
If the label or queue exists, the corresponding value would be put.
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.
If the label or queue exists, the corresponding value would be put.
get it
@@ -598,9 +598,7 @@ public void updateHotParams(Application appParam) { | |||
ExecutionMode executionModeEnum = appParam.getExecutionModeEnum(); | |||
Map<String, String> hotParams = new HashMap<>(0); | |||
if (ExecutionMode.YARN_APPLICATION.equals(executionModeEnum)) { |
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.
ExecutionMode.YARN_APPLICATION.equals(executionModeEnum)
need to be changed to:
ExecutionMode.isYarnMode(executionModeEnum)
This is a historical bug
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.
oh, yarn-session execmode does not need to be set yarn queue, yarn-perjob is deprecated, but there should be many users who use, so. yarn-application and yarn-perjob need to be set yarn-queue
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.
yarn-application and yarn-perjob need to be set yarn-queue
that's okay.
...ampark-console/streampark-console-webapp/src/views/flink/app/hooks/useCreateAndEditSchema.ts
Outdated
Show resolved
Hide resolved
...ce/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
Show resolved
Hide resolved
...ce/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
Show resolved
Hide resolved
...ce/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
Outdated
Show resolved
Hide resolved
...ce/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
Outdated
Show resolved
Hide resolved
} | ||
} | ||
} | ||
fillBackYarnQueue(application); |
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.
method name : fillBackYarnQueue
, how about change to setYarnQueue
?
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, thanks for your contribution
…ication mode. (apache#2317) * [Issue-2299] Introduce YarnQueueLabelExpression util class * [Issue-2299] Adapt the FE pages input placeholders * [Issue-2299] Adjust the backend logic to process label quick-setting * [Issue-2299] Support yarn session cluster queue label quick-setting
What changes were proposed in this pull request
Issue Number: close #2299
Brief change log
Support the yarn queue label quick-setting for yarn application mode.
Verifying this change
Does this pull request potentially affect one of the following parts