lenoxzhao commented on code in PR #3952:
URL:
https://github.com/apache/incubator-streampark/pull/3952#discussion_r1713619379
##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/SparkApplication.java:
##########
@@ -251,37 +222,50 @@ public class SparkApplication extends BaseEntity {
private transient AppControl appControl;
- public void setDefaultModeIngress(String defaultModeIngress) {
- this.defaultModeIngress = defaultModeIngress;
- }
-
public void setK8sNamespace(String k8sNamespace) {
this.k8sNamespace = StringUtils.isBlank(k8sNamespace) ?
Constant.DEFAULT : k8sNamespace;
}
- public K8sPodTemplates getK8sPodTemplates() {
- return K8sPodTemplates.of(k8sPodTemplate, k8sJmPodTemplate,
k8sTmPodTemplate);
- }
-
public void setState(Integer state) {
this.state = state;
this.tracking = shouldTracking() ? 1 : 0;
}
- public void setYarnQueueByHotParams() {
+ public void resolveYarnQueue() {
if (!(SparkExecutionMode.YARN_CLIENT == this.getSparkExecutionMode()
|| SparkExecutionMode.YARN_CLUSTER ==
this.getSparkExecutionMode())) {
return;
}
+ if (StringUtils.isBlank(this.yarnQueue)) {
+ this.yarnQueue = "default";
+ }
+ Map<String, String> queueLabelMap =
YarnQueueLabelExpression.getQueueLabelMap(this.yarnQueue);
+
this.setYarnQueueName(queueLabelMap.getOrDefault(ConfigKeys.KEY_YARN_APP_QUEUE(),
"default"));
+
this.setYarnQueueLabel(queueLabelMap.getOrDefault(ConfigKeys.KEY_YARN_APP_NODE_LABEL(),
null));
Review Comment:
According to this
[document](https://streampark.apache.org/docs/platform/yarn-queue), `yarnQueue`
would be passed in format like `queue@label1,label2`.
`YarnQueueLabelExpression` can parse queue name and queue label from
`yarnQueue`. So `yarnQueueName` is used to represtented "queue" and
`yarnQueueLabel` is used to represent "label1, label2".
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]