| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
- 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 |
Sorry, something went wrong.
|
I've fixed checkstyle issues. |
Sorry, something went wrong.
There was a problem hiding this comment.
There aren't any tags for publishing.
Sorry, something went wrong.
There was a problem hiding this comment.
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.
| } | ||
|
|
||
| /** | ||
| * Estimates the size of a Spanner row. For simplicity, arrays and structs aren't supported. |
There was a problem hiding this comment.
why do you do this?
Sorry, something went wrong.
There was a problem hiding this comment.
What do you mean? There are two examples that estimate the logical size of the database.
Sorry, something went wrong.
There was a problem hiding this comment.
I'm asking if the comment should explain why this is being done.
Sorry, something went wrong.
There was a problem hiding this comment.
(ie. why do I need to do this?)
Sorry, something went wrong.
| void setDatabaseId(String value); | ||
|
|
||
| @Description("Singers output filename in the format: singer_id\tfirst_name\tlast_name") | ||
| @Default.String("data/usersids.txt") |
There was a problem hiding this comment.
Ok, but wouldn't putting it in resources be more appropriate?
Sorry, something went wrong.
There was a problem hiding this comment.
Removed defaults.
Sorry, something went wrong.
|
Please take a look, I've updated the tests and checked that the checkstyle passes |
Sorry, something went wrong.
| DatabaseClient dbClient = getDbClient(); | ||
| try (ReadContext context = dbClient.singleUse()) { | ||
| ResultSet rs = context.executeQuery( | ||
| Statement.newBuilder("SELECT COUNT(*) FROM users WHERE STATE = @state").bind("state") |
There was a problem hiding this comment.
?? 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.
There was a problem hiding this comment.
It's just a good practice, if we want to change this to a variable in future
Sorry, something went wrong.
| } | ||
| try (ReadContext context = dbClient.singleUse()) { | ||
| ResultSet rs = context.executeQuery( | ||
| Statement.newBuilder("SELECT COUNT(*) FROM PendingReviews WHERE ACTION = @action") |
There was a problem hiding this comment.
ditto, why bind to a constant?
Sorry, something went wrong.
There was a problem hiding this comment.
It's just a good practice.
Sorry, something went wrong.
| .getDatabaseClient(DatabaseId.of(spannerOptions.getProjectId(), instanceId, databaseId)); | ||
| } | ||
|
|
||
| } No newline at end of file |
There was a problem hiding this comment.
Should there be a newLine here?
Sorry, something went wrong.
There was a problem hiding this comment.
Added a new line
Sorry, something went wrong.
| .getDatabaseClient(DatabaseId.of(spannerOptions.getProjectId(), instanceId, databaseId)); | ||
| } | ||
|
|
||
| } No newline at end of file |
There was a problem hiding this comment.
newLine?
Sorry, something went wrong.
There was a problem hiding this comment.
Added a new line
Sorry, something went wrong.
There was a problem hiding this comment.
A few questions that may require changes, but I'm basically happy.
Sorry, something went wrong.
| .getDatabaseClient(DatabaseId.of(spannerOptions.getProjectId(), instanceId, databaseId)); | ||
| } | ||
|
|
||
| } No newline at end of file |
There was a problem hiding this comment.
I think your IDE is helping too much.
Sorry, something went wrong.
There was a problem hiding this comment.
feel free to just merge once kokoro finishes.
Sorry, something went wrong.
…1.2 (#1059) [](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` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](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).
…1.2 (#1059) [](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` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](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).
…1.2 (#1059) [](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` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](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).
| Back | FazBrowse Home | New Git URL |
No description provided.