Gyeongtae Park created ZEPPELIN-6263: ----------------------------------------
Summary: Refactor ZeppelinServer to modularize startZeppelin() for improved maintainability Key: ZEPPELIN-6263 URL: https://issues.apache.org/jira/browse/ZEPPELIN-6263 Project: Zeppelin Issue Type: Improvement Reporter: Gyeongtae Park Assignee: Gyeongtae Park Fix For: 1.0.0, 0.12.1, 0.13.0 The current {{startZeppelin()}} method in {{ZeppelinServer}} contains a large block of procedural logic that handles initialization, configuration, and startup processes in a monolithic way. This makes the method hard to read, maintain, and test. This issue proposes to refactor {{startZeppelin()}} by extracting its core responsibilities into clearly named private helper methods, each focusing on a specific task (e.g., initializing metrics, setting up Jetty handlers, binding services, configuring UI, etc.) h4. Proposed Changes * Extract responsibilities into the following private methods: ** {{initMetrics()}} ** {{initJettyHandler()}} ** {{initServiceLocator()}} ** {{bindZeppelinServices()}} ** {{setupWebUiContexts(...)}} ** {{initNotebookRepo()}} ** {{initJMX()}} ** {{runStartupNote()}} ** {{registerShutdownHook()}} ** {{eagerLoadCoreServices()}} ** {{initializeAndRecoverNotebook()}} ** {{startJettyServer()}} ** {{checkServiceLocatorErrors(...)}} ** {{waitForJettyTermination()}} h4. Benefits * Improved readability and structure * Easier to test and debug individual components * Better adherence to the Single Responsibility Principle -- This message was sent by Atlassian Jira (v8.20.10#820010)