Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"message.timestamp.input" not working? #331

Closed
hifromrio opened this issue Apr 26, 2017 · 0 comments
Closed

"message.timestamp.input" not working? #331

hifromrio opened this issue Apr 26, 2017 · 0 comments

Comments

@hifromrio
Copy link

hifromrio commented Apr 26, 2017

Hi,

I'm trying to parse the date from a JSON file:

secor.common.properties:
message.timestamp.input.pattern:u'MM/dd/yyyy HH:mm:ss'
secor.message.parser.class=com.pinterest.secor.parser.JsonMessageParser

Input:
"u'04/26/2017 14:59:50'"

Output:
java.lang.NumberFormatException: For input string: "u'04/26/2017 14:59:50'"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1250)
at java.lang.Double.valueOf(Double.java:504)
at com.pinterest.secor.parser.JsonMessageParser.extractTimestampMillis(JsonMessageParser.java:42)
at com.pinterest.secor.parser.TimestampedMessageParser.extractPartitions(TimestampedMessageParser.java:175)
at com.pinterest.secor.parser.MessageParser.parse(MessageParser.java:60)
at com.pinterest.secor.consumer.Consumer.consumeNextMessage(Consumer.java:145)
at com.pinterest.secor.consumer.Consumer.run(Consumer.java:98)

I think, the pattern is not even used, because if the pattern was wrong, the result would be a java.text.ParseException. It looks like the pattern is not even used, but I don't know why. Any help is highly appreciated...

Best Regards
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant