[ 
https://issues.apache.org/jira/browse/KNOX-3249?focusedWorklogId=1010410&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1010410
 ]

ASF GitHub Bot logged work on KNOX-3249:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Mar/26 17:24
            Start Date: 19/Mar/26 17:24
    Worklog Time Spent: 10m 
      Work Description: moresandeep commented on code in PR #1178:
URL: https://github.com/apache/knox/pull/1178#discussion_r2961548101


##########
gateway-service-definitions/src/main/resources/services/yarnsui/1.0.0/rewrite.xml:
##########
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+   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.
+-->
+<rules>
+  <rule dir="IN" name="YARN-SCHEDULER-UI/yarn-scheduler-ui/inbound/root" 
pattern="*://*:*/**/yarn-scheduler-ui/">

Review Comment:
   We have a unwritten rule where service name (YARN-SCHEDULER-UI) should be 
the same as the folder name (yarnsui) It helps to identify the service files 
easily while debugging. 
   
   Can you update the folder name to YARN-SCHEDULER-UI?



##########
gateway-service-definitions/src/main/resources/services/yarnsui/1.0.0/service.xml:
##########
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+   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.
+-->
+
+<service role="YARNSUI" name="yarnsui" version="1.0.0">
+    <metadata>
+        <type>UI</type>
+        <context>/yarnsui/</context>
+        <shortDesc>YARN Scheduler UI</shortDesc>
+        <description>YARN Scheduler UI</description>
+    </metadata>
+    <routes>
+        <route path="/yarnsui/">
+            <rewrite apply="YARNSUI/yarnsui/inbound/root" to="request.url"/>
+            <rewrite apply="YARNSUI/yarnsui/outbound/headers/location/filter" 
to="response.headers"/>
+            <rewrite apply="YARNSUI/yarnsui/outbound/index" to="response.body" 
/>
+        </route>
+
+        <route path="/yarnsui/**">
+            <rewrite apply="YARNSUI/yarnsui/inbound/path" to="request.url"/>
+            <rewrite apply="YARNSUI/yarnsui/outbound/headers/location/filter" 
to="response.headers"/>
+            <rewrite apply="YARNSUI/yarnsui/outbound/index" 
to="response.body"/>
+        </route>
+
+        <route path="/yarnsui/ws/v1/cluster/**?**">
+            <rewrite apply="YARNSUI/yarnsui/inbound/ws-cluster-query" 
to="request.url"/>
+        </route>
+
+        <route path="/yarnsui/ws/v1/cluster/**">
+            <rewrite apply="YARNSUI/yarnsui/inbound/ws-cluster" 
to="request.url"/>
+        </route>
+
+        <route path="/yarnsui/conf?**">
+            <rewrite apply="YARNSUI/yarnsui/inbound/conf-query" 
to="request.url"/>
+        </route>
+    </routes>
+
+    <dispatch classname="org.apache.knox.gateway.dispatch.DefaultDispatch" 
ha-classname="org.apache.knox.gateway.rm.dispatch.RMUI2HaDispatch"/>

Review Comment:
   Also, please use the `ConfigurableHADispatch.java` and  
`ConfigurableDispatch.java` they extent the older DefaultDispatch and offer 
more customizations.



##########
gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/model/yarn/YarnSUIServiceModelGenerator.java:
##########
@@ -0,0 +1,27 @@
+/*
+ * 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.yarn;
+
+public class YarnSUIServiceModelGenerator extends YarnUIServiceModelGenerator {

Review Comment:
   I would also recommend to update the class name from 
`YarnSUIServiceModelGenerator` to something that is more descriptive of the 
service.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 1010410)
    Time Spent: 1h 40m  (was: 1.5h)

> Integrate new scheduler-ui into YARN
> ------------------------------------
>
>                 Key: KNOX-3249
>                 URL: https://issues.apache.org/jira/browse/KNOX-3249
>             Project: Apache Knox
>          Issue Type: Improvement
>            Reporter: Bence Kosztolnik
>            Priority: Major
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> On YARN a new react based web app was created, to be able to manage the queue 
> settings.
> https://issues.apache.org/jira/browse/YARN-11885
> If i see correctly this requires some knox integration to be abel to presents.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to