Re: debug statefun

2020-11-11 Thread Igal Shilman
Glad to hear that it worked out! On Wed, Nov 11, 2020 at 9:07 AM Lian Jiang wrote: > Just realized making autoservice class discoverable also solved "There are > no routers defined" mentioned by Puneet. Yes, harness does test statefun > module discovery. Thanks. > > On Tue, Nov 10, 2020 at 9:57

Re: debug statefun

2020-11-11 Thread Lian Jiang
Just realized making autoservice class discoverable also solved "There are no routers defined" mentioned by Puneet. Yes, harness does test statefun module discovery. Thanks. On Tue, Nov 10, 2020 at 9:57 PM Tzu-Li (Gordon) Tai wrote: > On Wed, Nov 11, 2020 at 1:44 PM Tzu-Li (Gordon) Tai >

Re: debug statefun

2020-11-10 Thread Tzu-Li (Gordon) Tai
On Wed, Nov 11, 2020 at 1:44 PM Tzu-Li (Gordon) Tai wrote: > Hi Lian, > > Sorry, I didn't realize that the issue you were bumping into was caused by > the module not being discovered. > You're right, the harness utility would not help here. > Actually, scratch this comment. The Harness utility

Re: debug statefun

2020-11-10 Thread Lian Jiang
Thanks Gordon. After better understanding how autoservice work, I resolved the issue by adding below into my build.gradle file: annotationProcessor 'com.google.auto.service:auto-service:1.0-rc6' Without this, the project can compile but the autoservice class cannot be generated appropriately.

Re: debug statefun

2020-11-10 Thread Tzu-Li (Gordon) Tai
Hi Lian, Sorry, I didn't realize that the issue you were bumping into was caused by the module not being discovered. You're right, the harness utility would not help here. As for the module discovery problem: - Have you looked at the contents of your jar, and see that a

Re: debug statefun

2020-11-10 Thread Puneet Kinra
Hi Gordan I have tried the harness utility , I am getting the below error even though @*autoservice *annotation is there in function Module . java.lang.IllegalStateException: There are no routers defined. at

Re: debug statefun

2020-11-10 Thread Lian Jiang
Igal, I am using AutoService and I don't need to add auto-service-annotations since it is provided by statefun-flink-core. Otherwise, my project cannot even build. I did exactly the same as

Re: debug statefun

2020-11-10 Thread Igal Shilman
Hi Lian, If you are using the statefun-sdk directly (an embedded mode) then, most likely is that you are missing a META-INF/services/org.apache.flink.statefun.sdk.spi.StatefulFunctionModule file that would point to your modules class. We are using Java SPI [1] to load all the stateful functions

Re: debug statefun

2020-11-10 Thread Tzu-Li (Gordon) Tai
Hi, StateFun provide's a Harness utility exactly for that, allowing you to test a StateFun application in the IDE / setting breakpoints etc. You can take a look at this example on how to use the harness:

debug statefun

2020-11-09 Thread Lian Jiang
Hi, I created a POC by mimicing statefun-greeter-example. However, it failed due to: Caused by: java.lang.IllegalStateException: There are no ingress defined. at org.apache.flink.statefun.flink.core.StatefulFunctionsUniverseValidator.validate(StatefulFunctionsUniverseValidator.java:25)