You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Zhipeng Zhang (Jira)" <ji...@apache.org> on 2023/04/03 07:17:00 UTC

[jira] [Resolved] (FLINK-31623) Fix DataStreamUtils#sample with approximate uniform sampling

     [ https://issues.apache.org/jira/browse/FLINK-31623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhipeng Zhang resolved FLINK-31623.
-----------------------------------
    Resolution: Fixed

Resolved on master via fe338b194b73fd51218f4d842fa7b0065fb76c56

> Fix DataStreamUtils#sample with approximate uniform sampling
> ------------------------------------------------------------
>
>                 Key: FLINK-31623
>                 URL: https://issues.apache.org/jira/browse/FLINK-31623
>             Project: Flink
>          Issue Type: Bug
>          Components: Library / Machine Learning
>            Reporter: Fan Hong
>            Priority: Major
>              Labels: pull-request-available
>
> Current implementation employs two-level sampling method.
> However, when data instances are imbalanced distributed among partitions (subtasks), the probabilities of instances to be sampled are different in different partitions (subtasks), i.e., not a uniform sampling.
>  
> In addition, one side-effect of current implementation is: one subtask has a memory footprint of `2 * numSamples * sizeof(element)`, which could cause unexpected OOM in some situations.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)