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

Pluggable file I/O submodule in TableOperations #14

Merged
merged 16 commits into from Dec 11, 2018

Conversation

mccheah
Copy link
Contributor

@mccheah mccheah commented Nov 27, 2018

Closes #12.

Separate patch to come for leveraging this submodule in the Iceberg clients, such as the Spark DataSource.

@mccheah
Copy link
Contributor Author

mccheah commented Nov 29, 2018

@rdblue for review.

@mccheah
Copy link
Contributor Author

mccheah commented Dec 5, 2018

@rdblue ping for review please!

@mccheah
Copy link
Contributor Author

mccheah commented Dec 10, 2018

Addressed comments and is ready for another pass of reviews.

public String metadataFileLocation(String fileName) {
return createdMetadataFilePaths.computeIfAbsent(fileName, name -> {
try {
return temp.newFile(name).getAbsolutePath();
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this still run delete() and deleteOnExit()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe TemporaryFolder knows to handle cleanup of data when it's torn down.

Copy link
Contributor

Choose a reason for hiding this comment

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

You're right and that should take care of deleteOnExit. I thought that the delete was needed because it creates the file, but I guess not since tests are passing.

@rdblue
Copy link
Contributor

rdblue commented Dec 11, 2018

Looks really close! Just minor issues right now.

@mccheah
Copy link
Contributor Author

mccheah commented Dec 11, 2018

Addressed all comments so far.

@rdblue rdblue merged commit 7c079cd into apache:master Dec 11, 2018
@rdblue
Copy link
Contributor

rdblue commented Dec 11, 2018

Merged. Thanks @mccheah! Nice work.

rdblue referenced this pull request in rdblue/iceberg Dec 21, 2018
This adds FileIO that is returned by TableOperations and used to delete paths and to create InputFile and OutputFile instances. FileIO is Serializable so that it can be sent to tasks running in different JVMs and used for all file-related tasks for a table.
pvary pushed a commit to pvary/iceberg that referenced this pull request Jan 27, 2021
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.

None yet

2 participants