flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonard Xu <xbjt...@gmail.com>
Subject Re: Change to StreamingFileSink in Flink 1.10
Date Tue, 21 Apr 2020 14:15:16 GMT
Thanks @Seth Wiesman
Ah,I just found I used 1.10-SNAPSHOT locally so can not reproduce the bug.
@Averell you can use casts first and wait for 1.10.1 version, 1.10.1 will release soon.

Best,
Leonard


> 在 2020年4月21日,22:03,Seth Wiesman <sjwiesman@gmail.com> 写道:
> 
> Hi All, 
> 
> There is a bug in the builder that prevents it from compiling in scala due to differences
in type inference between java and scala[1]. It as already been resolved for 1.10.1 and 1.11.
In the meantime, just go ahead and use casts or construct the object in a java class. 
> 
> Seth
> 
> [1] https://issues.apache.org/jira/browse/FLINK-16684 <https://issues.apache.org/jira/browse/FLINK-16684>
> On Tue, Apr 21, 2020 at 7:33 AM Leonard Xu <xbjtdcq@gmail.com <mailto:xbjtdcq@gmail.com>>
wrote:
> Hi, Averell
> 
> I found you’re using scala so I reproduced your case local in Scala 2.11.12 with Flink
1.10.0 and it works too. 
> From your picture it’s wired  that line`.withBucketAssigner(new DateTimeBucketAssigner)`
hint is `Any`, 
> it should be `RowFormatBuilder` otherwise you can not call `#build` function from an
`Any` object. 
> You can debug this line and to see what happened.
> 
> 
> Best,
> Leonard
> 
> 
> 
> > 在 2020年4月21日,17:47,Averell <lvhuyen@gmail.com <mailto:lvhuyen@gmail.com>>
写道:
> > 
> > Hello Leonard, Sivaprasanna,
> > 
> > But my code was working fine with Flink v1.8.
> > I also tried with a simple String DataStream, and got the same error.
> > /        StreamingFileSink
> >          .forRowFormat(new Path(path), new SimpleStringEncoder[String]())
> >          .withRollingPolicy(DefaultRollingPolicy.builder().build())
> >          .withBucketAssigner(new DateTimeBucketAssigner)
> >          .build()/
> > (screenshot below)
> > <http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/file/t1586/FlinkError.png
<http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/file/t1586/FlinkError.png>>

> > 
> > It's weird. At first I thought it's something wrong with IntelliJ, but I got
> > the same error when running mvn from commandline.
> > 
> > 
> > 
> > 
> > 
> > 
> > --
> > Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
<http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/>
> 


Mime
View raw message