-
Notifications
You must be signed in to change notification settings - Fork 85
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
feat: add schema aware stream writer #2048
Conversation
|
b2c069c
to
2601bd4
Compare
@yirutang PTAL |
2601bd4
to
acac9c0
Compare
* order of minutes). | ||
*/ | ||
public class SchemaAwareStreamWriter<T> implements AutoCloseable { | ||
private static String streamPatternString = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fields like this should be final and CAPITALIZED, but I leave it this way. Otherwise I'd have to change too much.
* table schema is updated, users will be able to ingest data on the new schema after some time (in | ||
* order of minutes). | ||
*/ | ||
public class SchemaAwareStreamWriter<T> implements AutoCloseable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is intended to be a generic version of JsonStreamWriter
private Descriptor descriptor; | ||
private TableSchema tableSchema; | ||
private boolean ignoreUnknownFields = false; | ||
private boolean reconnectAfter10M = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seem to be necessary. Can we remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please.
} | ||
|
||
/** | ||
* @Deprecated Setter for a reconnectAfter10M, temporaily workaround for omg/48020. Fix for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do I find it? Can we remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this.
@yirutang @Neenu1995 Is there a chance for any feedback to this pull request and/or the created issues? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the addition!
private Descriptor descriptor; | ||
private TableSchema tableSchema; | ||
private boolean ignoreUnknownFields = false; | ||
private boolean reconnectAfter10M = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please.
} | ||
|
||
/** | ||
* @Deprecated Setter for a reconnectAfter10M, temporaily workaround for omg/48020. Fix for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this.
acac9c0
to
da908d1
Compare
Warning: This pull request is touching the following templated files:
|
ede37e8
to
2258a2a
Compare
I think I've changed everything. The tests for |
2258a2a
to
c42e1cb
Compare
Thank you @yirutang for running the tests again. |
@Neenu1995 Why didn't you finally use |
How does releasing of this library work? When does the releasing bot activate and release a new version? |
🤖 I have created a release *beep* *boop* --- ## [2.35.0](https://togithub.com/googleapis/java-bigquerystorage/compare/v2.34.2...v2.35.0) (2023-04-13) ### Features * Add public api to stream writer to set the maximum wait time ([#2066](https://togithub.com/googleapis/java-bigquerystorage/issues/2066)) ([1e9a8ca](https://togithub.com/googleapis/java-bigquerystorage/commit/1e9a8cac19c3748515ebff7990d02fd576c7dd23)) * Add sample about processing permanent writer failure ([#2057](https://togithub.com/googleapis/java-bigquerystorage/issues/2057)) ([8eda934](https://togithub.com/googleapis/java-bigquerystorage/commit/8eda9347a90f59ddcf99501f8b71ba17c5f3a143)) * Add schema aware stream writer ([#2048](https://togithub.com/googleapis/java-bigquerystorage/issues/2048)) ([ad136b9](https://togithub.com/googleapis/java-bigquerystorage/commit/ad136b9fa25e774a33d02fc3a82a76fb1152b5c5)) ### Dependencies * Update dependency com.google.cloud:google-cloud-bigquery to v2.24.4 ([#2070](https://togithub.com/googleapis/java-bigquerystorage/issues/2070)) ([ce9e962](https://togithub.com/googleapis/java-bigquerystorage/commit/ce9e96209cbafd5a4daa981c5e5252272dc9811a)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.7.0 ([#2077](https://togithub.com/googleapis/java-bigquerystorage/issues/2077)) ([b5ea788](https://togithub.com/googleapis/java-bigquerystorage/commit/b5ea788df26122dcdf3c7104658cc8fd35a38f72)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #2039 ☕️
If you write sample code, please follow the samples format.