return count;
}
}
TIA,
On Wed, May 1, 2019 at 1:39 PM Vijay Balakrishnan
wrote:
> Hi,
> Had asked this questions earlier as topic - "Flink - Type Erasure
> Exception trying to use Tuple6 instead of Tuple"
>
> Having issues defining a generic Tupl
Hi,
Had asked this questions earlier as topic - "Flink - Type Erasure Exception
trying to use Tuple6 instead of Tuple"
Having issues defining a generic Tuple instead of a specific Tuple1,Tuple2
etc.
Exception in thread "main"
org.apache.flink.api.common.functions.InvalidType
Thx for all your replies. Solved the problem by skirting the issue. I
pre-populated the incoming Monitoring Object on intake with the dynamic
runtime fields keyName and keyValue and that way, I could use the static
call as used in all the other if conditions:
monitoringTupleKeyedStream = kinesisS
I agree with Timothy, POJO would be a much better approach.
However, If you are trying to build some generic framework and for
different streams, there would be different fields, you can follow the Map
approach. For the latter approach, you need to write extra mapper class
which will convert all t
Could this just be solved by creating a POJO model class for your problem?
That is, instead of using Tuple6 - create a class that encapsulates your
data. This, I think, would solve your problem. But beyond that I think
the code will be more understandable. It's hard to have a Tuple6 of all
Str
> I tried using [ keyBy(KeySelector, TypeInformation) ]
What was the result of this approach?
On 03/04/2019 17:36, Vijay Balakrishnan wrote:
Hi Tim,
Thanks for your reply. I am not seeing an option to specify a
.returns(new TypeHintString,String,String,String,String>>(){}) with KeyedStream ??
Hi Tim,
Thanks for your reply. I am not seeing an option to specify a .returns(new
TypeHint>(){}) with
KeyedStream ??
> monitoringTupleKeyedStream = kinesisStream.keyBy(new
> KeySelector() {
> public Tuple getKey(Monitoring mon) throws Exception {..return
> new Tuple6<>(..}})
Flink needs type information for serializing and deserializing objects, and
that is lost due to Java type erasure. The only way to workaround this is
to specify the return type of the function called in the lambda.
Fabian's answer here explains it well.
https://stackoverflow.com/questions/50945
Hi,
I am trying to use the KeyedStream with Tuple to handle diffrent types of
Tuples including Tuple6.
Keep getting the Exception:
*Exception in thread "main"
org.apache.flink.api.common.functions.InvalidTypesException: Usage of class
Tuple as a type is not allowed. Use a concrete subclass (e.g. Tu
Hi Gabriele
Type extraction of java 8 lambdas is not yet supported in IntelliJ Idea IDE.
You may solve the issues by following one of the below options.
1. Provide type hints
https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/types_serialization.html#type-hints-in-the-java-api
2. Se
Hi guys,
When I run my Flink topology (locally) I get this error:
The return type of function 'main(Job.java:69)' could not be determined
automatically, due to type erasure. You can give type information hints by
using the returns(...) method on the result of the transformation call, or by
let
11 matches
Mail list logo