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

[improve][doc] Add doc for builtin functions #18569

Merged
merged 7 commits into from
Nov 24, 2022

Conversation

cbornet
Copy link
Contributor

@cbornet cbornet commented Nov 22, 2022

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: cbornet#9

@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 Nov 22, 2022
@cbornet cbornet changed the title Add doc for builtin functions [improve][doc] Add doc for builtin functions Nov 22, 2022
Copy link
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution @cbornet! Comments inline.

Also, you need to add the functions-deploy-cluster-builtin doc to sidebars.json so that it shows on the sidebar.

BTW, you can read the Preview Guide to preview locally.

site2/docs/functions-deploy-cluster-builtin.md Outdated Show resolved Hide resolved
Comment on lines 15 to 25
:::note

If you plan to package and distribute your function for others to use, you are obligated to
license and copyright your own code properly. Remember to add the license and copyright to
all libraries your code uses and to your distribution.

:::

> If you use the [NAR](#package-as-nar) method, the NAR plugin
automatically creates a `DEPENDENCIES` file in the generated NAR package, including the proper
licensing and copyrights of all libraries of your function.
Copy link
Member

Choose a reason for hiding this comment

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

They seem similar notes/tips, why different syntax?

You may read the syntax guide (https://pulsar.apache.org/contribute/document-syntax/#admonitions) for what is expected here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

site2/docs/functions-package-java.md Outdated Show resolved Hide resolved
Comment on lines 171 to 177
You must also create a `resources/META-INF/services/pulsar-io.yaml` file. In the following code sample, the value of `functionClass` is your function class name. The `name` is the one used when the Function is deployed as a [built-in](functions-deploy-cluster-builtin.md) one.

```yaml
name: java-function
description: my java function
functionClass: org.example.test.ExclamationFunction
```
Copy link
Member

Choose a reason for hiding this comment

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

Also one-level ident?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

site2/docs/functions-package-java.md Outdated Show resolved Hide resolved
Copy link
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

LGTM.

@cbornet
Copy link
Contributor Author

cbornet commented Nov 23, 2022

I removed usage of available-functions and reload as they are not part of next/2.11

---
id: functions-deploy-cluster-builtin
title: Built-in functions
sidebar_label: "Built-in functions"
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a task-oriented topic for users. So it makes more sense to use an imperative title, like Use built-in functions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@cbornet cbornet requested a review from momo-jun November 24, 2022 10:41
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.

LGTM.
Thanks for adding the docs. It deserves a feature rather than Improve in the PR title :)

@tisonkun
Copy link
Member

tisonkun commented Nov 24, 2022

Merging...

@tisonkun tisonkun merged commit 7dc6700 into apache:master Nov 24, 2022
lifepuzzlefun pushed a commit to lifepuzzlefun/pulsar that referenced this pull request Dec 9, 2022
@cbornet cbornet deleted the builtin-functions-doc branch December 25, 2022 20:26
lifepuzzlefun pushed a commit to lifepuzzlefun/pulsar that referenced this pull request Jan 10, 2023
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. ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants