Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functional optimize:use canMkdir() method relpalce isOwner() method in LocalFileSystem #1036

Merged
merged 2 commits into from
Oct 12, 2021

Conversation

lunescode
Copy link
Contributor

@lunescode lunescode commented Oct 12, 2021

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

  • Define canMkdir(FsPath destParentDir) in LocalFileSystem.java;
  • replce isOwner in mkdirs method in LocalFileSystem.java;

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:

  • Dependencies (does it add or upgrade a dependency): (no)
  • Anything that affects deployment: (no )
  • The MGS(Microservice Governance Services), i.e., Spring Cloud Gateway, OpenFeign, Eureka.: (no)

Documentation

  • Does this pull request introduce a new feature? ( no)
  • If yes, how is the feature documented? (not documented)

@lunescode lunescode changed the title Local file system Functional optimize:use canMkdir() method relpalce isOwner() method in LocalFileSystem Oct 12, 2021
Copy link
Contributor

@peacewong peacewong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@peacewong peacewong merged commit ea1e399 into apache:dev-1.0.3 Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants