From 3daf46d01a8fd2be92a6497b79ea020aab664e5a Mon Sep 17 00:00:00 2001 From: Troy Sankey Date: Fri, 26 Jul 2019 10:25:30 -0400 Subject: [PATCH] percolate python_version down to the python-executable hadoop config --- edx/analytics/tasks/launchers/remote.py | 2 ++ edx/analytics/tasks/tests/acceptance/__init__.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/edx/analytics/tasks/launchers/remote.py b/edx/analytics/tasks/launchers/remote.py index e62b90383a..dd1f177f3b 100755 --- a/edx/analytics/tasks/launchers/remote.py +++ b/edx/analytics/tasks/launchers/remote.py @@ -121,6 +121,8 @@ def run_task_playbook(inventory, arguments, uid): if arguments.workflow_profiler: env_vars['WORKFLOW_PROFILER'] = arguments.workflow_profiler env_vars['WORKFLOW_PROFILER_PATH'] = log_dir + if arguments.python_version: + env_vars['HADOOP_PYTHON_EXECUTABLE'] = python_version env_var_string = ' '.join('{0}={1}'.format(k, v) for k, v in env_vars.iteritems()) diff --git a/edx/analytics/tasks/tests/acceptance/__init__.py b/edx/analytics/tasks/tests/acceptance/__init__.py index 50b450f19f..84bb6980cc 100644 --- a/edx/analytics/tasks/tests/acceptance/__init__.py +++ b/edx/analytics/tasks/tests/acceptance/__init__.py @@ -209,6 +209,9 @@ def setUp(self): self.warehouse_path = url_path_join(self.test_root, 'warehouse') self.edx_rest_api_cache_root = url_path_join(self.test_src, 'edx-rest-api-cache') task_config_override = { + 'hadoop': { + 'python-executable': os.environ('HADOOP_PYTHON_EXECUTABLE', '/usr/bin/python') + } 'hive': { 'database': database_name, 'warehouse_path': self.warehouse_path