Skip to content

Conversation

@wolfstudy
Copy link
Member

Signed-off-by: xiaolong.ran rxl@apache.org

Motivation

Currently, we support the Key_Shared subscription mode in Pulsar Function. In order to ensure that when batch is turned on, we can also ensure that messages are distributed to different consumers in the correct order, so we need to support the batch builder of KEY_BASED in Pulsar Functions.

Modifications

  • Add --batch-builder for Pulsar Functions
  • Add --batch-builder for Pulsar Sources
  • Add test case

Signed-off-by: xiaolong.ran <rxl@apache.org>
@wolfstudy wolfstudy self-assigned this Nov 11, 2020
@wolfstudy wolfstudy added this to the 2.7.0 milestone Nov 11, 2020
Signed-off-by: xiaolong.ran <rxl@apache.org>
@wolfstudy
Copy link
Member Author

/pulsarbot run-failure-checks

Signed-off-by: xiaolong.ran <rxl@apache.org>
Copy link
Member

@sijie sijie left a comment

Choose a reason for hiding this comment

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

Overall looks good. However, I didn't see any test case. Can you add one?

Signed-off-by: xiaolong.ran <rxl@apache.org>
@wolfstudy
Copy link
Member Author

Overall looks good. However, I didn't see any test case. Can you add one?

The current unit tests can be covered. The change of this pull request is to add a batchBuilder field to ProducerConfig. The current unit test framework covers the Pojo object ProducerConfig, so we only need to add this field to the existing unit test framework. Refer to pulsar-functions/utils/src/test/java/org/apache/pulsar/functions/utils/SourceConfigUtilsTest.java and pulsar-functions/utils/src/test/java/org/apache/pulsar/functions/utils/FunctionConfigUtilsTest.java.

@wolfstudy
Copy link
Member Author

You mean, do we add another integration test on top of the unit test?

Signed-off-by: xiaolong.ran <rxl@apache.org>
Signed-off-by: xiaolong.ran <rxl@apache.org>
@wolfstudy
Copy link
Member Author

@sijie PTAL again thanks. I added the --batch-builder parameter to the existing integration test to confirm whether this parameter is correctly identified.

@sijie sijie merged commit 8da9422 into apache:master Nov 16, 2020
flowchartsman pushed a commit to flowchartsman/pulsar that referenced this pull request Nov 17, 2020
### Motivation

Currently, we support the Key_Shared subscription mode in Pulsar Function. In order to ensure that when batch is turned on, we can also ensure that messages are distributed to different consumers in the correct order, so we need to support the batch builder of `KEY_BASED` in Pulsar Functions.

### Modifications

- Add `--batch-builder` for Pulsar Functions
- Add `--batch-builder` for Pulsar Sources
- Add test case
codelipenghui pushed a commit that referenced this pull request Nov 22, 2020
### Motivation

The changing base on #8523 

### Modifications

Support key_base  for python function
wolfstudy added a commit that referenced this pull request Dec 3, 2020
Signed-off-by: xiaolong.ran <rxl@apache.org>

### Motivation

The changing base on #8523

### Modifications

Support key_based batch builder for Go Functions
RobertIndie pushed a commit to RobertIndie/pulsar that referenced this pull request Dec 8, 2020
Signed-off-by: xiaolong.ran <rxl@apache.org>

### Motivation

The changing base on apache#8523

### Modifications

Support key_based batch builder for Go Functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants