-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Remove JobInfo hierarchy, add JobConfiguration hierarchy #584
Conversation
e0a6fec
to
84402ac
Compare
} | ||
|
||
/** | ||
* Creates a builder for a BigQuery Load Configuration given the destination table and format. | ||
*/ | ||
public static Builder builder(TableId destinationTable, FormatOptions format) { | ||
return new Builder().destinationTable(destinationTable).formatOptions(format); | ||
return new Builder<>().destinationTable(destinationTable).formatOptions(format); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Done withe the review. looks good. Main comment (as discussed verbally) is the suggestion to make JobConfiguration interface an abstract class (and use package scope methods to set or get from pb). |
022ad08
to
d170550
Compare
d170550
to
a2c8b39
Compare
return job; | ||
JobConfiguration configuration = job.configuration(); | ||
JobInfo.Builder jobBuilder = job.toBuilder(); | ||
switch (configuration.type()) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -200,7 +199,7 @@ public Builder toBuilder() { | |||
} | |||
|
|||
@Override | |||
ToStringHelper toStringHelper() { | |||
protected ToStringHelper toStringHelper() { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Looks great! Do you plan to do the same for BaseTableInfo ? BTW, looks like BigQueryException has 2 unused import statements. |
private static final long serialVersionUID = -2673554846792429829L; | ||
|
||
private final List<String> sourceUris; | ||
protected final TableId destinationTable; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
private static final long serialVersionUID = 470267591917413578L; | ||
|
||
protected final TableId destinationTable; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@aozarov Yes I plan to do a similar change to table's hierarchy but in a different PR as this is already big enough. |
Remove JobInfo hierarchy, add JobConfiguration hierarchy
…o v2.5.2 (#584) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-retail](https://togithub.com/googleapis/java-retail) ([source](https://togithub.com/googleapis/java-)) | `2.5.1` -> `2.5.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-retail/2.5.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-retail/2.5.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-retail/2.5.2/compatibility-slim/2.5.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-retail/2.5.2/confidence-slim/2.5.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-retail). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yMTkuMSIsInVwZGF0ZWRJblZlciI6IjMyLjIxOS4xIn0=-->
This PR removes
JobInfo
hierarchy and replaces it with a hierarchy onJobConfiguration
. This change is needed to make functionalJob
extendJobInfo
. Notes:CopyJobConfiguration
,ExtractJobConfiguration
,LoadJobConfiguration
orQueryJobConfiguration
) must be provided to create aJobInfo
object.LoadJobConfiguration
also extendsLoadConfiguration
which is used for resumable uploadsJobConfiguration
is an interface with only atype()
method since configurations have no common data (this is also required to makeLoadJobConfiguration
extendLoadConfiguration
).