----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64531/#review193537 -----------------------------------------------------------
Ship it! Pobably that would be better if we would clone all of the mapper types as well. But that wont hurt so +1 - Oliver Szabo On Dec. 12, 2017, 9:39 a.m., Jungtaek Lim wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/64531/ > ----------------------------------------------------------- > > (Updated Dec. 12, 2017, 9:39 a.m.) > > > Review request for Ambari, Miklos Gergely, Oliver Szabo, and Sid Wagle. > > > Bugs: AMBARI-22633 > https://issues.apache.org/jira/browse/AMBARI-22633 > > > Repository: ambari > > > Description > ------- > > 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. > > Replacing SimpleDateFormat with FastDateFormat in commons-lang3 would resolve > the issue. > > > Diffs > ----- > > ambari-logsearch/ambari-logsearch-logfeeder/pom.xml a06ae902fc > > ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/mapper/MapperDate.java > 6a7fad7b70 > > > Diff: https://reviews.apache.org/r/64531/diff/1/ > > > Testing > ------- > > - existing unit tests > - manual tests (manually deploying to cluster) > > > Thanks, > > Jungtaek Lim > >