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 2021/04/14 14:43:30 UTC
[incubator-datalab] branch DATALAB-2091 updated: [DATALAB-2091]:
fixed java lib install
This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch DATALAB-2091
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
The following commit(s) were added to refs/heads/DATALAB-2091 by this push:
new 12b93d5 [DATALAB-2091]: fixed java lib install
12b93d5 is described below
commit 12b93d538312bf68e3d4f97aace98aa46b03b843
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Wed Apr 14 17:43:13 2021 +0300
[DATALAB-2091]: fixed java lib install
---
infrastructure-provisioning/src/general/lib/os/fab.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index 2bb9518..2f9a3f0 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -533,7 +533,7 @@ def update_spark_jars(jars_dir='/opt/jars'):
def install_java_pkg(requisites):
status = list()
- error_parser = "ERROR|error|No such|no such|Please run|requires|module not found"
+ error_parser = "ERROR|error|No such|no such|Please run|requires|module not found|Exception"
templates_dir = '/root/templates/'
ivy_dir = '/opt/ivy'
ivy_cache_dir = '{0}/cache/'.format(ivy_dir)
@@ -554,9 +554,7 @@ def install_java_pkg(requisites):
conn.sudo('mkdir -p {0}'.format(ivy_cache_dir))
group, artifact, version, override = java_pkg
print("Installing package (override: {3}): {0}:{1}:{2}".format(group, artifact, version, override))
- conn.sudo('{8}; java -jar {0} -settings {1}/{2} -cache {3} -dependency {4} {5} {6} 2>&1 | tee /tmp/tee.tmp; \
- if ! grep -w -E "({7})" /tmp/tee.tmp > /tmp/install_{5}.log; then echo "" > /tmp/install_{5}.log;fi'
- .format(ivy_jar, ivy_dir, ivy_settings, ivy_cache_dir, group, artifact, version, error_parser, java_proxy))
+ conn.sudo('''bash -c "{8}; java -jar {0} -settings {1}/{2} -cache {3} -dependency {4} {5} {6} 2>&1 | tee /tmp/tee.tmp; if ! grep -w -E \\"({7})\\" /tmp/tee.tmp > /tmp/install_{5}.log; then echo \\"\\" > /tmp/install_{5}.log;fi" '''.format(ivy_jar, ivy_dir, ivy_settings, ivy_cache_dir, group, artifact, version, error_parser, java_proxy))
err = conn.sudo('cat /tmp/install_{0}.log'.format(artifact)).stdout.replace('"', "'").strip()
conn.sudo('find {0} -name "{1}*.jar" | head -n 1 | rev | cut -f1 -d "/" | rev | \
if ! grep -w -i {1} > /tmp/install_{1}.list; then echo "" > /tmp/install_{1}.list;fi'.format(ivy_cache_dir, artifact))
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org