-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bigtable: Merge bigtable-admin into the bigtable artifact (#4307)
* Bigtable: merge bigtable-admin into the bigtable artifact * split exclusion change for future PR * fix admin pathes * fix deprecation warning * fix synth script * fix generated file * temporarily re-add kokoro scripts (and point them to the merged artifact) until the jobs have been removed * Remove dep from examples * fix admin integration tests * revert stray fix (will be added to a separate PR) * fix int tests * don't double format the code * fix up docs
- Loading branch information
1 parent
4aa0737
commit 91477f0
Showing
74 changed files
with
139 additions
and
362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
133 changes: 2 additions & 131 deletions
133
google-cloud-clients/google-cloud-bigtable-admin/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,133 +1,4 @@ | ||
# Google Cloud Java Client for Bigtable Admin | ||
|
||
Java idiomatic client for [Cloud Bigtable Admin][cloud-bigtable]. Please note that this client is under | ||
heavy development and is not ready for production use. Please continue to use the | ||
[HBase API client](https://github.com/GoogleCloudPlatform/cloud-bigtable-client) for production. | ||
|
||
[![Kokoro CI](http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/master.svg)](http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/master.html) | ||
[![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigtable.svg)](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigtable-admin.svg) | ||
[![Codacy Badge](https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917)](https://www.codacy.com/app/mziccard/google-cloud-java) | ||
|
||
- [Product Documentation][bigtable-product-docs] | ||
- [Client Library Documentation][bigtable-admin-client-lib-docs] | ||
|
||
> Note: This client is under heavy development and should not be used in production. | ||
## Quickstart | ||
|
||
[//]: # ({x-version-update-start:google-cloud-bigtable-admin:released}) | ||
If you are using Maven, add this to your pom.xml file | ||
```xml | ||
<dependency> | ||
<groupId>com.google.cloud</groupId> | ||
<artifactId>google-cloud-bigtable-admin</artifactId> | ||
<version>0.76.0-alpha</version> | ||
</dependency> | ||
``` | ||
If you are using Gradle, add this to your dependencies | ||
```Groovy | ||
compile 'com.google.cloud:google-cloud-bigtable-admin:0.76.0-alpha' | ||
``` | ||
If you are using SBT, add this to your dependencies | ||
```Scala | ||
libraryDependencies += "com.google.cloud" % "google-cloud-bigtable-admin" % "0.76.0-alpha" | ||
``` | ||
[//]: # ({x-version-update-end}) | ||
|
||
## Authentication | ||
|
||
See the | ||
[Authentication](https://github.com/GoogleCloudPlatform/google-cloud-java#authentication) | ||
section in the base directory's README. | ||
|
||
## About Cloud Bigtable Admin | ||
|
||
[Cloud Bigtable][cloud-bigtable] is Google's NoSQL Big Data database service. It's | ||
the same database that powers many core Google services, including Search, Analytics, Maps, and | ||
Gmail. The API is split into the data api and the admin api. This client targets the admin api. | ||
|
||
Be sure to activate the Cloud Bigtable Admin API on the Developer's Console to use Cloud Bigtable | ||
from your project. | ||
|
||
See the [Bigtable Amin client lib docs][bigtable-admin-client-lib-docs] to learn how to | ||
interact with Cloud Bigtable Admin API using this Client Library. | ||
|
||
## Getting Started | ||
#### Prerequisites | ||
For this tutorial, you will need a | ||
[Google Developers Console](https://console.developers.google.com/) project with the Cloud Bigtable | ||
API enabled. You will need to | ||
[enable billing](https://support.google.com/cloud/answer/6158867?hl=en) to use Google Cloud Bigtable. | ||
[Follow these instructions](https://cloud.google.com/resource-manager/docs/creating-managing-projects) to get your | ||
project set up. You will also need to set up the local development environment by [installing the | ||
Google Cloud SDK](https://cloud.google.com/sdk/) and running the following commands in command line: | ||
`gcloud auth login`. | ||
|
||
#### Calling Cloud Bigtable | ||
|
||
The Cloud Bigtable API is split into 2 parts: Data API, Instance Admin API and Table Admin API. | ||
|
||
Here is a code snippet showing simple usage of the Table API. Add the following imports | ||
at the top of your file: | ||
|
||
|
||
```java | ||
import static com.google.cloud.bigtable.admin.v2.models.GCRules.GCRULES; | ||
import com.google.bigtable.admin.v2.InstanceName; | ||
import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; | ||
import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; | ||
import com.google.cloud.bigtable.admin.v2.models.Table; | ||
``` | ||
|
||
Then, to create a table, use the following code: | ||
```java | ||
InstanceName instanceName = InstanceName.of("my-project", "my-instance"); | ||
|
||
BigtableTableAdminClient tableAdminClient = BigtableTableAdminClient.create(instanceName); | ||
|
||
try { | ||
Table createdTable = tableAdminClient.createTable( | ||
CreateTableRequest.of("my-table") | ||
.addFamily("cf2", GCRULES.maxVersions(10)); | ||
} finally { | ||
tableAdminClient.close(); | ||
} | ||
``` | ||
|
||
## Troubleshooting | ||
|
||
To get help, follow the instructions in the [shared Troubleshooting | ||
document](https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting). | ||
|
||
Transport | ||
--------- | ||
Bigtable uses gRPC for the transport layer. | ||
|
||
## Java Versions | ||
|
||
Java 7 or above is required for using this client. | ||
|
||
## Versioning | ||
|
||
This library follows [Semantic Versioning](http://semver.org/). | ||
|
||
It is currently in major version zero (`0.y.z`), which means that anything may | ||
change at any time and the public API should not be considered stable. | ||
|
||
## Contributing | ||
|
||
Contributions to this library are always welcome and highly encouraged. | ||
|
||
See [CONTRIBUTING] for more information on how to get started and [DEVELOPING] for a layout of the | ||
codebase. | ||
|
||
## License | ||
|
||
Apache 2.0 - See [LICENSE] for more information. | ||
|
||
[CONTRIBUTING]:https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/CONTRIBUTING.md | ||
[LICENSE]: https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/LICENSE | ||
[cloud-platform]: https://cloud.google.com/ | ||
[cloud-bigtable]: https://cloud.google.com/bigtable/ | ||
[bigtable-product-docs]: https://cloud.google.com/bigtable/docs/ | ||
[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 | ||
This project has been merged into google-cloud-bigtable and will soon | ||
be deleted. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...le-admin/src/main/java/com/google/cloud/bigtable/admin/v2/internal/DeprecationMarker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2019 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.google.cloud.bigtable.admin.v2.internal; | ||
|
||
/** | ||
* Marker class whose existence can be used to detect uses of the deprecated | ||
* google-cloud-bigtable-admin artifact | ||
* | ||
* <p>This class is considered an internal implementation detail and not meant to be used by | ||
* applications. | ||
* | ||
* @deprecated Please migrate to using the google-cloud-bigtable artifact | ||
*/ | ||
@Deprecated | ||
public final class DeprecationMarker {} |
27 changes: 0 additions & 27 deletions
27
google-cloud-clients/google-cloud-bigtable-admin/synth.metadata
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.