[
https://issues.apache.org/jira/browse/PHOENIX-1142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14302078#comment-14302078
]
Jeffrey Zhong commented on PHOENIX-1142:
----------------------------------------
{quote}
The SimpleDateFormat is not thread safe for parsing, so you can't store it in a
local like this in DateUtil (but maybe I'm missing something?):
{quote}
That's a good point. Let me address this.
{quote}
There's a facility to set the date timezone and date format on a config
property which might occur at connection time. This code seems to disable that?
{quote}
The logic is same as before.
{quote}
It appears that the default date parsing is being set as a static variable
(JVM-wide), while ConnectionQueryServicesImpl is a per cluster object. This
doesn't seem to be correct. I think we should consider where the DateTimeParser
should live/be scoped to:
{quote}
I do want to initialize in JVM global level because it will only initialize
once even in each connection creation time. Since I need to read the
configuration, that's why I put it here. Let me to see if I can remove this
line.
{quote}
What will the impact be of changing the DATE_TIME_PARSER (now
ISO_DATE_TIME_PARSER) on CSV bulk loading?
{quote}
This change has no impact. It allows the parser can parse time string in old
format 'YYYY-MM-DD HH:MM:SS.zzz" plus ISO time as well.
> Improve CsvBulkLoadTool to parse different Date formats
> -------------------------------------------------------
>
> Key: PHOENIX-1142
> URL: https://issues.apache.org/jira/browse/PHOENIX-1142
> Project: Phoenix
> Issue Type: Improvement
> Reporter: David Kjerrumgaard
> Assignee: Jeffrey Zhong
> Attachments: PHOENIX-1142.patch
>
>
> Currently, the CsvBulkLoadTool uses a single 'default' format to parse dates
> from the source CSV file. This can sometimes cause issues when the date
> fields don't match this default format.
> Would it be possible to add a method for specifying / overriding the
> 'default' date format?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)