From decac1b9cc602290a9e91bae620b786896cdb08c Mon Sep 17 00:00:00 2001 From: Pedro Maximino Date: Mon, 30 Sep 2024 11:20:19 +0200 Subject: [PATCH] Remove code related to webhdfs The webhdfsbrowser extension is no longer deployed in the new AlmaLinux 9 user image, so the code snippets that were removed are no longer useful --- SwanSpawner/swanspawner/swandockerspawner.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/SwanSpawner/swanspawner/swandockerspawner.py b/SwanSpawner/swanspawner/swandockerspawner.py index 9f96e1d..d03a3da 100644 --- a/SwanSpawner/swanspawner/swandockerspawner.py +++ b/SwanSpawner/swanspawner/swandockerspawner.py @@ -194,7 +194,6 @@ async def start(self): hadoop_container_path = '/spark' # Ensure that env variables are properly cleared - self.env.pop('WEBHDFS_TOKEN', None) self.env.pop('HADOOP_TOKEN_FILE_LOCATION', None) self.env.pop('KUBECONFIG', None) @@ -236,11 +235,9 @@ async def start(self): # Set default location for krb5cc in tmp directory for yarn self.env['KRB5CCNAME'] = '/tmp/krb5cc' - # set location of hadoop token file and webhdfs token for Spark - if os.path.exists(hadoop_host_path + '/hadoop.toks') and os.path.exists(hadoop_host_path + '/webhdfs.toks'): + # set location of hadoop token file token for Spark + if os.path.exists(hadoop_host_path + '/hadoop.toks'): self.env['HADOOP_TOKEN_FILE_LOCATION'] = hadoop_container_path + '/hadoop.toks' - with open(hadoop_host_path + '/webhdfs.toks', 'r') as webhdfs_token_file: - self.env['WEBHDFS_TOKEN'] = webhdfs_token_file.read() else: if cluster == 'hadoop-nxcals': raise ValueError( @@ -249,10 +246,10 @@ async def start(self): Please request access """) elif cluster == 'k8s': - # if there is no HADOOP_TOKEN_FILE or WEBHDFS_TOKEN with K8s we ignore (no HDFS access granted) + # if there is no HADOOP_TOKEN_FILE with K8s we ignore (no HDFS access granted) pass else: - # yarn clusters require HADOOP_TOKEN_FILE and WEBHDFS_TOKEN containing YARN and HDFS tokens + # yarn clusters require HADOOP_TOKEN_FILE containing YARN and HDFS tokens raise ValueError( """ Access to the Analytix cluster is not granted.