flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wei-Che Wei (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLINK-6211) Validation error in Kinesis Consumer when using AT_TIMESTAMP as start position
Date Wed, 29 Mar 2017 06:41:41 GMT
Wei-Che Wei created FLINK-6211:
----------------------------------

             Summary: Validation error in Kinesis Consumer when using AT_TIMESTAMP as start
position
                 Key: FLINK-6211
                 URL: https://issues.apache.org/jira/browse/FLINK-6211
             Project: Flink
          Issue Type: Bug
            Reporter: Wei-Che Wei


{code}
private static void validateOptionalDateProperty(Properties config, String key, String message)
{
    if (config.containsKey(key)) {
        try {
            initTimestampDateFormat.parse(config.getProperty(key)); —
            double value = Double.parseDouble(config.getProperty(key)); —
            if (value < 0) { throw new NumberFormatException(); }
        } catch (ParseException | NumberFormatException e){
            throw new IllegalArgumentException(message); }
        }
    }
}
{code}
This validation function will always fail regardless of either string format or double type.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message