Skip to content

Commit e96a6ad

Browse files
hegemonicwaprin
authored andcommitted
Clean up branding, and fix some typos (#991)
1 parent eb51dc3 commit e96a6ad

File tree

3 files changed

+26
-26
lines changed

3 files changed

+26
-26
lines changed

bigtable/autoscaler/README.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ Google Cloud Bigtable Python Samples
66
This directory contains samples for Google Cloud Bigtable. `Google Cloud Bigtable`_ is Google's NoSQL Big Data database service. It's the same database that powers many core Google services, including Search, Analytics, Maps, and Gmail.
77

88

9-
This sample demonstrates using `Stackdriver monitoring`_,
9+
This sample demonstrates how to use `Stackdriver Monitoring`_
1010
to scale Cloud Bigtable based on CPU usage.
1111

12-
.. _Stackdriver Monitoring: http://cloud.google.com/monitoring/docs
12+
.. _Stackdriver Monitoring: http://cloud.google.com/monitoring/docs/
1313

1414

15-
.. _Google Cloud Bigtable: https://cloud.google.com/bigtable/docs
15+
.. _Google Cloud Bigtable: https://cloud.google.com/bigtable/docs/
1616

1717
Setup
1818
-------------------------------------------------------------------------------
@@ -90,7 +90,7 @@ To run this sample:
9090
[--short_sleep SHORT_SLEEP] [--long_sleep LONG_SLEEP]
9191
bigtable_instance bigtable_cluster
9292
93-
Scales Bigtable clusters based on CPU usage.
93+
Scales Cloud Bigtable clusters based on CPU usage.
9494
9595
positional arguments:
9696
bigtable_instance ID of the Cloud Bigtable instance to connect to.
@@ -99,11 +99,11 @@ To run this sample:
9999
optional arguments:
100100
-h, --help show this help message and exit
101101
--high_cpu_threshold HIGH_CPU_THRESHOLD
102-
If Bigtable CPU usages is above this threshold, scale
103-
up
102+
If Cloud Bigtable CPU usage is above this threshold,
103+
scale up
104104
--low_cpu_threshold LOW_CPU_THRESHOLD
105-
If Bigtable CPU usages is above this threshold, scale
106-
up
105+
If Cloud Bigtable CPU usage is below this threshold,
106+
scale down
107107
--short_sleep SHORT_SLEEP
108108
How long to sleep in seconds between checking metrics
109109
after no scale operation

bigtable/autoscaler/README.rst.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
product:
44
name: Google Cloud Bigtable
55
short_name: Cloud Bigtable
6-
url: https://cloud.google.com/bigtable/docs
6+
url: https://cloud.google.com/bigtable/docs/
77
description: >
88
`Google Cloud Bigtable`_ is Google's NoSQL Big Data database service. It's
99
the same database that powers many core Google services, including Search,
1010
Analytics, Maps, and Gmail.
1111

1212
description: |
13-
This sample demonstrates using `Stackdriver monitoring`_,
13+
This sample demonstrates how to use `Stackdriver Monitoring`_
1414
to scale Cloud Bigtable based on CPU usage.
1515

16-
.. _Stackdriver Monitoring: http://cloud.google.com/monitoring/docs
16+
.. _Stackdriver Monitoring: http://cloud.google.com/monitoring/docs/
1717

1818
setup:
1919
- auth

bigtable/autoscaler/autoscaler.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
"""Sample that demonstrates how to use Bigtable Stackdriver metrics to
16-
autoscale Google Cloud Bigtable."""
15+
"""Sample that demonstrates how to use Stackdriver Monitoring metrics to
16+
programmatically scale a Google Cloud Bigtable cluster."""
1717

1818
import argparse
1919
import time
@@ -25,10 +25,10 @@
2525

2626

2727
def get_cpu_load():
28-
"""Returns the most recent Bigtable CPU load measurement.
28+
"""Returns the most recent Cloud Bigtable CPU load measurement.
2929
3030
Returns:
31-
float: The most recent Bigtable CPU usage metric
31+
float: The most recent Cloud Bigtable CPU usage metric
3232
"""
3333
# [START bigtable_cpu]
3434
client = monitoring.Client()
@@ -40,16 +40,16 @@ def get_cpu_load():
4040

4141

4242
def scale_bigtable(bigtable_instance, bigtable_cluster, scale_up):
43-
"""Scales the number of Bigtable nodes up or down.
43+
"""Scales the number of Cloud Bigtable nodes up or down.
4444
45-
Edits the number of nodes in the Bigtable cluster to be increased
45+
Edits the number of nodes in the Cloud Bigtable cluster to be increased
4646
or decreased, depending on the `scale_up` boolean argument. Currently
4747
the `incremental` strategy from `strategies.py` is used.
4848
4949
5050
Args:
51-
bigtable_instance (str): Cloud Bigtable instance id to scale
52-
bigtable_cluster (str): Cloud Bigtable cluster id to scale
51+
bigtable_instance (str): Cloud Bigtable instance ID to scale
52+
bigtable_cluster (str): Cloud Bigtable cluster ID to scale
5353
scale_up (bool): If true, scale up, otherwise scale down
5454
"""
5555
# [START bigtable_scale]
@@ -87,14 +87,14 @@ def main(
8787
low_cpu_threshold,
8888
short_sleep,
8989
long_sleep):
90-
"""Main loop runner that autoscales Bigtable.
90+
"""Main loop runner that autoscales Cloud Bigtable.
9191
9292
Args:
93-
bigtable_instance (str): Cloud Bigtable instance id to autoscale
93+
bigtable_instance (str): Cloud Bigtable instance ID to autoscale
9494
high_cpu_threshold (float): If CPU is higher than this, scale up.
95-
low_cpu_threshold (float): If CPU is higher than this, scale down.
95+
low_cpu_threshold (float): If CPU is lower than this, scale down.
9696
short_sleep (int): How long to sleep after no operation
97-
long_sleep (int): How long to sleep after the cluster nodes are
97+
long_sleep (int): How long to sleep after the number of nodes is
9898
changed
9999
"""
100100
cluster_cpu = get_cpu_load()
@@ -112,7 +112,7 @@ def main(
112112

113113
if __name__ == '__main__':
114114
parser = argparse.ArgumentParser(
115-
description='Scales Bigtable clusters based on CPU usage.')
115+
description='Scales Cloud Bigtable clusters based on CPU usage.')
116116
parser.add_argument(
117117
'bigtable_instance',
118118
help='ID of the Cloud Bigtable instance to connect to.')
@@ -121,11 +121,11 @@ def main(
121121
help='ID of the Cloud Bigtable cluster to connect to.')
122122
parser.add_argument(
123123
'--high_cpu_threshold',
124-
help='If Bigtable CPU usages is above this threshold, scale up',
124+
help='If Cloud Bigtable CPU usage is above this threshold, scale up',
125125
default=0.6)
126126
parser.add_argument(
127127
'--low_cpu_threshold',
128-
help='If Bigtable CPU usages is above this threshold, scale up',
128+
help='If Cloud Bigtable CPU usage is below this threshold, scale down',
129129
default=0.2)
130130
parser.add_argument(
131131
'--short_sleep',

0 commit comments

Comments
 (0)