From 6a9b2d6cc8b6b9c219a1e187135f95169e44f179 Mon Sep 17 00:00:00 2001 From: Charles Engelke Date: Mon, 18 Mar 2019 14:38:47 -0700 Subject: [PATCH 1/6] New library version to address failure. --- bigtable/hello_happybase/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigtable/hello_happybase/requirements.txt b/bigtable/hello_happybase/requirements.txt index a667ebb828b..a144f03e1bc 100644 --- a/bigtable/hello_happybase/requirements.txt +++ b/bigtable/hello_happybase/requirements.txt @@ -1 +1 @@ -google-cloud-happybase==0.32.1 +google-cloud-happybase==0.33.0 From cf27412d02ce9ab1d460aeba5bdc354d1846d185 Mon Sep 17 00:00:00 2001 From: Charles Engelke Date: Mon, 18 Mar 2019 15:20:51 -0700 Subject: [PATCH 2/6] Encoded strings for library call --- bigtable/hello_happybase/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigtable/hello_happybase/main.py b/bigtable/hello_happybase/main.py index 0668402f895..10fbd977569 100644 --- a/bigtable/hello_happybase/main.py +++ b/bigtable/hello_happybase/main.py @@ -72,7 +72,7 @@ def main(project_id, instance_id, table_name): # # https://cloud.google.com/bigtable/docs/schema-design row_key = 'greeting{}'.format(i) - table.put(row_key, {column_name: value}) + table.put(row_key, {column_name.encode('utf-8'): value.encode('utf-8')}) # [END writing_rows] # [START getting_a_row] From a78fa2589464add1715d71ac1f531e57fa477447 Mon Sep 17 00:00:00 2001 From: Charles Engelke Date: Mon, 18 Mar 2019 16:21:32 -0700 Subject: [PATCH 3/6] Give changes a bit longer to finish --- bigtable/metricscaler/metricscaler_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bigtable/metricscaler/metricscaler_test.py b/bigtable/metricscaler/metricscaler_test.py index 129daee6781..f4a18b8418b 100644 --- a/bigtable/metricscaler/metricscaler_test.py +++ b/bigtable/metricscaler/metricscaler_test.py @@ -46,14 +46,14 @@ def test_scale_bigtable(): scale_bigtable(BIGTABLE_INSTANCE, BIGTABLE_INSTANCE, True) - time.sleep(3) + time.sleep(10) cluster.reload() new_node_count = cluster.serve_nodes assert (new_node_count == (original_node_count + SIZE_CHANGE_STEP)) scale_bigtable(BIGTABLE_INSTANCE, BIGTABLE_INSTANCE, False) - time.sleep(3) + time.sleep(10) cluster.reload() final_node_count = cluster.serve_nodes assert final_node_count == original_node_count From 664de883131b73f420625e5ed1578f0941235751 Mon Sep 17 00:00:00 2001 From: Christopher Wilcox Date: Tue, 19 Mar 2019 11:08:53 -0400 Subject: [PATCH 4/6] fix lint error --- bigtable/hello_happybase/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bigtable/hello_happybase/main.py b/bigtable/hello_happybase/main.py index 10fbd977569..f5db09a3015 100644 --- a/bigtable/hello_happybase/main.py +++ b/bigtable/hello_happybase/main.py @@ -72,8 +72,10 @@ def main(project_id, instance_id, table_name): # # https://cloud.google.com/bigtable/docs/schema-design row_key = 'greeting{}'.format(i) - table.put(row_key, {column_name.encode('utf-8'): value.encode('utf-8')}) - # [END writing_rows] + table.put( + row_key, {column_name.encode'utf-8'): value.encode('utf-8')} + ) + # [END writing_rows] # [START getting_a_row] print('Getting a single greeting by row key.') From 9e9eafabd805106d14ea80dd333524b93eb27d7b Mon Sep 17 00:00:00 2001 From: Christopher Wilcox Date: Tue, 19 Mar 2019 11:09:33 -0400 Subject: [PATCH 5/6] Update main.py --- bigtable/hello_happybase/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigtable/hello_happybase/main.py b/bigtable/hello_happybase/main.py index f5db09a3015..60a51b7ee2d 100644 --- a/bigtable/hello_happybase/main.py +++ b/bigtable/hello_happybase/main.py @@ -75,7 +75,7 @@ def main(project_id, instance_id, table_name): table.put( row_key, {column_name.encode'utf-8'): value.encode('utf-8')} ) - # [END writing_rows] + # [END writing_rows] # [START getting_a_row] print('Getting a single greeting by row key.') From 9ef1cb228f5f79a3c3a57eb2b025a6ae6adab0a9 Mon Sep 17 00:00:00 2001 From: Charles Engelke Date: Tue, 19 Mar 2019 09:37:15 -0700 Subject: [PATCH 6/6] Paren was missing --- bigtable/hello_happybase/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigtable/hello_happybase/main.py b/bigtable/hello_happybase/main.py index 60a51b7ee2d..3aea7d4f737 100644 --- a/bigtable/hello_happybase/main.py +++ b/bigtable/hello_happybase/main.py @@ -73,7 +73,7 @@ def main(project_id, instance_id, table_name): # https://cloud.google.com/bigtable/docs/schema-design row_key = 'greeting{}'.format(i) table.put( - row_key, {column_name.encode'utf-8'): value.encode('utf-8')} + row_key, {column_name.encode('utf-8'): value.encode('utf-8')} ) # [END writing_rows]