[
https://issues.apache.org/jira/browse/FLINK-6211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15946644#comment-15946644
]
ASF GitHub Bot commented on FLINK-6211:
---------------------------------------
GitHub user tony810430 opened a pull request:
https://github.com/apache/flink/pull/3637
[FLINK-6211] [kinesis] Validation error in Kinesis Consumer when using
AT_TIMESTAMP as start position
Address the bug in validation function to check if the date string is well
formed when using AT_TIMESTAMP as start position.
This function needs to check if one of the two conditions is passed, but I
made a mistake to check all conditions should be passed. That causes the
problem.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tony810430/flink FLINK-6211
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/3637.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3637
----
commit cb14ddcffdcbbd6fc84619aab475d7b9ff6d1644
Author: Tony Wei <[email protected]>
Date: 2017-03-29T07:08:04Z
[FLINK-6211] Validation error in Kinesis Consumer when using AT_TIMESTAMP
as start position
----
> 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
> Components: Kinesis Connector
> Reporter: Wei-Che Wei
> Priority: Blocker
> Fix For: 1.3.0, 1.2.1
>
>
> {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)