Skip to content

Conversation

@coryan
Copy link
Contributor

@coryan coryan commented Jan 6, 2018

There was a certain amount of duplication in these classes. This
change fixes that. As a side-effect, it fixes #107 too.

This change does not attempt to use both classes the same way,
though we should: I do not want to introduce more changes in a
PR that basically refactors things.

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. labels Jan 6, 2018
@coryan
Copy link
Contributor Author

coryan commented Jan 11, 2018

Ping.

@coryan coryan assigned garye and unassigned carterpage Jan 18, 2018
@coryan
Copy link
Contributor Author

coryan commented Jan 18, 2018

@garye can you take a look? @carterpage got busy (as he should) and can no longer do reviews.

channel_.reset();
}

StubPtr Stub() {
Copy link

Choose a reason for hiding this comment

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

Worth talking about the thread safey or lack thereof in these interfaces? Not sure if we do that throughout...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Absolutely worth it. This is the only interface so far that may be used in multiple threads. The intention is to make them thread-safe after refactoring.

::google::bigtable::admin::v2::BigtableTableAdmin::NewStub(channel);
channel_ = std::move(channel);
}
SimpleAdminClient(std::string project, bigtable::ClientOptions options)
Copy link

Choose a reason for hiding this comment

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

Why Simple AdminClient and Default DataClient? Are they both the default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed (assuming it compiles and stuff).

There was a certain amount of duplication in these classes. This
change fixes that.  As a side-effect, it fixes googleapis#107 too.

This change does not attempt to *use* both classes the same way,
though we should, I do not want to introduce more changes in a
PR that basically refactors things.
Use CreateDefault*Client instead of some with Default and some
without.  Also use Default*Client instead of Simple*Client for
one and Default*Client for the other.  Thanks to @garye for
noticing.
@coryan coryan merged commit 0518a0a into googleapis:master Jan 21, 2018
@coryan coryan deleted the refactor-clients branch January 21, 2018 05:02
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.

Make behavior of bigtable::AdminClient observable for tests.

4 participants