Browse Source

[filebrowser] updated file compression in hdfs to support py3 (#3734)

* [filebrowser] updated file compression to support py3

* [filebrowser] removed Py2 check

---------

Co-authored-by: tarunjangid <tj@cloudera.com>
Tarun Jangid 1 year ago
parent
commit
4a157d87ee

+ 2 - 2
desktop/core/src/desktop/lib/tasks/compress_files/compress_in_hdfs.sh

@@ -89,7 +89,7 @@ done
 set +x
 if [ $exit_status == 0 ]
 then
-	encoded_output_dir=`python -c "import urllib;print urllib.quote(raw_input())" <<< "$temp_output_dir/$ARCHIVE_NAME"`
+	encoded_output_dir=`python -c "import urllib.parse;print(urllib.parse.quote(input()))" <<< "$temp_output_dir/$ARCHIVE_NAME"`
 	echo "Copying $encoded_output_dir to '$UPLOAD_PATH' in HDFS"
 	hadoop fs -put -f $encoded_output_dir "$UPLOAD_PATH"
 	exit_status=$(echo $?)
@@ -111,4 +111,4 @@ then
   exit_status = $failed
 fi
 
-exit $exit_status
+exit $exit_status