From 8d5f4923be003e5143f45c95bcee903c826e5978 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..c389b8e654 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'] = arguments.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