Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions google-cloud-bigtable/conformance/known_failures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ TestMutateRow_Generic_DeadlineExceeded
TestMutateRow_Generic_CloseClient
TestMutateRows_Generic_DeadlineExceeded
TestMutateRows_Generic_CloseClient
TestMutateRows_NoRetry_MissingResponseEntry
TestReadModifyWriteRow_Generic_CloseClient
TestReadModifyWriteRow_Generic_DeadlineExceeded
TestReadRow_Generic_DeadlineExceeded
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ module Bigtable
#
# # Delete
# app_profile.delete
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
class AppProfile
# @private
Expand Down Expand Up @@ -119,6 +120,7 @@ def description
# Sets the description of the app profile.
#
# @param text [String] Description text
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def description= text
@grpc.description = text
Expand Down Expand Up @@ -190,6 +192,7 @@ def single_cluster_routing
# allow_transactional_writes: true
# )
# app_profile.routing_policy = routing_policy
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def routing_policy= policy
routing_policy_grpc = policy.to_grpc
Expand Down Expand Up @@ -261,6 +264,7 @@ def routing_policy
#
# # OR : Not ignoring warnings
# app_profile.delete
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def delete ignore_warnings: false
ensure_service!
Expand Down Expand Up @@ -324,6 +328,7 @@ def delete ignore_warnings: false
# app_profile = job.app_profile
# puts app_profile.name
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def save ignore_warnings: false
ensure_service!
Expand All @@ -338,6 +343,7 @@ def save ignore_warnings: false
# Reloads the app profile data.
#
# @return [Google::Cloud::Bigtable::AppProfile]
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def reload!
@grpc = service.get_app_profile instance_id, name
Expand Down Expand Up @@ -369,6 +375,7 @@ def reload!
# description: "App profile for user data instance"
# )
# puts app_profile.routing_policy
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def self.multi_cluster_routing
Google::Cloud::Bigtable::MultiClusterRoutingUseAny.new
Expand Down Expand Up @@ -408,6 +415,7 @@ def self.multi_cluster_routing
# description: "App profile for user data instance"
# )
# puts app_profile.routing_policy
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def self.single_cluster_routing cluster_id, allow_transactional_writes: false
Google::Cloud::Bigtable::SingleClusterRouting.new cluster_id, allow_transactional_writes
Expand Down
8 changes: 8 additions & 0 deletions google-cloud-bigtable/lib/google/cloud/bigtable/cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module Bigtable
#
# # Delete
# cluster.delete
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
class Cluster
# @private
Expand Down Expand Up @@ -160,6 +161,7 @@ def nodes
# throughput and more consistent performance.
#
# @param serve_nodes [Integer] Number of nodes
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def nodes= serve_nodes
@grpc.serve_nodes = serve_nodes
Expand Down Expand Up @@ -254,6 +256,7 @@ def kms_key
# else
# backup = job.backup
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
#
def create_backup source_table, backup_id, expire_time
source_table_id = source_table.respond_to?(:name) ? source_table.name : source_table
Expand Down Expand Up @@ -285,6 +288,7 @@ def create_backup source_table, backup_id, expire_time
# if backup
# puts backup.backup_id
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
#
def backup backup_id
grpc = service.get_backup instance_id, cluster_id, backup_id
Expand All @@ -309,6 +313,7 @@ def backup backup_id
# cluster.backups.all do |backup|
# puts backup.backup_id
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
#
def backups
grpc = service.list_backups instance_id, cluster_id
Expand Down Expand Up @@ -345,6 +350,7 @@ def backups
# else
# cluster = job.cluster
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def save
ensure_service!
Expand All @@ -357,6 +363,7 @@ def save
# Reloads cluster data.
#
# @return [Google::Cloud::Bigtable::Cluster]
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def reload!
@grpc = service.get_cluster instance_id, cluster_id
Expand All @@ -376,6 +383,7 @@ def reload!
# instance = bigtable.instance "my-instance"
# cluster = instance.cluster "my-cluster"
# cluster.delete
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def delete
ensure_service!
Expand Down
18 changes: 18 additions & 0 deletions google-cloud-bigtable/lib/google/cloud/bigtable/instance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ module Bigtable
# else
# instance = job.instance
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
class Instance
# @private
Expand Down Expand Up @@ -108,6 +109,7 @@ def display_name
# to avoid confusion.
#
# @param value [String] The descriptive name for the instance.
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def display_name= value
@grpc.display_name = value
Expand Down Expand Up @@ -209,6 +211,7 @@ def production?
# instance.type = :PRODUCTION
# instance.development? # false
# instance.production? # true
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def type= instance_type
@grpc.type = instance_type
Expand Down Expand Up @@ -240,6 +243,7 @@ def labels
# Sets the Cloud Labels for the instance.
#
# @param labels [Hash{String=>String}] The Cloud Labels.
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def labels= labels
labels ||= {}
Expand Down Expand Up @@ -285,6 +289,7 @@ def labels= labels
# puts instance.name
# puts instance.labels
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def save
ensure_service!
Expand All @@ -298,6 +303,7 @@ def save
# Reloads instance data.
#
# @return [Google::Cloud::Bigtable::Instance]
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def reload!
@grpc = service.get_instance instance_id
Expand All @@ -316,6 +322,7 @@ def reload!
#
# instance = bigtable.instance "my-instance"
# instance.delete
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def delete
ensure_service!
Expand Down Expand Up @@ -345,6 +352,7 @@ def delete
# instance.clusters.all do |cluster|
# puts cluster.cluster_id
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def clusters token: nil
ensure_service!
Expand All @@ -370,6 +378,7 @@ def clusters token: nil
#
# cluster = instance.cluster "my-cluster"
# puts cluster.cluster_id
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def cluster cluster_id
ensure_service!
Expand Down Expand Up @@ -422,6 +431,7 @@ def cluster cluster_id
# else
# cluster = job.cluster
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def create_cluster cluster_id, location, nodes: nil, storage_type: nil
ensure_service!
Expand Down Expand Up @@ -456,6 +466,7 @@ def create_cluster cluster_id, location, nodes: nil, storage_type: nil
# instance.tables.all do |table|
# puts table.name
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
#
def tables
ensure_service!
Expand Down Expand Up @@ -603,6 +614,7 @@ def table table_id, view: nil, perform_lookup: nil, app_profile_id: nil
# end
#
# puts table
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
#
def create_table name, column_families: nil, granularity: nil, initial_splits: nil, &block
ensure_service!
Expand Down Expand Up @@ -703,6 +715,7 @@ def create_table name, column_families: nil, granularity: nil, initial_splits: n
# ignore_warnings: true
# )
# puts app_profile.name
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def create_app_profile name, routing_policy, description: nil, etag: nil, ignore_warnings: false
ensure_service!
Expand Down Expand Up @@ -750,6 +763,7 @@ def create_app_profile name, routing_policy, description: nil, etag: nil, ignore
# if app_profile
# puts app_profile.name
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def app_profile app_profile_id
ensure_service!
Expand Down Expand Up @@ -778,6 +792,7 @@ def app_profile app_profile_id
# instance.app_profiles.all do |app_profile|
# puts app_profile.name
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def app_profiles
ensure_service!
Expand Down Expand Up @@ -817,6 +832,7 @@ def app_profiles
# instance.policy do |p|
# p.add "roles/owner", "user:owner@example.com"
# end # 2 API calls
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def policy
ensure_service!
Expand Down Expand Up @@ -853,6 +869,7 @@ def policy
# updated_policy = instance.update_policy policy
#
# puts updated_policy.roles
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def update_policy new_policy
ensure_service!
Expand Down Expand Up @@ -897,6 +914,7 @@ def update_policy new_policy
# )
# permissions.include? "bigtable.instances.get" #=> true
# permissions.include? "bigtable.instances.update" #=> false
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def test_iam_permissions *permissions
ensure_service!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ module Bigtable
# policy.remove "roles/owner", "user:owner@example.com"
# policy.add "roles/owner", "user:newowner@example.com"
# policy.roles["roles/viewer"] = ["allUsers"]
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} or {Google::Cloud::Bigtable::Project#table_admin_client} instead.
#
class Policy
attr_reader :etag
Expand Down
8 changes: 8 additions & 0 deletions google-cloud-bigtable/lib/google/cloud/bigtable/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def project_id
# instances.all do |instance|
# puts instance.instance_id
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def instances token: nil
ensure_service!
Expand All @@ -157,6 +158,7 @@ def instances token: nil
# if instance
# puts instance.instance_id
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def instance instance_id
ensure_service!
Expand Down Expand Up @@ -257,6 +259,7 @@ def instance instance_id
# else
# instance = job.instance
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def create_instance instance_id, display_name: nil, type: nil, labels: nil, clusters: nil
labels = labels.to_h { |k, v| [String(k), String(v)] } if labels
Expand Down Expand Up @@ -291,6 +294,7 @@ def create_instance instance_id, display_name: nil, type: nil, labels: nil, clus
# puts cluster.cluster_id
# puts cluster.ready?
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
def clusters token: nil
ensure_service!
Expand All @@ -314,6 +318,7 @@ def clusters token: nil
# puts table.name
# puts table.column_families
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
#
def tables instance_id
ensure_service!
Expand Down Expand Up @@ -455,6 +460,7 @@ def table instance_id, table_id, view: nil, perform_lookup: nil, app_profile_id:
# end
#
# puts table
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
#
def create_table instance_id, table_id, column_families: nil, granularity: nil, initial_splits: nil, &block
ensure_service!
Expand Down Expand Up @@ -483,6 +489,7 @@ def create_table instance_id, table_id, column_families: nil, granularity: nil,
# bigtable = Google::Cloud::Bigtable.new
#
# bigtable.delete_table "my-instance", "my-table"
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
#
def delete_table instance_id, table_id
service.delete_table instance_id, table_id
Expand Down Expand Up @@ -535,6 +542,7 @@ def delete_table instance_id, table_id
# else
# backup = job.backup
# end
# @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead.
#
def copy_backup dest_project_id:, dest_instance_id:, dest_cluster_id:, new_backup_id:,
source_instance_id:, source_cluster_id:, source_backup_id:, expire_time:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ module Bigtable
# description: "App profile for user data instance"
# )
# puts app_profile.routing_policy
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
class RoutingPolicy
end
Expand Down Expand Up @@ -95,6 +96,7 @@ class RoutingPolicy
# description: "App profile for user data instance"
# )
# puts app_profile.routing_policy
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
class MultiClusterRoutingUseAny < RoutingPolicy
# @private
Expand Down Expand Up @@ -139,6 +141,7 @@ def to_grpc
# allowed by this app profile. It is unsafe to send these requests to
# the same table/row/column in multiple clusters.
# Default value is false.
# @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead.
#
class SingleClusterRouting < RoutingPolicy
attr_reader :cluster_id
Expand Down
Loading