[ 
https://issues.apache.org/jira/browse/YARN-8046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wangda Tan updated YARN-8046:
-----------------------------
    Description: 
I recently found that new changes of RMWebServiceProtocol make adding any new 
REST API is pretty hard. There're at least 6 classes need to be implemented:

1. {{MockRESTRequestInterceptor}}
2. {{FederationInterceptorREST}}
3. {{DefaultRequestInterceptorREST}}
4. {{PassThroughRESTRequestInterceptor}
5. {{RouterWebServices}}
6. {{RMWebServices}}

Different classes implementations have different styles, simple copy-paste is 
not enough. For example.

{{DefaultRequestInterceptorREST}} uses {{RouterWebServiceUtil.genericForward}} 
to pass all parameters, which needs to understand how each REST API works, 
reconstruct an URL which can easily cause issues.

I think we should revisit these APIs and make sure new API can be easier added 
to REST interface like before.

  was:
I recently found that new changes of RMWebServiceProtocol make adding any new 
REST API pretty hard. There're at least 6 classes need to be implemented:

1. {{MockRESTRequestInterceptor}}
2. {{FederationInterceptorREST}}
3. {{DefaultRequestInterceptorREST}}
4. {{PassThroughRESTRequestInterceptor}
5. {{RouterWebServices}}
6. {{RMWebServices}}

Different classes implementations have different styles, simple copy-paste is 
not enough. For example.

{{DefaultRequestInterceptorREST}} uses {{RouterWebServiceUtil.genericForward}} 
to pass all parameters, which needs to understand how each REST API works, 
reconstruct an URL which can easily cause issues.

I think we should revisit these APIs and make sure new API can be easier added 
to REST interface like before.


> Revisit RMWebServiceProtocol implementations
> --------------------------------------------
>
>                 Key: YARN-8046
>                 URL: https://issues.apache.org/jira/browse/YARN-8046
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Wangda Tan
>            Priority: Critical
>
> I recently found that new changes of RMWebServiceProtocol make adding any new 
> REST API is pretty hard. There're at least 6 classes need to be implemented:
> 1. {{MockRESTRequestInterceptor}}
> 2. {{FederationInterceptorREST}}
> 3. {{DefaultRequestInterceptorREST}}
> 4. {{PassThroughRESTRequestInterceptor}
> 5. {{RouterWebServices}}
> 6. {{RMWebServices}}
> Different classes implementations have different styles, simple copy-paste is 
> not enough. For example.
> {{DefaultRequestInterceptorREST}} uses 
> {{RouterWebServiceUtil.genericForward}} to pass all parameters, which needs 
> to understand how each REST API works, reconstruct an URL which can easily 
> cause issues.
> I think we should revisit these APIs and make sure new API can be easier 
> added to REST interface like before.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to