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

Implementing Datasource v2 writing support #283

Merged

Conversation

davidrabinowitz
Copy link
Member

No description provided.

@davidrabinowitz
Copy link
Member Author

/gcbrun

Copy link
Collaborator

@anoopj anoopj left a comment

Choose a reason for hiding this comment

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

Initial set of feedback. I'm only half way through.

Copy link
Collaborator

@anoopj anoopj left a comment

Choose a reason for hiding this comment

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

Some more feedback.

import org.slf4j.LoggerFactory;

/**
* Responsible for recursively deleting the intermediate path. Implementing Runnable in order to act
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure if this is a good idea to run data cleanup as a shutdown hook. Generally shutdown hooks should run quickly and it's entirely possible that the GCS clients and associated thread pools may be in the process of shutting down, so it's hard to guarantee that this cleanup actually happened.

Should we consider alternatives? For instance, can we upload the temporary files with random prefixes and use GCS lifecycle policies to automatically clean them up after a safe window?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is done just as a safe-guard in case BigQueryIndirectDataSourceWriter.cleanTemporaryGcsPathIfNeeded has not been called by an error. Relying on GCS object lifecycle will require the bucket to allow lifecycle management, which is not guaranteed.

@davidrabinowitz
Copy link
Member Author

/gcbrun

1 similar comment
@davidrabinowitz
Copy link
Member Author

/gcbrun

@davidrabinowitz
Copy link
Member Author

/gcbrun

Copy link

@functicons functicons left a comment

Choose a reason for hiding this comment

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

As a general comment, 1) add comments for all public classes and methods; 2) break down a huge PR into multiple PRs, which will be much easier for review.

@davidrabinowitz
Copy link
Member Author

/gcbrun

@davidrabinowitz davidrabinowitz merged commit a3a7bf0 into GoogleCloudDataproc:master Jan 28, 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

3 participants