Skip to content

got null pointerException when use --window-length-duration-ms #6678

Description

@bback99

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions