|
1 | 1 | # Google Cloud Java Client for Bigtable Admin |
2 | 2 |
|
3 | | -Java idiomatic client for [Cloud Bigtable Admin][cloud-bigtable]. Please note that this client is under |
4 | | -heavy development and is not ready for production use. Please continue to use the |
5 | | -[HBase API client](https://github.com/GoogleCloudPlatform/cloud-bigtable-client) for production. |
6 | | - |
7 | | -[](http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/master.html) |
8 | | -[](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigtable-admin.svg) |
9 | | -[](https://www.codacy.com/app/mziccard/google-cloud-java) |
10 | | - |
11 | | -- [Product Documentation][bigtable-product-docs] |
12 | | -- [Client Library Documentation][bigtable-admin-client-lib-docs] |
13 | | - |
14 | | -> Note: This client is under heavy development and should not be used in production. |
15 | | -
|
16 | | -## Quickstart |
17 | | - |
18 | | -[//]: # ({x-version-update-start:google-cloud-bigtable-admin:released}) |
19 | | -If you are using Maven, add this to your pom.xml file |
20 | | -```xml |
21 | | -<dependency> |
22 | | - <groupId>com.google.cloud</groupId> |
23 | | - <artifactId>google-cloud-bigtable-admin</artifactId> |
24 | | - <version>0.76.0-alpha</version> |
25 | | -</dependency> |
26 | | -``` |
27 | | -If you are using Gradle, add this to your dependencies |
28 | | -```Groovy |
29 | | -compile 'com.google.cloud:google-cloud-bigtable-admin:0.76.0-alpha' |
30 | | -``` |
31 | | -If you are using SBT, add this to your dependencies |
32 | | -```Scala |
33 | | -libraryDependencies += "com.google.cloud" % "google-cloud-bigtable-admin" % "0.76.0-alpha" |
34 | | -``` |
35 | | -[//]: # ({x-version-update-end}) |
36 | | - |
37 | | -## Authentication |
38 | | - |
39 | | -See the |
40 | | -[Authentication](https://github.com/GoogleCloudPlatform/google-cloud-java#authentication) |
41 | | -section in the base directory's README. |
42 | | - |
43 | | -## About Cloud Bigtable Admin |
44 | | - |
45 | | -[Cloud Bigtable][cloud-bigtable] is Google's NoSQL Big Data database service. It's |
46 | | -the same database that powers many core Google services, including Search, Analytics, Maps, and |
47 | | -Gmail. The API is split into the data api and the admin api. This client targets the admin api. |
48 | | - |
49 | | -Be sure to activate the Cloud Bigtable Admin API on the Developer's Console to use Cloud Bigtable |
50 | | -from your project. |
51 | | - |
52 | | -See the [Bigtable Amin client lib docs][bigtable-admin-client-lib-docs] to learn how to |
53 | | -interact with Cloud Bigtable Admin API using this Client Library. |
54 | | - |
55 | | -## Getting Started |
56 | | -#### Prerequisites |
57 | | -For this tutorial, you will need a |
58 | | -[Google Developers Console](https://console.developers.google.com/) project with the Cloud Bigtable |
59 | | -API enabled. You will need to |
60 | | -[enable billing](https://support.google.com/cloud/answer/6158867?hl=en) to use Google Cloud Bigtable. |
61 | | -[Follow these instructions](https://cloud.google.com/resource-manager/docs/creating-managing-projects) to get your |
62 | | -project set up. You will also need to set up the local development environment by [installing the |
63 | | -Google Cloud SDK](https://cloud.google.com/sdk/) and running the following commands in command line: |
64 | | -`gcloud auth login`. |
65 | | - |
66 | | -#### Calling Cloud Bigtable |
67 | | - |
68 | | -The Cloud Bigtable API is split into 2 parts: Data API, Instance Admin API and Table Admin API. |
69 | | - |
70 | | -Here is a code snippet showing simple usage of the Table API. Add the following imports |
71 | | -at the top of your file: |
72 | | - |
73 | | - |
74 | | -```java |
75 | | -import static com.google.cloud.bigtable.admin.v2.models.GCRules.GCRULES; |
76 | | -import com.google.bigtable.admin.v2.InstanceName; |
77 | | -import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; |
78 | | -import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; |
79 | | -import com.google.cloud.bigtable.admin.v2.models.Table; |
80 | | -``` |
81 | | - |
82 | | -Then, to create a table, use the following code: |
83 | | -```java |
84 | | -InstanceName instanceName = InstanceName.of("my-project", "my-instance"); |
85 | | - |
86 | | -BigtableTableAdminClient tableAdminClient = BigtableTableAdminClient.create(instanceName); |
87 | | - |
88 | | -try { |
89 | | - Table createdTable = tableAdminClient.createTable( |
90 | | - CreateTableRequest.of("my-table") |
91 | | - .addFamily("cf2", GCRULES.maxVersions(10)); |
92 | | -} finally { |
93 | | - tableAdminClient.close(); |
94 | | -} |
95 | | -``` |
96 | | - |
97 | | -## Troubleshooting |
98 | | - |
99 | | -To get help, follow the instructions in the [shared Troubleshooting |
100 | | -document](https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting). |
101 | | - |
102 | | -Transport |
103 | | ---------- |
104 | | -Bigtable uses gRPC for the transport layer. |
105 | | - |
106 | | -## Java Versions |
107 | | - |
108 | | -Java 7 or above is required for using this client. |
109 | | - |
110 | | -## Versioning |
111 | | - |
112 | | -This library follows [Semantic Versioning](http://semver.org/). |
113 | | - |
114 | | -It is currently in major version zero (`0.y.z`), which means that anything may |
115 | | -change at any time and the public API should not be considered stable. |
116 | | - |
117 | | -## Contributing |
118 | | - |
119 | | -Contributions to this library are always welcome and highly encouraged. |
120 | | - |
121 | | -See [CONTRIBUTING] for more information on how to get started and [DEVELOPING] for a layout of the |
122 | | -codebase. |
123 | | - |
124 | | -## License |
125 | | - |
126 | | -Apache 2.0 - See [LICENSE] for more information. |
127 | | - |
128 | | -[CONTRIBUTING]:https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/CONTRIBUTING.md |
129 | | -[LICENSE]: https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/LICENSE |
130 | | -[cloud-platform]: https://cloud.google.com/ |
131 | | -[cloud-bigtable]: https://cloud.google.com/bigtable/ |
132 | | -[bigtable-product-docs]: https://cloud.google.com/bigtable/docs/ |
133 | | -[bigtable-admin-client-lib-docs]: https://googleapis.github.io/google-cloud-java/google-cloud-clients/apidocs/index.html?com/google/cloud/bigtable/admin/v2/package-summary.html |
| 3 | +This project has been merged into google-cloud-bigtable and will soon |
| 4 | +be deleted. |
0 commit comments