apache/dolphinscheduler

[Feature][Python] Migrate all exists method call in PythonGateway to corresponding service

Open

#10,989 创建于 2022年7月15日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Java (4,324 fork)batch import
Pyschedulerfeaturehelp wanted

仓库指标

Star
 (11,659 star)
PR 合并指标
 (平均合并 2天 21小时) (30 天内合并 22 个 PR)

描述

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

In https://github.com/apache/dolphinscheduler/blob/1fcbbb653440106fc5ca94a6a9e2d218dc3be97f/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java, we will export function to make them available to in python API, but we have to handle many Java map or result object situation. I think we should migrate them into corresponding service instead of PythonGateway, and keep PythonGateway in simple call like what I do in https://github.com/apache/dolphinscheduler/blob/7196b125d9a6612f2f175c2190d7758a09d7e0b9/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java#L363-L375

And after that, we only need to one line call in PythonGateway, such as https://github.com/apache/dolphinscheduler/blob/7196b125d9a6612f2f175c2190d7758a09d7e0b9/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java#L394-L396

It makes our code clean, besides, we should do some refactoring in corresponding service when you migrate python gateway service. such as #10792 we will refactor the QueueServiceImpl.java and TenantService.java code

Use case

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

贡献者指南