You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by lf...@apache.org on 2020/08/21 08:00:26 UTC
[incubator-dlab] branch DLAB-1980 updated: [DLAB-1980]: added check
if cluster_dir exists on instance
This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch DLAB-1980
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-1980 by this push:
new 703c18d [DLAB-1980]: added check if cluster_dir exists on instance
703c18d is described below
commit 703c18d09c8979e2f1b3e29ff063572e96c2231e
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Fri Aug 21 10:53:25 2020 +0300
[DLAB-1980]: added check if cluster_dir exists on instance
---
infrastructure-provisioning/src/general/lib/aws/actions_lib.py | 3 ++-
.../src/general/scripts/os/dataengine_reconfigure_spark.py | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
index 8b9ffab..bce8c76 100644
--- a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
@@ -1827,7 +1827,8 @@ def configure_dataengine_spark(cluster_name, jars_dir, cluster_dir, datalake_ena
cluster_name, cluster_dir), capture=True)
for property in additional_spark_properties.split('\n'):
local('echo "{0}" >> /tmp/{1}/notebook_spark-defaults_local.conf'.format(property, cluster_name))
- local('cp -f /tmp/{0}/notebook_spark-defaults_local.conf {1}spark/conf/spark-defaults.conf'.format(cluster_name,
+ if os.path.exists('{0}'.format(cluster_dir)):
+ local('cp -f /tmp/{0}/notebook_spark-defaults_local.conf {1}spark/conf/spark-defaults.conf'.format(cluster_name,
cluster_dir))
if spark_configs:
dlab_header = local('cat /tmp/{0}/notebook_spark-defaults_local.conf | grep "^#"'.format(cluster_name),
diff --git a/infrastructure-provisioning/src/general/scripts/os/dataengine_reconfigure_spark.py b/infrastructure-provisioning/src/general/scripts/os/dataengine_reconfigure_spark.py
index 8f2f9cc..425b12b 100644
--- a/infrastructure-provisioning/src/general/scripts/os/dataengine_reconfigure_spark.py
+++ b/infrastructure-provisioning/src/general/scripts/os/dataengine_reconfigure_spark.py
@@ -108,7 +108,7 @@ if __name__ == "__main__":
local("~/scripts/{}.py {}".format('reconfigure_spark', params))
except:
traceback.print_exc()
- #raise Exception
+ raise Exception
except Exception as err:
print('Error: {0}'.format(err))
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org