|
1 | 1 | # Getting Started with Cloud Spanner and the Google Cloud Client libraries
|
2 | 2 |
|
3 |
| -<a href="https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/java-docs-samples&page=editor&open_in_editor=spanner/cloud-client/README.md"> |
4 |
| -<img alt="Open in Cloud Shell" src ="http://gstatic.com/cloudssh/images/open-btn.png"></a> |
5 |
| - |
6 |
| -[Cloud Spanner][Spanner] is a horizontally-scalable database-as-a-service |
7 |
| -with transactions and SQL support. |
8 |
| -These sample Java applications demonstrate how to access the Spanner API using |
9 |
| -the [Google Cloud Client Library for Java][google-cloud-java]. |
10 |
| - |
11 |
| -[Spanner]: https://cloud.google.com/spanner/ |
12 |
| -[google-cloud-java]: https://github.com/GoogleCloudPlatform/google-cloud-java |
13 |
| - |
14 |
| -## Quickstart |
15 |
| - |
16 |
| -Install [Maven](http://maven.apache.org/). |
17 |
| - |
18 |
| -Build your project with: |
19 |
| - |
20 |
| - mvn clean package -DskipTests |
21 |
| - |
22 |
| -You can then run a given `ClassName` via: |
23 |
| - |
24 |
| - mvn exec:java -Dexec.mainClass=com.example.spanner.ClassName \ |
25 |
| - -DpropertyName=propertyValue \ |
26 |
| - -Dexec.args="any arguments to the app" |
27 |
| - |
28 |
| -### Running a simple query (using the quickstart sample) |
29 |
| - |
30 |
| - mvn exec:java -Dexec.mainClass=com.example.spanner.QuickstartSample -Dexec.args="my-instance my-database" |
31 |
| - |
32 |
| -## Tutorial |
33 |
| - |
34 |
| -### Running the tutorial |
35 |
| - mvn exec:java -Dexec.mainClass=com.example.spanner.SpannerSample -Dexec.args="<command> my-instance my-database" |
36 |
| - |
37 |
| -## Tracing sample |
38 |
| -TracingSample.java demonstrates how to export traces generated by client library to StackDriver and to /tracez page. |
39 |
| - |
40 |
| -### Running the tracing sample |
41 |
| - mvn exec:java -Dexec.mainClass=com.example.spanner.TracingSample -Dexec.args="my-instance my-database" |
42 |
| - |
43 |
| -## Test |
44 |
| - mvn verify -Dspanner.test.instance=<instance id> -Dspanner.sample.database=<new database id> -Dspanner.quickstart.database=<existing database id> |
| 3 | +These samples have moved to https://github.com/googleapis/java-spanner/tree/master/samples |
0 commit comments