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
[FLINK-15683][docs] Restructure Configuration page #10982
Conversation
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit f691121 (Fri Jan 31 09:47:23 UTC 2020) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
f691121
to
2274760
Compare
CI report:
Bot commandsThe @flinkbot bot supports the following commands:
|
2274760
to
02696f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I had some remarks about typos, though. This showed me, however, that our naming of cluster components is a bit difficult, because most of the documentation/config options refer to the "Flink Master" as JobManager, which is at odds with the glossary (https://ci.apache.org/projects/flink/flink-docs-master/concepts/glossary.html)
docs/ops/config.md
Outdated
|
||
## Common Options | ||
If you use Flink with [Yarn]({{site.baseurl}}/ops/deployment/yarn_setup.html), [Mesos]({{site.baseurl}}/ops/deployment/mesos.html), or the [*active* Kubernetes integration]({{site.baseurl}}/ops/deployment/native_kubernetes.html), the hostnames and ports get automatically configured are automatically discovered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use Flink with [Yarn]({{site.baseurl}}/ops/deployment/yarn_setup.html), [Mesos]({{site.baseurl}}/ops/deployment/mesos.html), or the [*active* Kubernetes integration]({{site.baseurl}}/ops/deployment/native_kubernetes.html), the hostnames and ports get automatically configured are automatically discovered. | |
If you use Flink with [Yarn]({{site.baseurl}}/ops/deployment/yarn_setup.html), [Mesos]({{site.baseurl}}/ops/deployment/mesos.html), or the [*active* Kubernetes integration]({{site.baseurl}}/ops/deployment/native_kubernetes.html), the hostnames and ports are automatically discovered. |
docs/ops/config.md
Outdated
|
||
* This will be replaced by the TOC | ||
{:toc} | ||
These options are only necessary for a *standalone* application- or session deployments ([simple standalone]({{site.baseurl}}/ops/deployment/cluster_setup.html) or [Kubernetes]({{site.baseurl}}/ops/deployment/kubernetes.html)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These options are only necessary for a *standalone* application- or session deployments ([simple standalone]({{site.baseurl}}/ops/deployment/cluster_setup.html) or [Kubernetes]({{site.baseurl}}/ops/deployment/kubernetes.html)). | |
These options are only necessary for *standalone* application- or session deployments ([simple standalone]({{site.baseurl}}/ops/deployment/cluster_setup.html) or [Kubernetes]({{site.baseurl}}/ops/deployment/kubernetes.html)). |
docs/ops/config.md
Outdated
|
||
This data is NOT relied upon for persistence/recovery, but if this data gets deleted, it typically causes a heavyweight recovery operation. It is hence recommended to set this to a directory that is not automatically periodically purged. | ||
|
||
Yarn, Mesos, and Kubernets setups automatically configure this value to the local working directories by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yarn, Mesos, and Kubernets setups automatically configure this value to the local working directories by default. | |
Yarn, Mesos, and Kubernetes setups automatically configure this value to the local working directories by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expert_security_ssl_section.html isn't used anywhere, is this intentional?
docs/ops/config.md
Outdated
|
||
## Common Options | ||
If you use Flink with [Yarn]({{site.baseurl}}/ops/deployment/yarn_setup.html), [Mesos]({{site.baseurl}}/ops/deployment/mesos.html), or the [*active* Kubernetes integration]({{site.baseurl}}/ops/deployment/native_kubernetes.html), the hostnames and ports get automatically configured are automatically discovered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use Flink with [Yarn]({{site.baseurl}}/ops/deployment/yarn_setup.html), [Mesos]({{site.baseurl}}/ops/deployment/mesos.html), or the [*active* Kubernetes integration]({{site.baseurl}}/ops/deployment/native_kubernetes.html), the hostnames and ports get automatically configured are automatically discovered. | |
If you use Flink with [Yarn]({{site.baseurl}}/ops/deployment/yarn_setup.html), [Mesos]({{site.baseurl}}/ops/deployment/mesos.html), or the [*active* Kubernetes integration]({{site.baseurl}}/ops/deployment/native_kubernetes.html), the hostnames and ports get automatically configured. |
?
docs/ops/config.md
Outdated
|
||
{% include generated/core_configuration.html %} | ||
The default memory sizes support simple streaming/batch applications, but are too low to yield good performance on more complex applications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default memory sizes support simple streaming/batch applications, but are too low to yield good performance on more complex applications. | |
The default memory sizes support simple streaming/batch applications, but are too low to yield good performance for more complex applications. |
|
||
String SECTION_COMMON = "common"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
common_section.html
isn't used anymore, but it seems like some classes are still grouped into a generic common section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually not, no, this variable is unused. Can remove it.
@@ -33,34 +30,33 @@ | |||
/** | |||
* The set of configuration options relating to security. | |||
*/ | |||
@PublicEvolving | |||
@ConfigGroups(groups = { | |||
@ConfigGroup(name = "Kerberos", keyPrefix = "security.kerberos"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you opt for replacing the ConfigGroups here, but kept them for env
in CoreOptions
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No specific reason. It is rework step by step. Not everything is migrated in the first step.
At the moment there are still parts that are generated by Class / ConfigGroup, while others are generated by Section option.
In the long run, I would suggest to do everything by section option, that is simpler. But I didn't want just do this without doing a this first rework and see how this model serves us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
section option [are] simpler
This is debatable. The ConfigGroups were written on purpose the way they are so that devs can add new options without having to worry or even know how the docs are generated. You could just add a new kerberos option and it would just work.
Meanwhile, if a dev now adds an option they have to decide whether the option is common/expert, and if they forget to add any of the annotations are at risk of the option not being documented at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The core issue I have here is that we introduce an inconsistency in how options are translated into include files, which make it impossible to implement any safeguards to prevent dev errors. In my example above, the generator won't complain about a new ssl option being added without a common/expert annotation, because it will still be added to the file we generate for each config class by default, and the generator assumes that all include files are used in the documentation.
If on the other hand we would completely remove config groups, and the default include file per config class, then we could mandate that every new option must have a section annotation. This we could easily enforce.
Please provide a reason for every option that is excluded from the documentation. |
While the separate into common/expert options makes sense, it seems quite inconvenient to not have them in unified form somewhere. Having to scoll up/down to get a full overview over related options can be rather tiresome :) |
About the layout / splitting. Would be happy if someone would make another pass after that and further improve this. The stat here is the best that came to my mind and it should already be much better than what we have at the moment, the benefits outweigh the problems by far, so would like to not hold it back for now. About excluded options: I think I excluded only options that were previously also deprecated / not recommended any more.
Do you see some that I accidentally excluded? |
The "expert_security_ssl_section.htm" was overlooked. Trying to adjust the coverage tests (they currently fail) to make sure these things are called automatically now. |
02696f5
to
9664904
Compare
…ge to table config options page This closes apache#10957
…igOptionsDocGenerator
…ionOption - Rename '@SectionOption' to '@section' for brevity - Rename '@Section.sections()' to '@Section.value()' That way, the method name can be skipped when only sections (no positions) are specified, which should is the common case after config documentation rework is complete. - Adjust test for @section annotation
8e5e3de
to
87b1124
Compare
Pushed a some fixes
|
@@ -95,6 +94,7 @@ | |||
* @deprecated Use {@link #SSL_INTERNAL_ENABLED} and {@link #SSL_REST_ENABLED} instead. | |||
*/ | |||
@Deprecated | |||
@Documentation.ExcludeFromDocumentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, deprecated options are already excluded from the documentation.
Looking at the affected options ( If the ssl.* options aren't supposed to be used anymore they should properly deprecated, likely with deprecated keys on the new options, as should the web option, as should |
I can add a notice why these are excluded. Side note: the |
87b1124
to
9b1b894
Compare
Pushed a fix addressing the latest comments.
|
- Grouping options by semantics and functionality, rather than by defined class. - Splitting between "normal/common options" and options that should only be necessary for trouble-shooting.
9b1b894
to
3129d7f
Compare
What is the purpose of the change
This restructures the documentation page to make it less confusing and more easily digestible for users. This also removes some outdated/confusing/misleading background sections.
The improvements are twofold:
Follow-up
This PR does not yet update and descriptions or resolve the issue that
(none)
as the default value does not tell the user if this is a required parameter (for a certain feature), it has an internal default behavior or fallback, or it is purely optional.Brief change log
Main changes:
@CommonOption
annotation to@Section
to support putting options in different (multiple) sections independent of the source code file in which they are definedhttps://github.com/apache/flink/compare/master...StephanEwen:restructure_docs?expand=1#diff-b98ef45d30f932983679d102102dd8f0
Additional changes: