Pulsar: got `null` pointerException when use --window-length-duration-ms

Created on 6 Apr 2020  路  7Comments  路  Source: apache/pulsar

Describe the bug

I'd like to implement pulsar functions with --window-length-duration-ms
realized only the class that inherited from java.util.function.Function class can do.

However, other function that inherited from this
org.apache.pulsar.functions.api.WindowFunction
throws exception
_Function class org.apache.pulsar.functions.api.examples.ContextWindowFunction does not implement the correct interface_

other function that inherited from this
org.apache.pulsar.functions.api.Function
throws exception
_Exception in thread "main" java.lang.NullPointerException_

Is there any specific reason why those two functions are not supported windowing feature?
or
if should work properly, can I find out any better examples with command line?

To Reproduce
Steps to reproduce the behavior:

  1. go to org.apache.pulsar.functions.api.examples.ContextWindowFunction in pulsar-function and run with --window-length-duration-ms 6000
    or
    go to org.apache.pulsar.functions.api.examples.CustomDerivedToBaseFunction in pulsar-function and run with --window-length-duration-ms 6000
triagweek-15 typbug

Most helpful comment

@wolfstudy #6246 appears to be in 2.5.1 , so it's in the release candidate now.

The #6246 will be cherry-pick to 2.5.1, when pulsar 2.5.1 is released, the issue will be fixed. And @tuteng is working this.

All 7 comments

@qmnonic Thanks for the information. @bback99 which version of Pulsar are you using?

I am using 2.4.1.
also tested in 2.5.0, but the same error.

Looks like it was introduced in 2.4.1, by this PR - https://github.com/apache/pulsar/pull/4844 , issue shouldn't exist in 2.4.0. Waiting for a binary build of 2.5.1-candidate-1 ( https://github.com/apache/pulsar/releases/tag/v2.5.1-candidate-1 ) or a way to build it, to validate.

@qmnonic @bback99 Thanks feedback, The issue has been fixed in #6246, this change will be built in 2.6.0.

@wolfstudy https://github.com/apache/pulsar/pull/6246 appears to be in 2.5.1 , so it's in the release candidate now.

@wolfstudy #6246 appears to be in 2.5.1 , so it's in the release candidate now.

The #6246 will be cherry-pick to 2.5.1, when pulsar 2.5.1 is released, the issue will be fixed. And @tuteng is working this.

Was this page helpful?
0 / 5 - 0 ratings