[ 
https://issues.apache.org/jira/browse/FLINK-13843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16915232#comment-16915232
 ] 

Kostas Kloudas edited comment on FLINK-13843 at 8/25/19 12:24 PM:
------------------------------------------------------------------

The problem is that the policy must have the same {{BucketID}} as the assigner 
and the current set up is the only way to guarantee that. Essentially either 
you change both or none (in the case of the row format builder). 

 

The {{.withBucketAssigner()}} provides the option to change the assigner 
*without* changing the {{BucketID}}.


was (Author: kkl0u):
The problem is that the policy must have the same {{BucketID}} as the assigner 
and the current set up is the only way to guarantee that. Essentially either 
you change both or none (in the case of the row format builder).

> Unify and clean up StreamingFileSink format builders
> ----------------------------------------------------
>
>                 Key: FLINK-13843
>                 URL: https://issues.apache.org/jira/browse/FLINK-13843
>             Project: Flink
>          Issue Type: Improvement
>          Components: API / DataStream, Connectors / FileSystem
>    Affects Versions: 1.10.0
>            Reporter: Gyula Fora
>            Priority: Major
>
> I think the StreamingFileSink contains some problems that will affect us in 
> the long-run if we intend this sink to be the main exactly-once FS sink.
> *1. Code duplication*
> The StreamingFileSink currently has 2 builders for row and bulk formats:
> RowFormatBuilder, BulkFormatBuilder
> They both contain almost exactly the same config settings with a lot of code 
> duplication that should be moved to a common superclass 
> (StreamingFileSink.BucketsBuilder). 
> *2. Inconsistent config options*
> I also noticed some strange/invalid configuration settings for the builders:
>  - RowFormatBuilder#withBucketAssignerAndPolicy : feels like an internal 
> method that is not used anywhere. It also overwrites the bucket factory
> - BulkFormatBuilder#withBucketAssigner : takes an extra type parameter 
> compared to the row format for the bucket ID type
> -  BulkFormatBuilder#withBucketCheckInterval : does not affect behavior as it 
> always uses the OnCheckpointRollingPolicy
> This can probably solved by fixing the code duplication
> *3. Fragmented configuration*
> This is not a big problem but only affects the part file config options that 
> were introduced recently. We have added 2 methods: withPartFilePrefix and 
> withPartFileSuffix
> I think we should aim to group configs that belong together -> 
> withPartFileConfig
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to