hiSandog commented on issue #10988:
URL: 
https://github.com/apache/dolphinscheduler/issues/10988#issuecomment-1207138249

   > It is a Far-reaching influence change, and maybe we should discussion it 
first. I have two way out of my mind
   > 
   > 1. we are already have 
https://github.com/apache/dolphinscheduler/blob/bf5f7a88c5a7ef1c7772c6b9c5830fd72dc599ec/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/java_gateway.py#L30-L47
   >    , I think we should covert file into module(or keep file), and migrate 
all `gateway.entry_point.createTenant` call into this file or modules,
   > 
   > ```python
   > def create_tenant(name, description, queue_name):
   >     # we may also add some parameter verify before call
   >     return gateway.entry_point.createTenant(name, description, queue_name)
   > ```
   > 
   > and we only need to call function `create_tenant` when we need.
   > 
   > 2. we have `models` module in path 
https://github.com/apache/dolphinscheduler/tree/dev/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models,
 and the `models` in python usually mean connection to data store system, we 
can take for all java gateway service is Python API DAO layer, and we migrate 
all `gateway.entry_point` call into module `modules`(create them if not exists)
   
   I think the first plan is better.
   In the first plan, the code for API calls is more concentrated.
   API calls may have multiple methods that are not easily grouped into a 
single module, so the second plan may not be well implemented.
   


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