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

adding java8 spanner sample #711

Merged
merged 3 commits into from
Jun 15, 2017
Merged

adding java8 spanner sample #711

merged 3 commits into from
Jun 15, 2017

Conversation

jabubake
Copy link
Contributor

@jabubake jabubake commented Jun 15, 2017

Spanner app engine sample.
FYI, @ludoch

@jabubake jabubake added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jun 15, 2017
@jabubake jabubake requested a review from lesv June 15, 2017 19:40
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 15, 2017
@jabubake jabubake removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jun 15, 2017
A database will created using the `SPANNER_DATABASE` name if provided, else will be auto-generated.

## Endpoints
- `/run` : will run sample operations against the spanner instance in order. Individual tasks can be run
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/spanner ??

- Update system properties in `[appengine-web.xml](src/main/webapp/WEB-INF/appengine-web.xml):
- Required : `SPANNER_INSTANCE`
- Optional : `SPANNER_DATABASE`,
A database will created using the `SPANNER_DATABASE` name if provided, else will be auto-generated.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One or the other???

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cleaned up to be just SPANNER_INSTANCE so its clearer.

You may also [create and use service account credentials](https://cloud.google.com/docs/authentication/getting-started#creating_the_service_account).
- To run locally, we will be using the [Maven Jetty plugin](http://www.eclipse.org/jetty/documentation/9.4.x/jetty-maven-plugin.html)
```
mvn -DSPANNER_INSTANCE=my-spanner-instance jetty:run
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not tell them this - it's not really for J8 Std

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THIS IS TEMPORARY - explain why and the issue # they can follow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added tracking issue.

<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not have this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, just comment that this is hear due to a problem in the spanner library that we can't run locally under normal tooling -- GAE development server - GAE API's won't work here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

@WebListener
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We like having comments about why this makes it so that we don't use web.xml

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

* Individual tasks can be run using "tasks" query parameter. {@link SpannerTasks.Task} lists
* supported tasks. All tasks are run in order if no parameter or "tasks=all" is provided.
*/
@WebServlet(value = "/run")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/spanner - also comment on why this keeps you from needing a web.xml

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed to /spanner & added comment about annotation

@jabubake
Copy link
Contributor Author

@lesv PTAL

@jabubake jabubake merged commit bdd8a8a into master Jun 15, 2017
@jabubake jabubake deleted the appenginej8-spanner branch June 15, 2017 23:03
averikitsch pushed a commit that referenced this pull request Oct 27, 2022
…to v0.9.13 (#711)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [org.graalvm.buildtools:junit-platform-native](https://github.com/graalvm/native-build-tools) | `0.9.12` -> `0.9.13` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.13/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.13/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.13/compatibility-slim/0.9.12)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.13/confidence-slim/0.9.12)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>graalvm/native-build-tools</summary>

### [`v0.9.13`](https://github.com/graalvm/native-build-tools/releases/tag/0.9.13)

[Compare Source](https://github.com/graalvm/native-build-tools/compare/0.9.12...0.9.13)

##### What's Changed

Read what's new in the [documentation](https://graalvm.github.io/native-build-tools/latest/index.html#changelog).

-   Restore `NativeImagePlugin.NATIVE_TEST_EXTENSION` by [@&#8203;lazar-mitrovic](https://github.com/lazar-mitrovic) in [graalvm/native-build-tools#256
-   Fix JUnit annotation scanning during the image build by [@&#8203;gradinac](https://github.com/gradinac) in [graalvm/native-build-tools#258
-   Change reachability metadata fallback path by [@&#8203;lazar-mitrovic](https://github.com/lazar-mitrovic) in [graalvm/native-build-tools#257
-   Add a DSL option that enables the native-image agent by [@&#8203;gradinac](https://github.com/gradinac) in [graalvm/native-build-tools#263
-   Bump dependency versions by [@&#8203;lazar-mitrovic](https://github.com/lazar-mitrovic) in [graalvm/native-build-tools#264
-   Rename `jvm-reachability-metadata` -> `graalvm-reachability-metadata` by [@&#8203;melix](https://github.com/melix) in [graalvm/native-build-tools#265
-   Final PR for the metadata repo by [@&#8203;vjovanov](https://github.com/vjovanov) in [graalvm/native-build-tools#266

##### New Contributors

-   [@&#8203;vjovanov](https://github.com/vjovanov) made their first contribution in [graalvm/native-build-tools#266

**Full Changelog**: graalvm/native-build-tools@0.9.12...0.9.13

</details>

---

### 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-tasks).
Shabirmean pushed a commit that referenced this pull request Nov 14, 2022
…711)

[![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:google-cloud-core](https://github.com/googleapis/java-core) | `2.1.3` -> `2.1.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.1.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.1.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.1.4/compatibility-slim/2.1.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.1.4/confidence-slim/2.1.3)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/java-core</summary>

### [`v2.1.4`](https://github.com/googleapis/java-core/blob/master/CHANGELOG.md#&#8203;214-httpswwwgithubcomgoogleapisjava-corecomparev213v214-2021-09-15)

[Compare Source](https://github.com/googleapis/java-core/compare/v2.1.3...v2.1.4)

</details>

---

### Configuration

📅 **Schedule**: 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, check this box.

---

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-dialogflow).
Shabirmean pushed a commit that referenced this pull request Nov 15, 2022
…711)

[![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:google-cloud-core](https://github.com/googleapis/java-core) | `2.1.3` -> `2.1.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.1.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.1.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.1.4/compatibility-slim/2.1.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.1.4/confidence-slim/2.1.3)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/java-core</summary>

### [`v2.1.4`](https://github.com/googleapis/java-core/blob/master/CHANGELOG.md#&#8203;214-httpswwwgithubcomgoogleapisjava-corecomparev213v214-2021-09-15)

[Compare Source](https://github.com/googleapis/java-core/compare/v2.1.3...v2.1.4)

</details>

---

### Configuration

📅 **Schedule**: 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, check this box.

---

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-dialogflow).
Shabirmean pushed a commit that referenced this pull request Nov 15, 2022
…1.0 (#711)

[![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://github.com/GoogleCloudPlatform/cloud-opensource-java) | `24.0.0` -> `24.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.0/compatibility-slim/24.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.0/confidence-slim/24.0.0)](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-document-ai).
Shabirmean pushed a commit that referenced this pull request Nov 15, 2022
…1.0 (#711)

[![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://github.com/GoogleCloudPlatform/cloud-opensource-java) | `24.0.0` -> `24.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.0/compatibility-slim/24.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.0/confidence-slim/24.0.0)](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-document-ai).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants