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

[#6139] Refactor metalake command in Gravitino CLI #6140

Merged
merged 7 commits into from
Jan 13, 2025

Conversation

justinmclean
Copy link
Member

What changes were proposed in this pull request?

The Gravitino command line class is a little large and could be broken up.

Why are the changes needed?

For readability and maintainability.

Fix: #6139

Does this PR introduce any user-facing change?

None.

How was this patch tested?

Tested locally.

@justinmclean
Copy link
Member Author

@shaofengshi and @tengqm what do you think of this? It's mostly cosmetic but does make it easier to understand.

@Abyss-lord
Copy link
Contributor

@shaofengshi and @tengqm what do you think of this? It's mostly cosmetic but does make it easier to understand.

@justinmclean Should we split other commands?

Copy link
Contributor

@tengqm tengqm left a comment

Choose a reason for hiding this comment

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

I like this clean approach.

* Constructs a MetalakeCommandHandler instance.
*
* @param gravitinoCommandLine The Gravitino command line instance.
* @param line The command line options.
Copy link
Contributor

Choose a reason for hiding this comment

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

rename line to options or arguments ?

Copy link
Member Author

Choose a reason for hiding this comment

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

The variable name line is used elsewhere e.g. FullName, GravitinoCommandLine and Main, options might be a little confusing as that is a different class.

@justinmclean
Copy link
Member Author

justinmclean commented Jan 8, 2025

@Abyss-lord You can start working on the other sub-issues for this if you want.

@justinmclean justinmclean self-assigned this Jan 8, 2025
@justinmclean
Copy link
Member Author

@shaofengshi can you review this?

justinmclean and others added 4 commits January 9, 2025 17:47
# Conflicts:
#	clients/cli/src/main/java/org/apache/gravitino/cli/CommandHandler.java
#	clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoCommandLine.java
# Conflicts:
#	clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoCommandLine.java
@justinmclean
Copy link
Member Author

@shaofengshi Other people are waiting on this PR. It should only take a few minutes to review. @jerryshao if @shaofengshi is busy, can you suggest someone else to review it.

Copy link
Contributor

@shaofengshi shaofengshi left a comment

Choose a reason for hiding this comment

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

LGTM

@tengqm
Copy link
Contributor

tengqm commented Jan 13, 2025

/lgtm

@justinmclean justinmclean merged commit 08f47ad into apache:main Jan 13, 2025
27 checks passed
Abyss-lord pushed a commit to Abyss-lord/gravitino that referenced this pull request Jan 14, 2025
### What changes were proposed in this pull request?

The Gravitino command line class is a little large and could be broken
up.

### Why are the changes needed?

For readability and maintainability.

Fix: apache#6139

### Does this PR introduce _any_ user-facing change?

None.

### How was this patch tested?

Tested locally.

---------

Co-authored-by: Shaofeng Shi <[email protected]>
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.

Refactor metalake commands in Gavitino CLI
4 participants