Stateful functions Harness

2020-05-21 Thread Boris Lublinsky
Hi, I am trying to run https://github.com/apache/flink-statefun/tree/master/statefun-examples/statefun-greeter-example locally using https://github.com/apache/flink-statefun/tree/master/statefun-

Re: Stateful functions Harness

2020-05-21 Thread Boris Lublinsky
Also, where do I put flint-conf.yaml in Idea to add additional required config parameter: classloader.parent-first-patterns.additional: org.apache.flink.statefun;org.apache.kafka;com.google.protobuf > On May 21, 2020, at 12:22 PM, Boris Lublinsky > wrote: > > Hi, > I am trying to run > htt

Re: Stateful functions Harness

2020-05-21 Thread Tzu-Li (Gordon) Tai
Hi, On Fri, May 22, 2020 at 7:19 AM Boris Lublinsky < boris.lublin...@lightbend.com> wrote: > Also, where do I put flint-conf.yaml in Idea to add additional required > config parameter: > > classloader.parent-first-patterns.additional: > org.apache.flink.statefun;org.apache.kafka;com.google.prot

Re: Stateful functions Harness

2020-05-21 Thread Tzu-Li (Gordon) Tai
Sorry, forgot to cc user@ as well in the last reply. On Fri, May 22, 2020 at 12:01 PM Tzu-Li (Gordon) Tai wrote: > As an extra note, the utilities you will find in `statefun-e2e-tests`, > such as the `StatefulFunctionsAppsContainers` is not yet intended for users. > This however was previously d

Re: Stateful functions Harness

2020-05-21 Thread Tzu-Li (Gordon) Tai
Are you getting an exception from running the Harness? The Harness should already have the required configurations, such as the parent first classloading config. Otherwise, if you would like to add your own configuration, use the `withConfiguration` method on the `Harness` class. On Fri, May 22,

Re: Stateful functions Harness

2020-05-21 Thread Tzu-Li (Gordon) Tai
Hi, Sorry, I need to correct my comment on using the Kafka ingress / egress with the Harness. That is actually doable, by adding an extra dependency to `statefun-flink-distribution` in your Harness program. That pulls in all the other required dependencies required by the Kafka ingress / egress,

Re: Stateful functions Harness

2020-05-22 Thread Boris Lublinsky
Thanks, I will try your suggestions. One more question. Is StatefulFunctionJob the one that is used for Stateful function execution in the docker case? > On May 22, 2020, at 12:03 AM, Tzu-Li (Gordon) Tai wrote: > > Hi, > > Sorry, I need to correct my comment on using the Kafka ingress / egre

Re: Stateful functions Harness

2020-05-22 Thread Boris Lublinsky
Also there seems to be a problem in this class public final class Modules When I am running Harness example it fails with the error Exception in thread "main" java.lang.IllegalStateException: There are no routers defined. at org.apache.flink.statefun.flink.core.StatefulFunctionsUniverse

Re: Stateful functions Harness

2020-05-27 Thread Boris Lublinsky
The project https://github.com/apache/flink-statefun/tree/release-2.0/statefun-examples/statefun-flink-harness-example Does not work in Intellij. The problem is that when running in Inte

Re: Stateful functions Harness

2020-05-27 Thread Tzu-Li (Gordon) Tai
Hi, The example is working fine on my side (also using IntelliJ). This could most likely be a problem with your project setup in the IDE, where the classpath isn't setup correctly. What do you see when you right click on the statefun-flink-harness-example directory (in the IDE) --> Open Module Se

Re: Stateful functions Harness

2020-05-27 Thread Boris Lublinsky
I think I figured this out. The project seems to be missing resources /META-INF

Re: Stateful functions Harness

2020-05-27 Thread Tzu-Li (Gordon) Tai
On Thu, May 28, 2020, 12:19 AM Boris Lublinsky < boris.lublin...@lightbend.com> wrote: > I think I figured this out. > The project seems to be missing > > resources > > /META-INF >

Re: Stateful functions Harness

2020-05-27 Thread Boris Lublinsky
Ok, so the bug in the examples is an absence of resources. Having classes in the classpath is not sufficient Modules.java is using ServiceLoader, which is setting private static final String PREFIX = "META-INF/services/" So all the modules have to be listed in the resource files > On May 27, 2

Re: Stateful functions Harness

2020-05-27 Thread Boris Lublinsky
Thats not exactly the usage question that I am asking When I am writing IO module I have to write Ingress and Egress spec. You have an example for Kafka, which looks like def getIngressSpec: IngressSpec[GreetRequest] = KafkaIngressBuilder.forIdentifier(GREETING_INGRESS_ID) .withKafkaAddress(

Re: Stateful functions Harness

2020-05-27 Thread Seth Wiesman
Hi Boris, Example usage of flink sources and sink is available in the documentation[1]. [1] https://ci.apache.org/projects/flink/flink-statefun-docs-release-2.0/io-module/flink-connectors.html On Wed, May 27, 2020 at 1:08 PM Boris Lublinsky < boris.lublin...@lightbend.com> wrote: > Thats not ex

Re: Stateful functions Harness

2020-05-27 Thread Boris Lublinsky
Thanks Seth Will take a look. > On May 27, 2020, at 3:15 PM, Seth Wiesman wrote: > > Hi Boris, > > Example usage of flink sources and sink is available in the documentation[1]. > > [1] > https://ci.apache.org/projects/flink/flink-statefun-docs-release-2.0/io-module/flink-connectors.html >

Re: Stateful functions Harness

2020-05-28 Thread Boris Lublinsky
Also I have noticed, that a few cludstate jars including statefun-flink-core, statefun-flink-io, statefun-flink-harness are build for Scala 11, is it possible to create versions of those for Scala 12? > On May 27, 2020, at 3:15 PM, Seth Wiesman wrote: > > Hi Boris, > > Example usage of flink