@@ -487,6 +487,120 @@ internal legacy files.
487487
488488</details >
489489
490+ <details >
491+ <summary >Removed <code >bigtable::AdminClient</code > and <code >bigtable::TableAdmin</code ></summary >
492+
493+ The ` bigtable::AdminClient ` class and ` bigtable::TableAdmin ` class have been
494+ replaced with ` bigtable_admin::BigtableTableAdminClient ` .
495+
496+ ** Before:**
497+
498+ ``` cpp
499+
500+ std::shared_ptr<bigtable::AdminClient> admin_client =
501+ bigtable::MakeAdminClient ("project-id");
502+ auto table_admin = std::make_unique< bigtable::TableAdmin > (
503+ admin_client, "instance-id");
504+
505+ // Drop a selection of rows by key prefix.
506+ auto result = table_admin.DropRowByPrefix("table-id", "row-key-prefix");
507+
508+ // Drop all rows.
509+ result = table_admin.DropAllRows("table-id");
510+ ```
511+
512+ **After:**
513+
514+ ```cpp
515+ #include "google/cloud/bigtable/admin/bigtable_table_admin_client.h"
516+
517+ auto table_admin = bigtable_admin::BigtableTableAdminClient(
518+ bigtable_admin::MakeBigtableAdminConnection());
519+ auto table_name = bigtable::TableName("project-id", "instance-id", "table-id");
520+
521+ // Drop a selection of rows by key prefix.
522+ google::bigtable::admin::v2::DropRowRangeRequest drop_rows_by_prefix;
523+ drop_rows_by_prefix.set_name(table_name);
524+ drop_rows_by_prefix.set_row_key_prefix("row-key-prefix");
525+ auto result = table_admin.DropRowRange(drop_rows_by_prefix);
526+
527+ // Drop all rows.
528+ google::bigtable::admin::v2::DropRowRangeRequest drop_all_rows;
529+ drop_all_rows.set_name(table_name);
530+ drop_all_rows.set_delete_all_data_from_table(true);
531+ result = table_admin.DropRowRange(drop_all_rows);
532+ ```
533+
534+ </details >
535+
536+ <details ><summary ><code >WaitForConsistency</code > is now a free function</summary >
537+
538+ With the removal of the ` bigtable::TableAdmin ` class, ` WaitForConsistency ` is
539+ now a free function.
540+
541+ ** Before:**
542+
543+ ``` cpp
544+
545+ std::shared_ptr<bigtable::AdminClient> admin_client =
546+ bigtable::MakeAdminClient ("project-id");
547+ auto table_admin = std::make_unique< bigtable::TableAdmin > (
548+ admin_client, "instance-id");
549+
550+ auto token = table_admin.GenerateConsistencyToken("table-id");
551+ if (!token) throw std::runtime_error(token.status().message());
552+ auto result = table_admin.WaitForConsistency("table-id", * token);
553+ ```
554+
555+ **After:**
556+
557+ ```cpp
558+ #include "google/cloud/bigtable/admin/bigtable_table_admin_client.h"
559+ #include "google/cloud/bigtable/wait_for_consistency.h"
560+
561+ auto connection = bigtable_admin::MakeBigtableAdminConnection();
562+ auto table_admin = bigtable_admin::BigtableTableAdminClient(connection);
563+ auto table_name = bigtable::TableName("project-id", "instance-id", "table-id");
564+
565+ auto token = table_admin.GenerateConsistencyToken(table_name);
566+ if (!token) throw std::runtime_error(token.status().message());
567+ auto result = bigtable_admin::WaitForConsistency(connection, table_name,
568+ token->consistency_token());
569+ ```
570+
571+ </details >
572+
573+ <details >
574+ <summary >Removed <code >bigtable::InstanceAdminClient</code > and <code >bigtable::InstanceAdmin</code ></summary >
575+
576+ The ` bigtable::InstanceAdminClient ` class and ` bigtable::InstanceAdmin ` class
577+ have been replaced with ` bigtable_admin::BigtableInstanceAdminClient ` .
578+
579+ ** Before:**
580+
581+ ``` cpp
582+ auto instance_admin_client = bigtable::MakeInstanceAdminClient(" project-id" );
583+ auto instance_admin =
584+ std::make_unique<bigtable::InstanceAdmin>(instance_admin_client);
585+
586+ auto clusters = instance_admin->ListClusters ();
587+ ```
588+
589+ ** After:**
590+
591+ ``` cpp
592+ #include " google/cloud/bigtable/admin/bigtable_instance_admin_client.h"
593+
594+ auto instance_admin =
595+ std::make_unique<bigtable_admin::BigtableInstanceAdminClient>(
596+ bigtable_admin::MakeBigtableInstanceAdminConnection ());
597+
598+ auto clusters = instance_admin->ListClusters (
599+ InstanceName("project-id", "instance-id"));
600+ ```
601+
602+ </details>
603+
490604### Pubsub
491605
492606<details>
0 commit comments