[ https://issues.apache.org/jira/browse/FLINK-35820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dawid Wysakowicz closed FLINK-35820. ------------------------------------ Resolution: Fixed Fixed in 98e07d14213e2b739ac231f1863b1b6f71031851 > Converting Duration to String fails for big values > -------------------------------------------------- > > Key: FLINK-35820 > URL: https://issues.apache.org/jira/browse/FLINK-35820 > Project: Flink > Issue Type: Bug > Components: API / Core > Affects Versions: 1.19.1 > Reporter: Dawid Wysakowicz > Assignee: Dawid Wysakowicz > Priority: Major > Labels: pull-request-available > Fix For: 2.0.0 > > > We support {{ConfigOption}} with {{Duration}} type. The {{Configuration}} > class can read/write {{Duration}} from/to {{String}}. Unfortunately the > conversion fails for values that do not fit into {{long}} after conversion to > nanos. > E.g. > {code} > final ConfigOption<Duration> option = ConfigOptions > .key("duration") > .durationType() > .noDefaultValue(); > final Configuration config = new Configuration(); > config.set(option, Duration.ofMillis(Long.MAX_VALUE)); > config.toFileWritableMap(); > {code} > fails with {{java.lang.ArithmeticException: long overflow}} -- This message was sent by Atlassian Jira (v8.20.10#820010)