You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2022/09/07 15:12:42 UTC

[incubator-datalab] 01/02: [DATALAB-1408]: changed print to logging

This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-1408
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit 1e9664da1f1fc4e66ce7bf655a3b38b01293bf13
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Wed Sep 7 16:56:46 2022 +0300

    [DATALAB-1408]: changed print to logging
---
 infrastructure-provisioning/src/general/lib/azure/actions_lib.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/azure/actions_lib.py b/infrastructure-provisioning/src/general/lib/azure/actions_lib.py
index 1559a7468..3f45aa41d 100644
--- a/infrastructure-provisioning/src/general/lib/azure/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/azure/actions_lib.py
@@ -1174,12 +1174,12 @@ class AzureActions:
 
     def create_hdinsight_cluster(self, resource_group_name, cluster_name, cluster_parameters):
         try:
-            print('Starting to create HDInsight Spark cluster {}'.format(cluster_name))
+            logging.info('Starting to create HDInsight Spark cluster {}'.format(cluster_name))
             result = self.hdinsight_client.clusters.begin_create(resource_group_name, cluster_name, cluster_parameters)
             cluster = datalab.meta_lib.AzureMeta().get_hdinsight_cluster(resource_group_name, cluster_name)
             while cluster.properties.cluster_state != 'Running':
                 time.sleep(15)
-                print('The cluster is being provisioned... Please wait')
+                logging.info('The cluster is being provisioned... Please wait')
                 cluster = datalab.meta_lib.AzureMeta().get_hdinsight_cluster(resource_group_name, cluster_name)
             return result
         except Exception as err:
@@ -1193,12 +1193,12 @@ class AzureActions:
 
     def terminate_hdinsight_cluster(self, resource_group_name, cluster_name):
         try:
-            print('Starting to terminate HDInsight cluster {}'.format(cluster_name))
+            logging.info('Starting to terminate HDInsight cluster {}'.format(cluster_name))
             result = self.hdinsight_client.clusters.begin_delete(resource_group_name, cluster_name)
             cluster_status = datalab.meta_lib.AzureMeta().get_hdinsight_cluster(resource_group_name, cluster_name)
             while cluster_status:
                 time.sleep(15)
-                print('The cluster is being terminated... Please wait')
+                logging.info('The cluster is being terminated... Please wait')
                 cluster_status = datalab.meta_lib.AzureMeta().get_hdinsight_cluster(resource_group_name, cluster_name)
             return result
         except Exception as err:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org