walterddr commented on issue #8246:
URL: https://github.com/apache/pinot/issues/8246#issuecomment-1058636542
+1 for this proposal. I am also working on factoring out the helper
functions from ControllerTestUtils.
Here is what I proposed to do, please kindly let me know if this is the
right track:
1. summarized all the helper/utils we currently have. (in addition to the
ones discussed above, many of the `*RestResource` in controller/broker have
internal static functions to do send request and parse responses)
2. proposal to add different level of abstractions.
- HTTPUtils in pinot-common (for constructing pinot get/post/put/delete
to RestAPI and parsing response objects)
- ControllerUtils that utilizes the HTTPUtils to make specific requests
such as getSchema, getTableConfig, etc.
- JavaClient that wraps around the ControllerUtils and is
cluster-context aware (e.g. able to configure controller URL during start up
and keeps tracking the active controller)
3. tests to ensure that they are RestAPI compatible; and ensure the client
API and controller API are in sync.
Any suggestions? I will create an example PR to demonstrate what I meant soon
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]