Session ID Error

2017-06-20 Thread Will Walters
Hello, In attempting to submit a job via Yarn session on Hadoop cluster (using Flink 1.2.1), I get timed out and receive the following error from the server: Discard message LeaderSessionMessage(----,SubmitJob(JobGraph(jobId:

Re: Kafka and Flink integration

2017-06-20 Thread nragon
Do I need to use registerTypeWithKryoSerializer() in my execution environment? My serialization into kafka is done with the following snippet try (ByteArrayOutputStream byteArrayOutStream = new ByteArrayOutputStream(); Output output = new Output(byteArrayOutStream)) { Kryo kryo = new

Custom Gauge Metric is not getting updated on Job Dashboard

2017-06-20 Thread sohimankotia
I was testing flink Gauge metric in my flat map function . I was just sending a value (end time -start time ) of a DB Op in Flatmap . But on dashboard is only showing first value instead of updated value . I am using following code in my flat map . getRuntimeContext() .getMetricGroup()

Access to time in aggregation, or aggregation in ProcessWindowFunction?

2017-06-20 Thread William Saar
Hi, I am looking to implement a window that sends out updates for each new event it receives and also when an expiration timer fires and purges the window (the expiration time can be determined from a timestamp in the first event). I can't figure out a way to do this that does not require

Re: Flink CEP not emitting timed out events properly

2017-06-20 Thread Biplob Biswas
Hi Kostas, Implementing my custom timestamp assigned made em realise a problem which we have in our architecture you may say. Any inputs would be really appreciated. So, for now, we are reading from 4 different kafka topics, and we have a flow similar to something like this: Event 1(on topic

Re: Flink CEP not emitting timed out events properly

2017-06-20 Thread Dawid Wysakowicz
Hi Biplop, If an operator has two inputs, the resulting Watermark is the smallest one from the two upstreams. More on that you can check here .

Re: Queries regarding FlinkCEP

2017-06-20 Thread Dawid Wysakowicz
Hi Biplop, Your recent post on reading from different topics made me realise it may be a problem with "stalled" partitions. Did your topic have more than one partition? If it did, it may be the problem that Watermark is generated independently per partition and then the smallest one is taken as a

Re: Flink CEP not emitting timed out events properly

2017-06-20 Thread Dawid Wysakowicz
It is possible that two Watermarks will be passed through the Stream, but at an operator that has more than one input streams(in your case from different topics and partitions) the smallest Watermark is considered valid and passed downstream. Z pozdrowieniami! / Cheers! Dawid Wysakowicz

Can't get my job restarted on job manager failures

2017-06-20 Thread Mikhail Pryakhin
Hello, I'm currently trying to check whether my job is restarted in case of Job Manager failure. The job is submitted as a single job on YARN with the following options set in the flink-conf.yaml: restart-strategy: fixed-delay restart-strategy.fixed-delay.attempts: 3

Re: Queries regarding FlinkCEP

2017-06-20 Thread Biplob Biswas
Hi dawid, Yes I am reading from multiple topics and yes a few topics have multiple partitions, not all of them. But I didn't understand the concept of stalled partition. -- View this message in context:

Re: Flink CEP not emitting timed out events properly

2017-06-20 Thread Kostas Kloudas
Hi Biplob, You are correct that only a higher watermark leads to discarded events. Are you sure that your custom watermark emitter does not emit a high watermark? E.g. your partition has elements that are far out-of-order. In addition, are you sure that your elements are not simply buffered and

Re: Flink CEP not emitting timed out events properly

2017-06-20 Thread Kostas Kloudas
You are correct that elements are waiting until a watermark with a higher timestamp than theirs (or the patterns timeout) arrives. Now for the Watermark emitter, 1) how do you measure the 10sec in processing time and ii) by how much do you advance the watermark. If you advance it by a lot,

Re: Flink CEP not emitting timed out events properly

2017-06-20 Thread Biplob Biswas
But if that's the case, I don't understand why some of my events are just lost If the watermark which is used is the smallest ... They either I expect a match or I expect a timed out event. The only way I can imagine my events getting lost is higher watermark than the incoming event and

Re: Queries regarding FlinkCEP

2017-06-20 Thread Dawid Wysakowicz
For example if there is no events in one of the partitions the partition will always generate Watermark(Long.MIN_VALUE) which will result in Watermark not being advanced. There is open JIRA to improve such situations: FLINK-5479 . Z

Re: Flink CEP not emitting timed out events properly

2017-06-20 Thread Biplob Biswas
Hi Kostas, I have out-of-orderness of around 5 seconds from what I have observed but that too from events coming from a different topic. The initial topic doesn't have out-of-order events still I have added a generous time bound of 20 seconds. Still, I will try for a higher number just in order

Re: Kafka and Flink integration

2017-06-20 Thread Stephan Ewen
Hi! For general data exchange between systems, it is often good to have a more standard format. Being able to evolve the schema of types is very helpful if you evolve the data pipeline (which almost always happens eventually). For that reason, Avro and Thrift are very popular for that type of

Re: Flink CEP not emitting timed out events properly

2017-06-20 Thread Biplob Biswas
Hi Kostas, Yes, I have a flag in my timestampextractor. As you can see from the code below, I am checking whether currentTime - systemTimeSinceLastModification > 10 sec. as new events come then the watermark wouldn't be incremented. But as soon as I have a difference of more than 10

RE: Kafka and Flink integration

2017-06-20 Thread Nuno Rafael Goncalves
I believe there are some performance impact while de/serializing, which is "normal". What I'm trying to understand is if there are any tips to improve this process. For instance, tuples vs general class types. Do you know if it's worth it to map a custom object into tuple just for

Re: Can't get my job restarted on job manager failures

2017-06-20 Thread Nico Kruber
My best guess here is that the resource manager is still trying to connect to the JobManager which failed - after all, how should it know whether this is a temporary network failure or a permanent failure?! If, after your new JobManager starts, the errors stop as well, I'd say, you don't have

RE: Kafka and Flink integration

2017-06-20 Thread Nuno Rafael Goncalves
Nico, I'll try some different approaches and will be back here, hopefully with some results :) Thanks for this brainstorming :) -Original Message- From: Nico Kruber [mailto:n...@data-artisans.com] Sent: 20 de junho de 2017 16:44 To: Nuno Rafael Goncalves

Re: Can't get my job restarted on job manager failures

2017-06-20 Thread Nico Kruber
Hi Mike, have you configured zookeeper [1] ? afaik, it is required for a high- availability (YARN) session and is used to store JobManager state. Without it, a recovery would not know what to recover from. Nico [1] https://ci.apache.org/projects/flink/flink-docs-release-1.3/setup/

Re: Flink CEP not emitting timed out events properly

2017-06-20 Thread Kostas Kloudas
Are you sure that after incrementing the wm by 1sec, there is no element that will come with a timestamp smaller than this? Or, that after 10sec of inactivity, no element will come with such a timestamp? Kostas > On Jun 20, 2017, at 4:18 PM, Biplob Biswas wrote: > >

Re: Flink CEP not emitting timed out events properly

2017-06-20 Thread Biplob Biswas
I know that there wouldn't be a scenario where the first event type(coming from topic t1) would be coming with a timestamp higher than the current watermark. Although I am still investigating whether the other events from other topics (specifically t3 and t4) are arriving after the watermark

Re: Can't get my job restarted on job manager failures

2017-06-20 Thread Mikhail Pryakhin
Hi Niko, Thanks for your reply! Having zookeeper-related properties configured everything works smoothly! I was confused because the doc references high availability configuration for yarn session mode, anyway thanks a lot! Now I noticed another problem, when I kill the job manager, it then

Re: Kafka watermarks

2017-06-20 Thread Nico Kruber
Can you clarify a bit more on what you want to achieve? Also, what is "BOOTE"? Nico On Tuesday, 20 June 2017 13:45:06 CEST nragon wrote: > When consuming from kafka should we use BOOTE inside consumer or after? > Thanks > > > > -- > View this message in context: >

RE: Kafka and Flink integration

2017-06-20 Thread Tzu-Li (Gordon) Tai
Hi Nuno, In general, if it is possible, it is recommended that you map your generic classes to Tuples / POJOs [1]. For Tuples / POJOs, Flink will create specialized serializers for them, whereas for generic classes (i.e. types which cannot be treated as POJOs) Flink simply fallbacks to using Kryo

Re: Kafka watermarks

2017-06-20 Thread nragon
So, in order to work with event time I have to options, inside kafka consumer or after kafka consumer. The first I can use: FlinkKafkaConsumer09 consumer. consumer. assignTimestampsAndWatermarks() The other option: FlinkKafkaConsumer09 consumer. DataStream dataStream

Re: Kafka and Flink integration

2017-06-20 Thread Nico Kruber
No, this is only necessary if you want to register a custom serializer itself [1]. Also, in case you are wondering about registerKryoType() - this is only needed as a performance optimisation. What exactly is your problem? What are you trying to solve? (I can't read JFR files here, and from

Re: Kafka and Flink integration

2017-06-20 Thread Nico Kruber
I can only repeat what Gordon wrote on Friday: "It’s usually always recommended to register your classes with Kryo [using registerKryoType()], to avoid the somewhat inefficient classname writing. Also, depending on the case, to decrease serialization overhead, nothing really beats specific

Re: Can't get my job restarted on job manager failures

2017-06-20 Thread Mikhail Pryakhin
Thanks a lot Niko! It is definitely a permanent failure, I’ve tried multiple times and always got the same behaviour. And as you said, right after the job manager has started the errors stop as well. I also checked the logs of the Task Manager and found huge amount of the following warnings

Re: Access to time in aggregation, or aggregation in ProcessWindowFunction?

2017-06-20 Thread Nico Kruber
Hi William, I'm not quite sure what you are trying to achieve... What constitutes a "new event"? is this based on some key? If so, you may group on that key, create a window and use a custom trigger [1] instead where you can react in onElement() and setup a event time timer for the first one

RE: Kafka and Flink integration

2017-06-20 Thread Tzu-Li (Gordon) Tai
Yes, POJOs can contain other nested POJO types. You just have to make sure that the nested field is either public, or has a corresponding public getter- and setter- method that follows the Java beans naming conventions. On 21 June 2017 at 12:20:31 AM, nragon

Re: Can't get my job restarted on job manager failures

2017-06-20 Thread Nico Kruber
yes, this supports my theory: both the ResourceManager and the TaskManager instances are trying to reconnect to the old JobManager to re-establish a link in case of temporary failures. * In the best case, the connection is re-established and everything continues. * Since your failure is

RE: Kafka and Flink integration

2017-06-20 Thread nragon
Can i have pojo has composition of other pojo? My custom object has many dependencies and in order to refactor it I must also change another 5 classes as well. -- View this message in context:

RE: Kafka and Flink integration

2017-06-20 Thread nragon
Just one more question :). Considering I'm producing into kafka with other application other than flink, which serializer should i use in order to use pojo types when consuming those same messages (now in flink)? -- View this message in context:

RE: Kafka and Flink integration

2017-06-20 Thread nragon
Thanks, I'll try to refactor into POJOs. -- View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Kafka-and-Flink-integration-tp13792p13879.html Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.

Re: Kafka watermarks

2017-06-20 Thread nragon
I guess using BoundedOutOfOrdernessTimestampExtractor inside consumer will work. Thanks -- View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Kafka-watermarks-tp13849p13880.html Sent from the Apache Flink User Mailing List archive. mailing list