[
https://issues.apache.org/jira/browse/KNOX-719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15886983#comment-15886983
]
Jeffrey E Rodriguez commented on KNOX-719:
-------------------------------------------
Thanks again for your comments and your guidance.
Answers to your questions.
"1. There is an extraneous class RMUIHaHttpClientDispatch. Can this be removed?"
Yes I just removed RMUIHaHttpClientDispatch.
"2. There should be an opportunity to share some code between the various HA
dispatches. There is a a lot of duplicate code that generally makes me
uncomfortable."
I agree. I went ahead and did some refactoring of the two RM dispatchers and
separated Installation/Role setup code from actual common dispatcher. I think
we can do further refactoring across all dispatchers I would be interested in
contributing that please open a Jira is that is the direction we want to follow.
"3. There is an extra executeRequest method in the new Dispatch classes that is
commented as a test method. Is this needed? I'm also uncomfortable with test
only methods in code."
I agree I just removed this extra executeRequest method and added code to
inject the mock HttpResponse inboundResponse so I broke this now into two steps
on the RMHaDispatchTest class:
dispatch.setInboundResponse(inboundResponse); // sets the inboundResponse
object inside executeRequest method.
dispatch.executeRequest(outboundRequest, inboundRequest, outboundResponse);
// Here the call we are testing.
Due to my limited experience with EasyMock I couldn't find a better way. Other
mocking infrastructure offer ways to do this through annotations, let me know
if you see a more suitable way.
Regards,
Jeff Rodriguez
> Knox support for Yarn Resource Manager HA
> -----------------------------------------
>
> Key: KNOX-719
> URL: https://issues.apache.org/jira/browse/KNOX-719
> Project: Apache Knox
> Issue Type: Bug
> Affects Versions: 0.6.0, 0.7.0, 0.8.0, 0.9.0, 0.10.0, 0.11.0
> Reporter: Jeffrey E Rodriguez
> Assignee: Jeffrey E Rodriguez
> Fix For: 0.12.0
>
> Attachments: KNOX-719-4.patch
>
>
> This would support both REST/UI YARN Resource Manager HA. Based on other HA
> providers added in Knox.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)