Class: Google::Cloud::Bigtable::Table::ClusterState
- Inherits:
-
Object
- Object
- Google::Cloud::Bigtable::Table::ClusterState
- Defined in:
- lib/google/cloud/bigtable/table/cluster_state.rb
Overview
Table::ClusterState is the state of a table's data in a particular cluster.
Instance Attribute Summary collapse
-
#cluster_name ⇒ String
The name of the cluster.
Instance Method Summary collapse
-
#encryption_infos ⇒ Array<Google::Cloud::Bigtable::EncryptionInfo>
The encryption info value objects for the table in this cluster.
-
#initializing? ⇒ Boolean
The cluster was recently created, and the table must finish copying over pre-existing data from other clusters before it can begin receiving live replication updates and serving.
-
#planned_maintenance? ⇒ Boolean
The table is temporarily unable to serve requests from this cluster due to planned internal maintenance.
-
#ready? ⇒ Boolean
The table can serve requests from this cluster.
-
#ready_optimizing? ⇒ Boolean
The table is fully created and ready for use after a restore, and is being optimized for performance.
-
#replication_state ⇒ Symbol
The state of replication for the table in this cluster.
-
#unplanned_maintenance? ⇒ Boolean
The table is temporarily unable to serve requests from this cluster due to unplanned or emergency maintenance.
Instance Attribute Details
#cluster_name ⇒ String
The name of the cluster.
42 43 44 |
# File 'lib/google/cloud/bigtable/table/cluster_state.rb', line 42 def cluster_name @cluster_name end |
Instance Method Details
#encryption_infos ⇒ Array<Google::Cloud::Bigtable::EncryptionInfo>
The encryption info value objects for the table in this cluster. The encryption info
is only present when the table view is ENCRYPTION_VIEW
or FULL
. See also
Instance::ClusterMap#add.
142 143 144 |
# File 'lib/google/cloud/bigtable/table/cluster_state.rb', line 142 def encryption_infos @grpc.encryption_info.map { |ei_grpc| Google::Cloud::Bigtable::EncryptionInfo.from_grpc ei_grpc } end |
#initializing? ⇒ Boolean
The cluster was recently created, and the table must finish copying over pre-existing data from other clusters before it can begin receiving live replication updates and serving.
83 84 85 |
# File 'lib/google/cloud/bigtable/table/cluster_state.rb', line 83 def initializing? replication_state == :INITIALIZING end |
#planned_maintenance? ⇒ Boolean
The table is temporarily unable to serve requests from this cluster due to planned internal maintenance.
94 95 96 |
# File 'lib/google/cloud/bigtable/table/cluster_state.rb', line 94 def planned_maintenance? replication_state == :PLANNED_MAINTENANCE end |
#ready? ⇒ Boolean
The table can serve requests from this cluster. Depending on replication delay, reads may not immediately reflect the state of the table in other clusters.
117 118 119 |
# File 'lib/google/cloud/bigtable/table/cluster_state.rb', line 117 def ready? replication_state == :READY end |
#ready_optimizing? ⇒ Boolean
The table is fully created and ready for use after a
restore, and is being optimized for performance. When
optimizations are complete, the table will transition to READY
state.
130 131 132 |
# File 'lib/google/cloud/bigtable/table/cluster_state.rb', line 130 def ready_optimizing? replication_state == :READY_OPTIMIZING end |
#replication_state ⇒ Symbol
The state of replication for the table in this cluster. Valid values include:
:INITIALIZING
- The cluster was recently created.:PLANNED_MAINTENANCE
- The table is temporarily unable to serve.:UNPLANNED_MAINTENANCE
- The table is temporarily unable to serve.:READY
- The table can serve.:READY_OPTIMIZING
- The table is fully created and ready for use after a restore, and is being optimized for performance. When optimizations are complete, the table will transition toREADY
state.:STATE_NOT_KNOWN
- If replication state is not present in the object because the table view is notREPLICATION_VIEW
orFULL
.:UNKNOWN
- If it could not be determined whether or not the table has data in a particular cluster (for example, if its zone is unavailable.)
71 72 73 |
# File 'lib/google/cloud/bigtable/table/cluster_state.rb', line 71 def replication_state @grpc.replication_state end |
#unplanned_maintenance? ⇒ Boolean
The table is temporarily unable to serve requests from this cluster due to unplanned or emergency maintenance.
105 106 107 |
# File 'lib/google/cloud/bigtable/table/cluster_state.rb', line 105 def unplanned_maintenance? replication_state == :UNPLANNED_MAINTENANCE end |