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

Support key based batch builder for Go Functions #8761

Merged

Conversation

wolfstudy
Copy link
Member

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

Motivation

The changing base on #8523

Modifications

Support key_based batch builder for Go Functions

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

/pulsarbot run-failure-checks

1 similar comment
@wolfstudy
Copy link
Member Author

/pulsarbot run-failure-checks

Copy link
Contributor

@codelipenghui codelipenghui left a comment

Choose a reason for hiding this comment

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

Could you please a unit test for this change?

@wolfstudy
Copy link
Member Author

Could you please a unit test for this change?

In fact, in the integration test, we already test this case.

In generateCreateFunctionCommand(), we add the command as follows:

        if (batchBuilder != null) {
            commandBuilder.append("--batch-builder" + batchBuilder);
        }

And in create different language functions, we will use generateCreateFunctionCommand res to test different case.

        switch (runtime){
            case JAVA:
                command = generator.generateCreateFunctionCommand();
                break;
            case PYTHON:
            case GO:
                generator.setRuntime(runtime);
                command = generator.generateCreateFunctionCommand(functionFile);
                break;
            default:
                throw new IllegalArgumentException("Unsupported runtime : " + runtime);
        }

@wolfstudy
Copy link
Member Author

stderr: 
Error:  Tests run: 20, Failures: 1, Errors: 0, Skipped: 1, Time elapsed: 889.319 s <<< FAILURE! - in TestSuite
Error:  testBookKeeperDown(org.apache.pulsar.tests.integration.cli.HealthCheckTest)  Time elapsed: 0.176 s  <<< FAILURE!
org.apache.pulsar.tests.integration.docker.ContainerExecException: pkill -STOP -f BookieServer failed on a7586c3276f50e9b34e60153710166022c4886da5f5b3f984e804cb8ee9cc99c with error code 1
	at org.apache.pulsar.tests.integration.utils.DockerUtils$2.onComplete(DockerUtils.java:259)
	at com.github.dockerjava.core.exec.AbstrAsyncDockerCmdExec$1.onComplete(AbstrAsyncDockerCmdExec.java:51)
	at com.github.dockerjava.okhttp.OkHttpInvocationBuilder.lambda$executeAndStream$4(OkHttpInvocationBuilder.java:331)
	at java.lang.Thread.run(Thread.java:748)

@wolfstudy wolfstudy merged commit c3b785a into apache:master Dec 3, 2020
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