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

[#6603] chore(*): fix CLI.sh can't find the Jar #6686

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Abyss-lord
Copy link
Contributor

What changes were proposed in this pull request?

fix CLI.sh can't find the Jar

  1. Changing the packaging flow, Copy the CLI-related jars to package/libs and add gcli.sh to bin.
  2. change some docs file.

Why are the changes needed?

Fix: #6603

Does this PR introduce any user-facing change?

yes, If user set the GRAVITINO_HOME environment variable, then can create a convenient alias by running alias gcli='sh $GRAVITINO_HOME/bin/gcli.sh'. After that, user will be able to use the gcli tool directly from anywhere in their terminal.

How was this patch tested?

local test.
image

image

Changing the packaging flow, Copy the CLI-related jars to package/libs and add gcli.sh to bin.
@Abyss-lord
Copy link
Contributor Author

@justinmclean @tengqm could you please review this PR when you have time? I’d really appreciate your feedback.

set -e

if [ -L "${BASH_SOURCE-$0}" ]; then
FWDIR=$(dirname "$(readlink "${BASH_SOURCE-$0}")")
Copy link
Contributor

Choose a reason for hiding this comment

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

what does 'FWDIR' means?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FWDIR represent "Framework Directory" and is used to determine the directory path where the script is located.

@@ -52,7 +52,7 @@ Before you can build and run this project, it is suggested you have the followin
3. Create an alias:

```bash
alias gcli='java -jar clients/cli/build/libs/gravitino-cli-*-incubating-SNAPSHOT.jar'
alias gcli='sh $GRAVITINO_HOME/bin/gcli.sh'
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we solve this problem by having java search for the right jar rather than introducing another layer of indirection?
Personally I don't like this approach, especially considering that the gcli alias is starting a new shell.

@jerryshao
Copy link
Contributor

It's not a good idea to put cli jar into the Gravitino server package. If we want to ship it with server binary, I think we should figure out a better way.

@Abyss-lord
Copy link
Contributor Author

Can we add an auxlib directory (like Hive) to package directory and copy the CLI-related Jar to it? By doing so, the Jar path can be uniquely determined by the script. ${ROOT_DIR}/auxlib/gravitino-cli-*-incubating-SNAPSHOT.jar

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.

[Bug report] The CLI.sh can't find the Jar
4 participants