[
https://issues.apache.org/jira/browse/KNOX-3474?focusedWorklogId=1043131&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1043131
]
ASF GitHub Bot logged work on KNOX-3474:
----------------------------------------
Author: ASF GitHub Bot
Created on: 21/Sep/26 08:56
Start Date: 21/Sep/26 08:56
Worklog Time Spent: 10m
Work Description: roczei commented on code in PR #1413:
URL: https://github.com/apache/knox/pull/1413#discussion_r4060574551
##########
gateway-discovery-cm/src/test/java/org/apache/knox/gateway/topology/discovery/cm/model/spark/Spark4HistoryUIServiceModelGeneratorTest.java:
##########
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
under
+ * the License.
+ */
+package org.apache.knox.gateway.topology.discovery.cm.model.spark;
+
+import org.apache.knox.gateway.topology.discovery.cm.ServiceModelGenerator;
+import
org.apache.knox.gateway.topology.discovery.cm.model.AbstractServiceModelGeneratorTest;
+import org.junit.Test;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+public class Spark4HistoryUIServiceModelGeneratorTest extends
AbstractServiceModelGeneratorTest {
+
+ @Test
+ public void testServiceModelMetadata() {
+ final Map<String, String> serviceConfig = Collections.emptyMap();
+ final Map<String, String> roleConfig = new HashMap<>();
+ roleConfig.put(Spark4HistoryUIServiceModelGenerator.SSL_ENABLED, "false");
+ roleConfig.put(Spark4HistoryUIServiceModelGenerator.HISTORY_SERVER_PORT,
"18089");
+ roleConfig.put(Spark4HistoryUIServiceModelGenerator.SSL_SERVER_PORT,
"18489");
Review Comment:
It's a similar situation for port 18489, could you change that to 18490 as
well?
Issue Time Tracking
-------------------
Worklog Id: (was: 1043131)
Time Spent: 1h 20m (was: 1h 10m)
> Add Knox service definition for Spark 4 History Server UI (spark4historyui)
> ---------------------------------------------------------------------------
>
> Key: KNOX-3474
> URL: https://issues.apache.org/jira/browse/KNOX-3474
> Project: Apache Knox
> Issue Type: Task
> Reporter: Arun Kumar M
> Priority: Major
> Attachments: image-2026-09-18-01-10-32-387.png,
> image-2026-09-18-01-10-40-022.png, image-2026-09-21-12-45-18-833.png
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> *Summary*
> Add upstream Knox support for the Spark 4 History Server Web UI (role:
> SPARK4HISTORYUI).
>
> *Motivation*
> Knox already supports spark3historyui (SPARK3HISTORYUI). Spark 4 deployments
> need an equivalent service definition so the History Server UI is reachable
> through Knox and linked correctly from YARN ResourceManager UI.
>
> *Implementation*
> Base on existing spark3historyui/3.0.0/ pattern:
>
> | Item | Value |
> |------|-------|
> | Service role | SPARK4HISTORYUI |
> | Service name / URL path | spark4history |
> | Metadata type | UI |
> | shortDesc | Spark 4 History Server Web UI |
> | CM discovery | Spark4HistoryUIServiceModelGenerator (extend
> SparkHistoryUIServiceModelGenerator) |
> | CM service type | SPARK4_ON_YARN (align with CM Spark 4 service type) |
> | CM role type | SPARK4_YARN_HISTORY_SERVER (align with CM Spark 4 role type)
> |
>
> *Scope*
> *1. Service definition*
> - gateway-service-definitions/services/spark4historyui/3.0.0/service.xml
> - gateway-service-definitions/services/spark4historyui/3.0.0/rewrite.xml
> - Inbound/outbound rewrite rules for /spark4history/, /history/, jobs pages,
> SSO header filters
>
> *2. Cloudera Manager discovery*
> - Spark4HistoryUIServiceModelGenerator.java + unit tests
> - META-INF/services ServiceModelGenerator registration
> - ClouderaManagerServiceDiscoveryTest (HTTP and SSL port variants)
>
> *3. YARN UI cross-links (required for RM → Spark 4 History navigation)*
> - gateway-service-definitions/services/yarnui/2.7.0/rewrite.xml
> - Add spark4history redirect rule parallel to existing spark3history rule
> - Pattern: *://*:*/history/\{**}?spark4=true?\{**} →
> \{$frontend[url]}/spark4history/history/\{**}?\{**}
> - gateway-service-definitions/services/yarnuiv2/3.0.0/rewrite.xml
> - Same spark4history rule as above
>
> *4. Admin / configuration*
> - gateway-admin-ui: add SPARK4HISTORYUI to service role list
> - Homepage icon for Spark 4 History Server (if icon metadata support is
> included)
>
> *Out of scope*
> - Spark History Server SPNEGO / authentication configuration
> - Spark 4 parcel installation issues
>
> *Acceptance criteria*
> - /spark4history/** routes to Spark 4 History Server backend through Knox
> - CM discovery resolves SPARK4HISTORYUI URLs (HTTP and HTTPS)
> - YARN RM UI links with ?spark4=true route to Knox spark4history path
> - Service tile appears on Knox Homepage
> - Unit tests pass
--
This message was sent by Atlassian Jira
(v8.20.10#820010)