-
Notifications
You must be signed in to change notification settings - Fork 180
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
TableAdapter & TableAdapter2x Vaneer adaption #2006
Conversation
...base-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/adapters/admin/TableAdapter2x.java
Outdated
Show resolved
Hide resolved
...base-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/adapters/admin/TableAdapter2x.java
Outdated
Show resolved
Hide resolved
We should tag all adapters with an InternalAPI annotation, if one exists in GAX. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few small changes I'd like to see, but otherwise things look great.
...igtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/admin/TableAdapter.java
Outdated
Show resolved
Hide resolved
...igtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/admin/TableAdapter.java
Show resolved
Hide resolved
...igtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/admin/TableAdapter.java
Outdated
Show resolved
Hide resolved
...igtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/admin/TableAdapter.java
Outdated
Show resolved
Hide resolved
@@ -121,6 +123,7 @@ public AbstractBigtableAdmin(CommonConnection connection) throws IOException { | |||
disabledTables = connection.getDisabledTables(); | |||
bigtableInstanceName = options.getInstanceName(); | |||
tableAdapter = new TableAdapter(bigtableInstanceName); | |||
this.instanceName = InstanceName.of(bigtableInstanceName.getProjectId(), bigtableInstanceName.getInstanceId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please get the instance name from bigtableInstanceName.toGcbInstanceName()
, if it exists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently v2.models.CreateTableRequest
expects com.gogle.bigtable.admin.v2.InstanceName
.
and bigtableInstanceName.toGcbInstanceName()
returns v2.models.InstanceName
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh. Please add a bigtableInstanceName.toAdminInstanceName()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note that I will be removing Names from the google-cloud-java to avoid these kind of headaches.
What is toGcbInstanceName?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@igorbernstein2, We have a BigtableInstanceName
in this repo. toGcbInstanceName
converts the BigtableInstanceName
to an InstanceName
. See here.
...arent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableAdmin.java
Outdated
Show resolved
Hide resolved
...arent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableAdmin.java
Outdated
Show resolved
Hide resolved
...arent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableAdmin.java
Outdated
Show resolved
Hide resolved
.../bigtable-hbase-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/BigtableAsyncAdmin.java
Outdated
Show resolved
Hide resolved
...base-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/adapters/admin/TableAdapter2x.java
Outdated
Show resolved
Hide resolved
@rahulKQL, it looks like the GCRule object has issues: googleapis/google-cloud-java#4057. Please add unit tests to TableAdapter. |
...se/src/main/java/com/google/cloud/bigtable/hbase/adapters/admin/ColumnDescriptorAdapter.java
Show resolved
Hide resolved
...se/src/main/java/com/google/cloud/bigtable/hbase/adapters/admin/ColumnDescriptorAdapter.java
Outdated
Show resolved
Hide resolved
...igtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/admin/TableAdapter.java
Outdated
Show resolved
Hide resolved
@@ -121,6 +123,7 @@ public AbstractBigtableAdmin(CommonConnection connection) throws IOException { | |||
disabledTables = connection.getDisabledTables(); | |||
bigtableInstanceName = options.getInstanceName(); | |||
tableAdapter = new TableAdapter(bigtableInstanceName); | |||
this.instanceName = InstanceName.of(bigtableInstanceName.getProjectId(), bigtableInstanceName.getInstanceId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note that I will be removing Names from the google-cloud-java to avoid these kind of headaches.
What is toGcbInstanceName?
@sduskis @igorbernstein2 |
* adding TableAdapter and related changes * fixed typo error on InstanceId * removed unnecessart TODOs & reverted toColumnFamily * removed unused TableAdapter#adapt and added @internalapi * added Unit Tests, refactored varible name & unused methods
This PR containes changes related to:
TableAdapter
&TableAdapter2x
to adapt tov2.models.CreateTableRequest
.ColumnDescriptorAdapter#buildGarbageCollectionRule
to adapt tov2.models.GCRules.GCRule
.hbase1_x.BigtableAdmin
,hbase2_x.BigtableAdmin
&AbstractBigtableAdmin
containstoProto()
& TOODs, which will be removed with Admin method changes #1985.