Skip to content

Commit

Permalink
hegemonic review
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Prin committed Jun 27, 2017
1 parent f2c39df commit 7567331
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bigtable/metricscaler/metricscaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
The minimum number of nodes to use. The default minimum is 3. If you have a
lot of data, the rule of thumb is to not go below 2.5 TB per node for SSD
clusters, and 8 TB for HDD. The bigtable.googleapis.com/disk/bytes_used
metric is useful in figuring out the minimum number.
of nodes.
metric is useful in figuring out the minimum number of nodes.
"""

_MAX_NODE_COUNT = 30
Expand Down Expand Up @@ -85,15 +84,15 @@ def scale_bigtable(bigtable_instance, bigtable_cluster, scale_up):
new_node_count = min(current_node_count + 3, _MAX_NODE_COUNT)
cluster.serve_nodes = new_node_count
cluster.update()
print('Scaled up from {} up to {} nodes.'.format(
print('Scaled up from {} to {} nodes.'.format(
current_node_count, new_node_count))
else:
if current_node_count > _MIN_NODE_COUNT:
new_node_count = max(
current_node_count - _SIZE_CHANGE_STEP, _MIN_NODE_COUNT)
cluster.serve_nodes = new_node_count
cluster.update()
print('Scaled down from {} up to {} nodes.'.format(
print('Scaled down from {} to {} nodes.'.format(
current_node_count, new_node_count))
# [END bigtable_scale]

Expand Down

0 comments on commit 7567331

Please sign in to comment.