Skip to content

[Doc] Add descriptions for function runtime and context - #9516

Merged
Anonymitaet merged 3 commits into
apache:masterfrom
Anonymitaet:0207
Feb 9, 2021
Merged

[Doc] Add descriptions for function runtime and context#9516
Anonymitaet merged 3 commits into
apache:masterfrom
Anonymitaet:0207

Conversation

@Anonymitaet

Copy link
Copy Markdown
Member

Document features introduced in #9445 and #9246.

@Anonymitaet

Copy link
Copy Markdown
Member Author

@freeznet could you please help review? Thanks.

@freeznet freeznet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@zymap zymap added the doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. label Feb 8, 2021
@zymap zymap added this to the 2.8.0 milestone Feb 8, 2021

@Huanli-Meng Huanli-Meng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Look Good to me and only leave a minor comment. PTAL

Comment thread site2/docs/functions-runtime.md Outdated
Pulsar includes a built-in implementation. To use the basic implementation, set `runtimeCustomizerClassName` to `org.apache.pulsar.functions.runtime.kubernetes.BasicKubernetesManifestCustomizer`. The built-in implementation enables you to pass a JSON document with certain properties to augment how the manifests are generated. The following is an example.
To initialize the `KubernetesManifestCustomizer`, you can provide `runtimeCustomizerConfig` in the `functions-worker.yml` file. `runtimeCustomizerConfig` is passed to the `public void initialize(Map<String, Object> config)` function of the interface. `runtimeCustomizerConfig`is different from the `customRuntimeOptions` as `runtimeCustomizerConfig` is the same across all functions. If you provide both `runtimeCustomizerConfig` and `customRuntimeOptions`, you need to decide how to manage these two configurations in your implementation of `KubernetesManifestCustomizer`.

Pulsar includes a built-in implementation. To use the basic implementation, set `runtimeCustomizerClassName` to `org.apache.pulsar.functions.runtime.kubernetes.BasicKubernetesManifestCustomizer`. The built-in implementation initialized with `runtimeCustomizerConfig` defined in the `functions-worker.yml` file enables you pass a JSON document as `customRuntimeOptions` with certain properties to augment to decide how the manifests are generated. If both `runtimeCustomizerConfig` and `customRuntimeOptions` are provided, `BasicKubernetesManifestCustomizer` uses `customRuntimeOptions` to override the configuration if there are conflicts in these two configurations.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The built-in implementation initialized with runtimeCustomizerConfig defined in the functions-worker.yml file enables you pass a JSON document as customRuntimeOptions with certain properties to augment to decide how the manifests are generated.
For easy of read, it's better to break these long sentence into several short sentences.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. I have the same concern on the long sentences.
  2. "enables you pass..." --> "enables you to pass..."

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@Huanli-Meng @jennifer88huang thanks for your comments. Updated, PTAL.

Anonymitaet added 2 commits February 8, 2021 12:36
@Anonymitaet
Anonymitaet merged commit b5e153a into apache:master Feb 9, 2021
@Anonymitaet
Anonymitaet deleted the 0207 branch February 9, 2021 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Your PR contains doc changes, no matter whether the changes are in markdown or code files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants