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

[FEATURE] Make KYUUBI_WORK_DIR_ROOT as the default root path. #1509

Closed
3 tasks done
wForget opened this issue Dec 6, 2021 · 2 comments
Closed
3 tasks done

[FEATURE] Make KYUUBI_WORK_DIR_ROOT as the default root path. #1509

wForget opened this issue Dec 6, 2021 · 2 comments
Assignees
Labels
kind:feature Feature request
Milestone

Comments

@wForget
Copy link
Member

wForget commented Dec 6, 2021

Code of Conduct

Search before asking

  • I have searched in the issues and found no similar issues.

Describe the feature

The METRICS_JSON_LOCATION and SERVER_OPERATION_LOG_DIR_ROOT paths are relative to user.dir by default.
I got an error during startup and I want to change it to a path relative to KYUUBI_WORK_DIR_ROOT.

command:

cd /
sudo -u user ${KYUUBI_HOME}/bin/kyuubi start

error:

Exception in thread "main" java.nio.file.AccessDeniedException: /metrics
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)
	at java.nio.file.Files.createDirectory(Files.java:674)
	at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)
	at java.nio.file.Files.createDirectories(Files.java:767)
	at org.apache.kyuubi.metrics.JsonReporterService.initialize(JsonReporterService.scala:47)
	at org.apache.kyuubi.service.CompositeService.$anonfun$initialize$1(CompositeService.scala:40)
	at org.apache.kyuubi.service.CompositeService.$anonfun$initialize$1$adapted(CompositeService.scala:40)
	at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
	at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
	at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
	at org.apache.kyuubi.service.CompositeService.initialize(CompositeService.scala:40)
	at org.apache.kyuubi.metrics.MetricsSystem.initialize(MetricsSystem.scala:66)
	at org.apache.kyuubi.service.CompositeService.$anonfun$initialize$1(CompositeService.scala:40)
	at org.apache.kyuubi.service.CompositeService.$anonfun$initialize$1$adapted(CompositeService.scala:40)
	at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
	at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
	at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
	at org.apache.kyuubi.service.CompositeService.initialize(CompositeService.scala:40)
	at org.apache.kyuubi.service.Serverable.initialize(Serverable.scala:46)
	at org.apache.kyuubi.server.KyuubiServer.initialize(KyuubiServer.scala:154)
	at org.apache.kyuubi.server.KyuubiServer$.startServer(KyuubiServer.scala:92)
	at org.apache.kyuubi.server.KyuubiServer$.main(KyuubiServer.scala:121)
	at org.apache.kyuubi.server.KyuubiServer.main(KyuubiServer.scala)

Motivation

No response

Describe the solution

No response

Additional context

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@wForget wForget added the kind:feature Feature request label Dec 6, 2021
@yaooqinn
Copy link
Member

yaooqinn commented Dec 6, 2021

👍

@wForget
Copy link
Member Author

wForget commented Dec 7, 2021

After modification, the METRICS_JSON_LOCATION and SERVER_OPERATION_LOG_DIR_ROOT paths are relative to KYUUBI_WORK_DIR_ROOT
2

the ENGINE_OPERATION_LOG_DIR_ROOT path relative to user.dir
1

yaooqinn pushed a commit that referenced this issue Dec 7, 2021
<!--
Thanks for sending a pull request!

Here are some tips for you:
  1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
  2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
  3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->

### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
  1. If you add a feature, you can talk about the use case of it.
  2. If you fix a bug, you can clarify why it is a bug.
-->

Make KYUUBI_WORK_DIR_ROOT as the default root path. For details: #1509.

### _How was this patch tested?_
- [X] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [X] Add screenshots for manual tests if appropriate

- [X] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1519 from wForget/KYUUBI-1509.

Closes #1509

ff078e5 [Wang Zhen] [KYUUBI-1509] Make KYUUBI_WORK_DIR_ROOT as the default root path.

Authored-by: Wang Zhen <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit 986d983)
Signed-off-by: Kent Yao <[email protected]>
@yaooqinn yaooqinn modified the milestones: 1.5.0, v1.4.1 Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:feature Feature request
Projects
None yet
Development

No branches or pull requests

2 participants