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

[GLUTEN-4151][VL] initialize local&hdfs file write sink with FileSink::create function #4191

Merged
merged 1 commit into from
Dec 27, 2023

Conversation

dcoliversun
Copy link
Contributor

What changes were proposed in this pull request?

The WriteFileSink is not the API Velox supposed to expose, we need to initialize local&hdfs file write sink with FileSink::create function.

(Fixes: #4151)

How was this patch tested?

Original unit test in GA.

Copy link

#4151

@dcoliversun
Copy link
Contributor Author

cc @yma11 It would be nice if you have time to review this

auto path = filePath_.substr(5);
auto localWriteFile = std::make_unique<LocalWriteFile>(path, true, false);
sink_ = std::make_unique<WriteFileSink>(std::move(localWriteFile), path);
sink_ = dwio::common::FileSink::create(filePath_, {.pool = pool_.get()});
Copy link
Contributor

Choose a reason for hiding this comment

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

pool should not be needed for localFileSink and hdfsFileSink. You can take a check at velox layer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct me if I'm wrong. I refer velox code to initialize the sink, could you please share velox layer?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. Seems pool is always provided in velox's usage even it's not actually used.

@yma11 yma11 merged commit f919cdb into apache:main Dec 27, 2023
16 checks passed
@dcoliversun dcoliversun deleted the GLUTEN-4151 branch December 27, 2023 07: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.

[VL] Use dwio::common::FileSink::create for LocalFileSink and HDFSFileSink
2 participants