You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Jungtaek Lim (JIRA)" <ji...@apache.org> on 2017/12/12 09:47:00 UTC
[jira] [Comment Edited] (AMBARI-22633) MapDate provides the date
incorrectly when Filter is cloned and used in multi-threads
[ https://issues.apache.org/jira/browse/AMBARI-22633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16287323#comment-16287323 ]
Jungtaek Lim edited comment on AMBARI-22633 at 12/12/17 9:46 AM:
-----------------------------------------------------------------
I've heard that we're reworking LogFeeder in trunk, so I'm intending to make smallest change here. Using Date classes in under JDK 1.8 is not recommended and that's why joda-time is popular, but I'd just replace SimpleDateFormat with FastDateFormat in commons-lang3.
was (Author: kabhwan):
I've heard that we're reworking LogFeeder in trunk, I'm intending to make smallest change here. Using Date classes in under JDK 1.8 is not recommended and that's why joda-time is popular, but I'd just replace SimpleDateFormat with FastDateFormat in commons-lang3.
> MapDate provides the date incorrectly when Filter is cloned and used in multi-threads
> -------------------------------------------------------------------------------------
>
> Key: AMBARI-22633
> URL: https://issues.apache.org/jira/browse/AMBARI-22633
> Project: Ambari
> Issue Type: Bug
> Components: logsearch
> Affects Versions: 2.6.1
> Reporter: Jungtaek Lim
> Assignee: Jungtaek Lim
> Priority: Critical
> Attachments: AMBARI-22633-branch-2.6.patch
>
>
> In AMBARI-22600, we cloned the Filter instance to assign the instance per child thread, which also clones the map of Mapper. Other Mapper implements only have String(s) type of fields hence thread-safe, but MapperDate has SimpleDateFormat type of fields which is known as non thread-safe, so cloning the Filter which has one or more MapperDate and using them concurrently makes multi-threads issue.
> For example I'm seeing the logdate improperly stored.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)