question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
wolfstudycommented, Apr 17, 2020

@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.

1reaction
qmnoniccommented, Apr 7, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Handle NullPointerException in Java - freeCodeCamp
The reason you are getting this error is because we are trying to perform the length() operation on str1 which is null ....
Read more >
java - NullPointerException thrown when instantiating and ...
I download the SWT Source code and the exception get's thrown at line 392 of OleClientSite at this line. if (result != COM.S_OK)...
Read more >
How to Fix and Avoid NullPointerException in Java - Rollbar
The NullPointerException occurs due to a situation in application code where an uninitialized object is attempted to be accessed or modified.
Read more >
NullReferenceException Class (System) - Microsoft Learn
The exception that is thrown when there is an attempt to dereference a null object reference.
Read more >
Attempt to get length of null array on some Huawei devices ...
Steps to Reproduce 1.crash log shows this error Expected Behavior no crash Actual Behavior crashed, here's the log: java.lang.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found