If two or more filesystems were configured at the same time in Hue like S3 and ABFS and let's say, REMOTE_STORAGE_HOME is set to s3a://test_bucket/dir, then earlier it defaults user to same s3a://test_bucket/dir path when user clicks both the S3 and ABFS left-nav icons.
Using the dedicated home directory method helps navigating this issue as for above scenario, the user will default to s3a://test_bucket/dir when S3 icon is clicked but will be default to abfs:// when ABFS icon is clicked.
To improve it further, now the user can set default_home_path per FS level so user can default to s3a://test_bucket/dir for S3 icon and abfs://test_container/dir for ABFS icon.
For backward compatibility, REMOTE_STORAGE_HOME will still hold priority over per FS level DEFAULT_HOME_PATH.
This PR also removes unnecessary encoding, and improved few home_diectory related methods.
For RAZ env, if now someone sets REMOTE_STORAGE_HOME or DEFAULT_HOME_PATH path ending with /user or /user/, then we are now appending the username for both scenarios to reduce misconfigurations.
What changes were proposed in this pull request?
REMOTE_STORAGE_HOME
is set tos3a://test_bucket/dir
, then earlier it defaults user to sames3a://test_bucket/dir
path when user clicks both the S3 and ABFS left-nav icons.s3a://test_bucket/dir
when S3 icon is clicked but will be default toabfs://
when ABFS icon is clicked.default_home_path
per FS level so user can default tos3a://test_bucket/dir
for S3 icon andabfs://test_container/dir
for ABFS icon.REMOTE_STORAGE_HOME
will still hold priority over per FS levelDEFAULT_HOME_PATH
.REMOTE_STORAGE_HOME
orDEFAULT_HOME_PATH
path ending with/user
or/user/
, then we are now appending the username for both scenarios to reduce misconfigurations.How was this patch tested?