Skip to content

[ZEPPELIN-6263] Refactor startZeppelin() into modular helper methods for clarity and maintainability#5004

Closed
ParkGyeongTae wants to merge 1 commit into
apache:masterfrom
ParkGyeongTae:ZEPPELIN-6263
Closed

[ZEPPELIN-6263] Refactor startZeppelin() into modular helper methods for clarity and maintainability#5004
ParkGyeongTae wants to merge 1 commit into
apache:masterfrom
ParkGyeongTae:ZEPPELIN-6263

Conversation

@ParkGyeongTae

Copy link
Copy Markdown
Member

What is this PR for?

This PR refactors the startZeppelin() method in ZeppelinServer by extracting its core logic into well-named modular helper methods such as initJettyHandler(), initServiceLocator(), bindZeppelinServices(), etc.
The purpose of this change is to improve readability, facilitate future maintenance, and allow better unit testing of individual steps in the startup process.

No functional behavior has been changed.

What type of PR is it?

Refactoring

Todos

  • - Extract helper methods from startZeppelin()

What is the Jira issue?

How should this be tested?

N/A

Screenshots (if appropriate)

N/A

Questions:

  • Does the license files need to update? No.
  • Is there breaking changes for older versions? No.
  • Does this needs documentation? No.

@Reamer

Reamer commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

What do you think about making the private methods static as well?
With the current implementation, it is not clear to me in which order the private methods must be called.

@Reamer Reamer self-assigned this Aug 4, 2025
@ParkGyeongTae

Copy link
Copy Markdown
Member Author

@Reamer
Thanks for the suggestion! Some private methods could indeed be made static if they don't rely on instance fields. However, many of them depend on instance state like zConf, jettyWebServer, or sharedServiceLocator, so making them static would complicate the design.

Regarding the call order clarity — I believe improving method naming or grouping related calls (e.g., in startZeppelin()) would be a better way to make the flow more understandable, rather than relying on static modifiers. Let me know what you think!

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