GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Updated Spanner Dataflow connector samples by mairbek · Pull Request #1059 · GoogleCloudPlatform/java-docs-samples

Conversation

@mairbek

@mairbek mairbek commented Mar 13, 2018

Copy link
Copy Markdown
Contributor

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Mairbek Khadikov
Updated Spanner Dataflow connector samples
bc04758
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 13, 2018
@jsimonweb
jsimonweb requested a review from davidcavazos March 14, 2018 00:25
@lesv

lesv commented Mar 20, 2018

Copy link
Copy Markdown
Contributor
- testing dataflow/spanner-io
------------------------------------------------------------
[ERROR] src/main/java/com/example/dataflow/SpannerGroupWrite.java:[16] (whitespace) EmptyLineSeparator: 'package' should be separated from previous statement.
[ERROR] src/main/java/com/example/dataflow/SpannerGroupWrite.java:[26] (imports) AvoidStarImport: Using the '.*' form of import should be avoided - org.apache.beam.sdk.options.*.
[ERROR] src/main/java/com/example/dataflow/SpannerGroupWrite.java:[32] (sizes) LineLength: Line is longer than 100 characters (found 103).
[ERROR] src/main/java/com/example/dataflow/SpannerGroupWrite.java:[56] (whitespace) EmptyLineSeparator: 'METHOD_DEF' should be separated from previous statement.
[ERROR] src/main/java/com/example/dataflow/SpannerGroupWrite.java:[70] (sizes) LineLength: Line is longer than 100 characters (found 128).
[ERROR] src/main/java/com/example/dataflow/TransactionalRead.java:[29] (imports) AvoidStarImport: Using the '.*' form of import should be avoided - org.apache.beam.sdk.options.*.
[ERROR] src/main/java/com/example/dataflow/EstimateSize.java:[16] (whitespace) EmptyLineSeparator: 'package' should be separated from previous statement.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (default) on project dataflow-spanner: You have 7 Checkstyle violations. -> [Help 1]

[ID: 8307783] Build finished after 113 secs, exit value: 1


Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
Build script failed with exit code: 1
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Mairbek Khadikov
Make checkstyle happy
2b40d68
@mairbek

mairbek commented Mar 20, 2018

Copy link
Copy Markdown
Contributor Author

I've fixed checkstyle issues.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jsimonweb
jsimonweb requested review from lesv and removed request for davidcavazos March 20, 2018 22:49
@lesv
Merge branch 'master' into sample
bca157e
lesv
lesv reviewed Mar 20, 2018
View reviewed changes

@lesv lesv left a comment

Copy link
Copy Markdown
Contributor

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.

There aren't any tags for publishing.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
lesv
lesv previously approved these changes Mar 20, 2018
View reviewed changes

@lesv lesv left a comment

Copy link
Copy Markdown
Contributor

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.

Just nits, missing tests, maybe missing datafiles. Would be nice if there was a README.md explaining what's going on and how to use it.

I'm also asking for a better comment in the first file.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread dataflow/spanner-io/src/main/java/com/example/dataflow/EstimateSize.java
}

/**
* Estimates the size of a Spanner row. For simplicity, arrays and structs aren't supported.

@lesv lesv Mar 20, 2018

Copy link
Copy Markdown
Contributor

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.

why do you do this?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mairbek mairbek Mar 21, 2018

Copy link
Copy Markdown
Contributor Author

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.

What do you mean? There are two examples that estimate the logical size of the database.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@lesv lesv Mar 21, 2018

Copy link
Copy Markdown
Contributor

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.

I'm asking if the comment should explain why this is being done.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@lesv lesv Mar 21, 2018

Copy link
Copy Markdown
Contributor

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.

(ie. why do I need to do this?)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread dataflow/spanner-io/src/main/java/com/example/dataflow/SpannerGroupWrite.java Outdated
void setDatabaseId(String value);

@Description("Singers output filename in the format: singer_id\tfirst_name\tlast_name")
@Default.String("data/usersids.txt")

@lesv lesv Mar 20, 2018

Copy link
Copy Markdown
Contributor

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.

Ok, but wouldn't putting it in resources be more appropriate?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mairbek mairbek Mar 21, 2018

Copy link
Copy Markdown
Contributor Author

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.

Removed defaults.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Mairbek Khadikov added 4 commits March 20, 2018 16:52
Mairbek Khadikov
First test
fba6faa
Mairbek Khadikov
Updated the test
0a8d691
Mairbek Khadikov
Added tests
d89c0fb
Mairbek Khadikov
Merge branch 'sample' of github.com:mairbek/java-docs-samples into sa…
91f007b
…mple
@mairbek
mairbek dismissed lesv’s stale review via 91f007b March 21, 2018 01:29
Mairbek Khadikov added 2 commits March 21, 2018 09:34
Mairbek Khadikov
Makes checkstyle happy
7bad2e1
Mairbek Khadikov
Use system properties
08c2629
@mairbek

mairbek commented Mar 21, 2018

Copy link
Copy Markdown
Contributor Author

Please take a look, I've updated the tests and checked that the checkstyle passes

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Mairbek Khadikov
Add add system property
419500f
lesv
lesv reviewed Mar 21, 2018
View reviewed changes
Comment thread dataflow/spanner-io/src/test/java/com/example/dataflow/SpannerGroupWriteIT.java
DatabaseClient dbClient = getDbClient();
try (ReadContext context = dbClient.singleUse()) {
ResultSet rs = context.executeQuery(
Statement.newBuilder("SELECT COUNT(*) FROM users WHERE STATE = @state").bind("state")

@lesv lesv Mar 21, 2018

Copy link
Copy Markdown
Contributor

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.

?? Why do you bother to bind to a constant? ??

(I'm ok w/ it as long as you had a reason)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mairbek mairbek Mar 21, 2018

Copy link
Copy Markdown
Contributor Author

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's just a good practice, if we want to change this to a variable in future

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
lesv
lesv reviewed Mar 21, 2018
View reviewed changes
Comment thread dataflow/spanner-io/src/test/java/com/example/dataflow/SpannerGroupWriteIT.java
}
try (ReadContext context = dbClient.singleUse()) {
ResultSet rs = context.executeQuery(
Statement.newBuilder("SELECT COUNT(*) FROM PendingReviews WHERE ACTION = @action")

@lesv lesv Mar 21, 2018

Copy link
Copy Markdown
Contributor

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.

ditto, why bind to a constant?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mairbek mairbek Mar 21, 2018

Copy link
Copy Markdown
Contributor Author

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's just a good practice.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
lesv
lesv reviewed Mar 21, 2018
View reviewed changes
Comment thread dataflow/spanner-io/src/test/java/com/example/dataflow/SpannerGroupWriteIT.java Outdated
.getDatabaseClient(DatabaseId.of(spannerOptions.getProjectId(), instanceId, databaseId));
}

} No newline at end of file

@lesv lesv Mar 21, 2018

Copy link
Copy Markdown
Contributor

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.

Should there be a newLine here?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mairbek mairbek Mar 21, 2018

Copy link
Copy Markdown
Contributor Author

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.

Added a new line

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
lesv
lesv reviewed Mar 21, 2018
View reviewed changes
Comment thread dataflow/spanner-io/src/test/java/com/example/dataflow/SpannerWriteIT.java Outdated
.getDatabaseClient(DatabaseId.of(spannerOptions.getProjectId(), instanceId, databaseId));
}

} No newline at end of file

@lesv lesv Mar 21, 2018

Copy link
Copy Markdown
Contributor

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.

newLine?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mairbek mairbek Mar 21, 2018

Copy link
Copy Markdown
Contributor Author

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.

Added a new line

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
lesv
lesv previously approved these changes Mar 21, 2018
View reviewed changes

@lesv lesv left a comment

Copy link
Copy Markdown
Contributor

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.

A few questions that may require changes, but I'm basically happy.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Mairbek Khadikov
New lines
56b767e
@mairbek
mairbek dismissed lesv’s stale review via 56b767e March 21, 2018 18:48
@lesv
Merge branch 'master' into sample
b2f1e55
lesv
lesv reviewed Mar 21, 2018
View reviewed changes
Comment thread dataflow/spanner-io/src/test/java/com/example/dataflow/SpannerReadIT.java
.getDatabaseClient(DatabaseId.of(spannerOptions.getProjectId(), instanceId, databaseId));
}

} No newline at end of file

@lesv lesv Mar 21, 2018

Copy link
Copy Markdown
Contributor

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.

I think your IDE is helping too much.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@lesv lesv Mar 21, 2018

Copy link
Copy Markdown
Contributor

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.

feel free to just merge once kokoro finishes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
lesv
lesv approved these changes Mar 21, 2018
View reviewed changes
@jsimonweb
jsimonweb merged commit df10b39 into GoogleCloudPlatform:master Mar 21, 2018
minherz pushed a commit that referenced this pull request Nov 16, 2022
@renovate-bot
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
a736564
…1.2 (#1059)

[![WhiteSource 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:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `24.1.1` -> `24.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/compatibility-slim/24.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/confidence-slim/24.1.1)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 **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 [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-asset).
minherz pushed a commit that referenced this pull request Nov 17, 2022
@renovate-bot @minherz
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
a62b024
…1.2 (#1059)

[![WhiteSource 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:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `24.1.1` -> `24.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/compatibility-slim/24.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/confidence-slim/24.1.1)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 **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 [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-asset).
anguillanneuf pushed a commit that referenced this pull request Dec 5, 2022
@renovate-bot @anguillanneuf
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
23046ee
…1.2 (#1059)

[![WhiteSource 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:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `24.1.1` -> `24.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/compatibility-slim/24.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.2/confidence-slim/24.1.1)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 **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 [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-asset).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@lesv lesv lesv approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@mairbek @lesv @jsimonweb @googlebot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.