Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loaddata by alluxio engine #542

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

XIAO-HOU
Copy link
Contributor

Ⅰ. Describe what this PR does

use engine to loaddata

Ⅱ. Does this pull request fix one issue?

fixes #295

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-io
Copy link

codecov-io commented Jan 23, 2021

Codecov Report

Attention: Patch coverage is 14.13043% with 79 lines in your changes are missing coverage. Please review.

Project coverage is 19.05%. Comparing base (9e77feb) to head (bdfb7b5).
Report is 1932 commits behind head on master.

Files Patch % Lines
pkg/ddc/alluxio/load_data.go 9.45% 67 Missing ⚠️
pkg/ddc/base/load_data.go 33.33% 8 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #542      +/-   ##
==========================================
- Coverage   19.24%   19.05%   -0.19%     
==========================================
  Files          60       62       +2     
  Lines        2411     2503      +92     
==========================================
+ Hits          464      477      +13     
- Misses       1898     1973      +75     
- Partials       49       53       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@XIAO-HOU XIAO-HOU marked this pull request as ready for review February 5, 2021 11:59
return utils.RequeueIfError(err)
}
releaseName := utils.GetDataLoadReleaseName(targetDataload.Name)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果只判断release是否安装成功,而不查看执行load的pod是否处于running或者pending,实际上不能反映当前的dataload操作是running还是pending。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果只判断release是否安装成功,而不查看执行load的pod是否处于running或者pending,实际上不能反映当前的dataload操作是running还是pending。
这里实际只是检查了release是否安装成功,具体判断当前的dataload操作是running还是pending实际是靠检查load job的状态,目前dataload是根据job的状态进入相应状态的。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

代码改动已完成,将返回Job状态的逻辑包含在了engine的loaddata()函数之内@cheyang

Copy link
Member

@yangyuliufeng yangyuliufeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dataload job的命名、删除部分,与alluxioruntime解耦不彻底,创建job仍然只能通过helm方式。

Comment on lines -232 to -234
// 1. Check if the helm release already exists
releaseName := utils.GetDataLoadReleaseName(ctx.Name)
jobName := utils.GetDataLoadJobName(releaseName)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

通过获取helm release名再得到Job名的方式是否合理?我们是否应该允许用户通过helm之外的方式运行此job?

Comment on lines 44 to 50
// 1. Delete release if exists
releaseName := utils.GetDataLoadReleaseName(ctx.DataLoad.Name)
err := helm.DeleteReleaseIfExists(releaseName, ctx.DataLoad.Namespace)
releaseName := utils.GetDataLoadReleaseName(targetDataload.Name)
err := helm.DeleteReleaseIfExists(releaseName, targetDataload.Namespace)
if err != nil {
log.Error(err, "can't delete release", "releaseName", releaseName)
return utils.RequeueIfError(err)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我觉得不仅仅是创建job部分的逻辑,删除job部分的逻辑同样应该放到engine中。
目前的代码逻辑实际限制了启动load job只能通过helm方式。其他runtime开发者可能需要以其它方式运行此load job。

Comment on lines +26 to +29
if err = t.Implement.CreateDataLoadJob(ctx, targetDataload); err != nil {
t.Log.Error(err, "Failed to create the DataLoad job.")
return "", err
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里由于我们alluxioruntime通过helm方式启动了此job,job名统一定为{$dataload}-loader-job,所以CreateDataLoadJob并未返回创建的job名。
后续直接通过此命名约定获取了此job名。
如果使用此逻辑,需要在文档中告诉runtime开发者,创建的loaderjob需要遵循此命名规范。

@cheyang cheyang marked this pull request as draft March 2, 2021 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURES]DataLoad 通过接口调用Alluxio Engine的LoadData
4 participants