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

Adapt configuration file structure, tooling (start scripts), config option readers (Java) and docs for new bind.listeners configuration option #717

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

Conversation

michaelkoepf
Copy link
Contributor

@michaelkoepf michaelkoepf commented Apr 6, 2025

Purpose

Linked issue: close #618 close #619

With the introduction of bind.listeners (and, subsequently, also Kafka compatibility), adaptions to the structure of Fluss' config files are necessary. In particular, we need to introduce separate, dedicated configuration files for coordinator and tablet servers. These adaptions also require changes in the CLI tooling (start scripts) and Java config option readers. Backward compatibility should be maintained. In addition, docs need to be adapted.

As changes of #618 and #619 are tightly coupled, they are resolved within one PR.

Brief change log

Modules

  • fluss-dist

    • Remove server.yaml and introduce a new common.yaml. common.yaml is the common configuration file read by all start scripts and all Java applications that previously read from server.yaml. common.yaml is introduced to better reflect the purpose of this configuration file in its name, as it is read by many different scripts and modules, incl. all start scripts, the Fluss server module and also the Lakehouse CLI. server.yaml is deprecated and should be removed when support for the [coordinator|tablet-server].host config option is dropped.
    • Adapt config.sh to read from common.yaml but ensure backward compatibility with the deprecated server.yaml. Constrain it to either use the deprecated server.yaml configuration file or the new common.yaml file; do not allow mixed configurations.
    • Add dedicated configuration files for tablet and coordinator server to support instance-specific configurations. This includes, e.g., bind.listeners or Kafka ports.
  • fluss-common:

    • Adapt src/main/java/com/alibaba/fluss/config/GlobalConfiguration#loadConfiguration s.t. it can load the new configuration file structure, i.e., common.yaml and additional dedicated configuration files (e.g., coordinator-server.yaml). Maintain backward compatibility for old configuration file structure (server.yaml).
  • fluss-server:

    • Adaptions to pass through server type. Choose dedicated default configuration file that should be loaded depending on the server type.

Docker

  • Append content of FLUSS_PROPERTIES environment variable to common and instance-specific configuration files.
  • Ensure backward compatability by removing bind.listeners from YAML config files.

Docs

  • Update docs for new bind.listeners config option.
  • Update sections that reference server.yaml.

Tests

Unit Tests

  • Added new test class fluss-common/src/test/java/com/alibaba/fluss/config/GlobalConfigurationTest.java
  • Adapted and added tests in fluss-server/src/test/java/com/alibaba/fluss/server/utils/ConfigurationParserUtilsTest.java

Start Scripts

Verified manually by running commands from docs

API and Format

n/a

Documentation

n/a

- Remove server.yaml and introduce common.yaml config file
- Introduce dedicated config files for coordinator and tablet-server to support different config options (host, port) for bind.listeners and Kafka
- Adapt config.sh to support common.yaml but ensuring backward compatibility for old server.yaml
- Adapt assemblies for newly introduced config files
@michaelkoepf michaelkoepf force-pushed the adapt-tooling-and-docs-for-bind-listeners branch 2 times, most recently from cc235ae to 192465f Compare April 6, 2025 14:00
- Load new common.yaml from config dir
- Allow to specify dedicated configuration files to be loaded in the addition to common.yaml from the config dir
- Ensure backward compatibility for old server.yaml
- Add server type argument to ConfigurationParserUtils load method and adapt test cases
@michaelkoepf michaelkoepf force-pushed the adapt-tooling-and-docs-for-bind-listeners branch 2 times, most recently from ac95e20 to e7dd2f3 Compare April 6, 2025 19:31
@michaelkoepf michaelkoepf force-pushed the adapt-tooling-and-docs-for-bind-listeners branch from e7dd2f3 to d8a12fa Compare April 6, 2025 21:55
@michaelkoepf michaelkoepf force-pushed the adapt-tooling-and-docs-for-bind-listeners branch from 2db8ed8 to 78f51a4 Compare April 6, 2025 22:37
@michaelkoepf michaelkoepf force-pushed the adapt-tooling-and-docs-for-bind-listeners branch from a355555 to 2dd3ad0 Compare April 7, 2025 11:03
Comment on lines +17 to +22
# Common default configuration file that is used by ALL start scripts, the Fluss Servers and the Lakehouse CLI.
# In addition, there exist additional, dedicated default configuration files for some components that are also placed
# in this folder. The dedicated configuration files are ONLY read by the respective Java applications but NOT by the
# start scripts. In that case, configuration options in the dedicated files overwrite configuration options
# in the common (i.e., this) file.

Copy link
Contributor Author

@michaelkoepf michaelkoepf Apr 7, 2025

Choose a reason for hiding this comment

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

Note for reviewer: I suggest to rename server.yaml to common.yaml from 0.7.0 onward for the following reasons.

  1. The file name server is a bit misleading, because the config file is not only read by the server but also by config.sh and the lakehouse module. And it's easier to change it now than at some later point.
  2. It avoids confusion. With renaming it, there is a clear separation and it is clear which config files are read. It is either server.yaml or common.yaml + depending on the module, an additional file ([coordinator-server|tablet-server].yaml).

We can remove server.yaml when we deprecate the old [coordinator|tablet-server]-host config options.

Of course, I am open to discuss if renaming the file is a good approach or not.

@michaelkoepf michaelkoepf force-pushed the adapt-tooling-and-docs-for-bind-listeners branch from af7d889 to 594d6e0 Compare April 7, 2025 15:54
@michaelkoepf michaelkoepf force-pushed the adapt-tooling-and-docs-for-bind-listeners branch from 594d6e0 to dc54b45 Compare April 7, 2025 15:59
@michaelkoepf michaelkoepf changed the title [WIP] Adapt tooling (start scripts), config option readers (Java) and docs for bind listeners Adapt tooling (start scripts), config option readers (Java) and docs for bind listeners Apr 7, 2025
@michaelkoepf michaelkoepf changed the title Adapt tooling (start scripts), config option readers (Java) and docs for bind listeners Adapt configuration file structure, tooling (start scripts), config option readers (Java) and docs for new bind.listeners configuration option Apr 7, 2025
@michaelkoepf michaelkoepf marked this pull request as ready for review April 7, 2025 16:51
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.

Update docs to support bind.listeners refactor server.yaml and shell to start after multiple endpoints
1 participant