smolnar82 commented on code in PR #1178:
URL: https://github.com/apache/knox/pull/1178#discussion_r2960739886


##########
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:
   @Hean-Chhinling - have you tested the HA case as well? Do we need this 
special HA dispatch (i.e. the most common ConfigurableHADispatch isn't enough)?



##########
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:
   Please add the corresponding service model generator test class. I know it's 
gonna be the first one for YARN, but you can find many samples for other 
services under the test resources.



##########
gateway-discovery-ambari/src/main/resources/ambari-service-discovery-url-mappings.xml:
##########
@@ -487,6 +487,40 @@
         </properties>
     </service>
 
+    <service name="YARNSUI">

Review Comment:
   The most recent service definitions did not add Ambari support for service 
discovery.
   Unless you can test this new entry in an Ambari-managed cluster, I'd 
recommend to remove this from here.



-- 
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]

Reply via email to