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

Remove JobInfo hierarchy, add JobConfiguration hierarchy #584

Merged
merged 6 commits into from
Jan 29, 2016

Conversation

mziccard
Copy link
Contributor

This PR removes JobInfo hierarchy and replaces it with a hierarchy on JobConfiguration. This change is needed to make functional Job extend JobInfo. Notes:

  • A configuration object (CopyJobConfiguration, ExtractJobConfiguration, LoadJobConfiguration or QueryJobConfiguration) must be provided to create a JobInfo object.
  • LoadJobConfiguration also extends LoadConfiguration which is used for resumable uploads
  • JobConfiguration is an interface with only a type() method since configurations have no common data (this is also required to make LoadJobConfiguration extend LoadConfiguration).

@mziccard mziccard added the api: bigquery Issues related to the BigQuery API. label Jan 26, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 26, 2016
@mziccard mziccard force-pushed the bigquery-hierachies branch from e0a6fec to 84402ac Compare January 26, 2016 15:49
}

/**
* 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.

@aozarov
Copy link
Contributor

aozarov commented Jan 26, 2016

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).

@mziccard mziccard force-pushed the bigquery-hierachies branch from 022ad08 to d170550 Compare January 27, 2016 12:23
@mziccard mziccard force-pushed the bigquery-hierachies branch from d170550 to a2c8b39 Compare January 27, 2016 12:40
return job;
JobConfiguration configuration = job.configuration();
JobInfo.Builder jobBuilder = job.toBuilder();
switch (configuration.type()) {

This comment was marked as spam.

@@ -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.

@aozarov
Copy link
Contributor

aozarov commented Jan 29, 2016

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.


private static final long serialVersionUID = 470267591917413578L;

protected final TableId destinationTable;

This comment was marked as spam.

@mziccard
Copy link
Contributor Author

@aozarov Yes I plan to do a similar change to table's hierarchy but in a different PR as this is already big enough.

aozarov added a commit that referenced this pull request Jan 29, 2016
Remove JobInfo hierarchy, add JobConfiguration hierarchy
@aozarov aozarov merged commit b4bddff into googleapis:master Jan 29, 2016
github-actions bot pushed a commit to suztomo/google-cloud-java that referenced this pull request Jun 29, 2022
github-actions bot pushed a commit that referenced this pull request Oct 7, 2022
…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=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants