Functional optimize:use canMkdir() method relpalce isOwner() method in LocalFileSystem #1036
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
when deploy linkis on k8s, it will by very convenient to use shared filesystem, it can replace hdfs, through set value "wds.linkis.filesystem.hdfs.root.path=file:///tmp/linkis/" will be ok.
but we found a problem: if we don't use io_proxy mode, when make new directory through LocalFileSystem.java, if linkis engine run user is not the directory owner,it will be fail. but ecm、publicservice usually run as linkis user, the engine run as bussiness user, they are different., we can't set same file owner. and if set io_proxy mode, it will be very complicated.
so we found that, if we use canMkdir() method relpalce isOwner() method in LocalFileSystem, it will solve this problem.
Brief change log
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
Documentation