Skip to content

[PIP 86] add doc for initialize function interface#14315

Merged
Anonymitaet merged 7 commits intoapache:masterfrom
wangjialing218:branch-doc
Feb 18, 2022
Merged

[PIP 86] add doc for initialize function interface#14315
Anonymitaet merged 7 commits intoapache:masterfrom
wangjialing218:branch-doc

Conversation

@wangjialing218
Copy link
Contributor

Motivation

add doc for #13205

Documentation

  • doc

@github-actions github-actions bot added the doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. label Feb 16, 2022
}
}
```
Notice that to use initialize interface, you should set up Pulsar Functions worker 2.10.0 or later.
Copy link
Contributor

Choose a reason for hiding this comment

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

This notice can be deleted because the information has been clarified in the beginning.

```
Notice that to use initialize interface, you should set up Pulsar Functions worker 2.10.0 or later.

<!--END_DOCUSAURUS_CODE_TABS-->
Copy link
Contributor

Choose a reason for hiding this comment

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

It should be the end of the last section.

Copy link
Contributor

@momo-jun momo-jun left a comment

Choose a reason for hiding this comment

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

Hi @wangjialing218, thanks for your contribution to doc.
As we discussed, I proposed a few changes. PTAL.

@momo-jun
Copy link
Contributor

In addition, the following content needs to be added to the "Available APIs" section.

  1. Add a row for the new interface in the table.

Extended Pulsar Function SDK for Java | An extension to Pulsar-specific libraries, providing the initialization and close interfaces in java. | Functions that require initializing and releasing external resources.

  1. Add two headings to streamline with the new interface.

Language-native interface

Pulsar Function SDK for Java/Python/Go

Co-authored-by: momo-jun <60642177+momo-jun@users.noreply.github.com>
@wangjialing218
Copy link
Contributor Author

@momo-jun Please have a look

Co-authored-by: momo-jun <60642177+momo-jun@users.noreply.github.com>
Co-authored-by: momo-jun <60642177+momo-jun@users.noreply.github.com>
@momo-jun
Copy link
Contributor

@momo-jun Please have a look

Thank you for making these changes. Looks good to me now.

Hi @nlu90 @merlimat @Anonymitaet, can you please help review this doc PR? Thanks.

import org.apache.pulsar.functions.api.Function;

public class InitializableFunction implements Function<String, String> {
private RedisClient client;
Copy link
Contributor

Choose a reason for hiding this comment

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

this example seems not a complete and build-able, for example, it uses RedisClient but no import, it calls init but havnt declared, so would you please fix this example to be a build and runnable code? thanks.

@Anonymitaet Anonymitaet added this to the 2.10.0 milestone Feb 18, 2022
@wangjialing218
Copy link
Contributor Author

@freeznet Done, please have a check.

Copy link
Contributor

@freeznet freeznet left a comment

Choose a reason for hiding this comment

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

lgtm

@Anonymitaet Anonymitaet merged commit 55b89c6 into apache:master Feb 18, 2022
gaozhangmin pushed a commit to gaozhangmin/pulsar that referenced this pull request Feb 18, 2022
nicoloboschi pushed a commit to nicoloboschi/pulsar that referenced this pull request Mar 1, 2022
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this pull request Apr 20, 2022
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.

4 participants