You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] examples/example-stateful-function-config.yaml does not exist in 2.11 distro #20063
I searched in the issues and found nothing similar.
Version
The Get Started guide for stateful functions can't be followed because this file examples/example-stateful-function-config.yaml does not appear to exist.
tz@pantone:~/apache-pulsar-2.11.0$ ls examples/
api-examples.jar example-function-config.yaml example-window-function-config.yaml python-examples
Furthermore, the contents of examples/example-window-function-config.yaml (unzipped from the 2.11 distro) does not match what's published in the documentation, causing some steps in the tutorial to not work as intended.
Minimal reproduce step
Follow the following guides in order using a fresh installation of pulsar 2.11:
2.11.0 distro doesn't have the file examples/example-stateful-function-config.yaml.
I can find it when building 3.0.0-SNAPSHOT distro at master. cc @Technoboy- (2.11.0 RM) do you have ideas why we miss this file in 2.11.0 distro? Also cc @poorbarcode (3.0.0 RM) as a reminder to check this file present when preparing 3.0.0 distro.
Document is inaccurate. Since you tick the box "I'm willing to submit a PR!", I'll double check if you're going to prepare a patch to apply all your suggestions above?
After reviewing the changeset, I'd prefer to pick the changes of examples files and packaging logic in bin.xml to 2.11. Reverting 2.11 docs seems more complicated, and it benefits picking this non-functional improvement to 2.11.
Remove this step completely. No table service was started for me.
Sounds reasonable to be removed.
examples/example-window-function-config.yaml
As @Technoboy- mentioned above, we will pick this change to the 2.11 branch, and thus the following 2.11 version should contain this file. So either we leave it as is or you can try to add a note for fetching the file on missing is viable to me.
Activity
tisonkun commentedon Apr 11, 2023
Thanks for reporting this issue @anguillanneuf!
Here we have two issues:
examples/example-stateful-function-config.yaml.I can find it when building 3.0.0-SNAPSHOT distro at master. cc @Technoboy- (2.11.0 RM) do you have ideas why we miss this file in 2.11.0 distro? Also cc @poorbarcode (3.0.0 RM) as a reminder to check this file present when preparing 3.0.0 distro.
anguillanneuf commentedon Apr 11, 2023
Thanks @tisonkun for distilling the docs issues into two separate problems.
Below is what I can (know how) to do for 2.11 docs.
Step No. 7 in https://pulsar.apache.org/docs/2.11.x/functions-quickstart/#start-functions made no sense to me as a new user.
Remove this step completely. No table service was started for me.
https://pulsar.apache.org/docs/2.11.x/functions-quickstart/#start-stateful-functions can't be followed at all because the example file is missing.
Remove this section completely. "The standalone mode of Pulsar enables BookKeeper table service for stateful functions." This statement is false using 2.11 as far as I can tell.
I needed to update
examples/example-window-function-config.yamlaccordingly in order to run https://pulsar.apache.org/docs/2.11.x/functions-quickstart/#start-window-functions.Edit docs to ask users to update the downloaded and unzipped
examples/example-window-function-config.yamlaccording to https://github.com/apache/pulsar/blob/master/pulsar-functions/java-examples/src/main/resources/example-window-function-config.yamlAre these the right approach and will they be sufficient from me?
Technoboy- commentedon Apr 12, 2023
As #18601 is not in branch-2.11, so the release of 2.11.x not contains this changes.
We need to improve the doc for 2.11.x
tisonkun commentedon Apr 12, 2023
@Technoboy- Thanks for your investigation!
After reviewing the changeset, I'd prefer to pick the changes of examples files and packaging logic in
bin.xmlto 2.11. Reverting 2.11 docs seems more complicated, and it benefits picking this non-functional improvement to 2.11.tisonkun commentedon Apr 12, 2023
@anguillanneuf Thanks for your update!
Sounds reasonable to be removed.
As @Technoboy- mentioned above, we will pick this change to the 2.11 branch, and thus the following 2.11 version should contain this file. So either we leave it as is or you can try to add a note for fetching the file on missing is viable to me.
Technoboy- commentedon Apr 12, 2023
Thanks for reporting this, we will fix this in 2.11.1.
Currently, you can copy
example-stateful-function-config.yamlfrom here to examples folderTechnoboy- commentedon Apr 12, 2023
Fixed by #20073
tisonkun commentedon Apr 25, 2023
@anguillanneuf may you still send a patch for docs improvement?