[BEAM-2532] add a Serializable TableSchema Supplier in BigQuerySourceBase#3584
Closed
nevillelyh wants to merge 2 commits intoapache:masterfrom
nevillelyh:neville/BEAM-2532
Closed
[BEAM-2532] add a Serializable TableSchema Supplier in BigQuerySourceBase#3584nevillelyh wants to merge 2 commits intoapache:masterfrom nevillelyh:neville/BEAM-2532
nevillelyh wants to merge 2 commits intoapache:masterfrom
nevillelyh:neville/BEAM-2532
Conversation
Contributor
|
I suspect you'll have to add a FindBugs exception. See for an example. |
jkff
requested changes
Jul 18, 2017
|
|
||
| SerializableFunction<GenericRecord, TableRow> function = | ||
| new SerializableFunction<GenericRecord, TableRow>() { | ||
| private Supplier<TableSchema> schema = new SerializableTableSchemaSupplier( |
Contributor
There was a problem hiding this comment.
Hmm, can this be simplified by making this a Suppliers.memoize(Suppliers.compose(BigQueryHelpers::fromJsonString, Suppliers.ofInstance(jsonSchema))) ? (except the lambda has to be Java 7)
using methods from http://google.github.io/guava/releases/22.0/api/docs/com/google/common/base/Suppliers.html
Contributor
|
R: @jkff |
jkff
approved these changes
Jul 19, 2017
Contributor
jkff
left a comment
There was a problem hiding this comment.
Thanks! I'm gonna fix the checkstyle issue and merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Verified that with the fix, loading a 35GB BigQuery table with 10 n1-standard-1 workers is 4x faster than without (~10min vs 40min).