> On Jan. 5, 2016, 8:56 p.m., Don Bosco Durai wrote: > > agents-audit/src/main/java/org/apache/ranger/audit/destination/SolrAuditDestination.java, > > line 203 > > <https://reviews.apache.org/r/41919/diff/1/?file=1181599#file1181599line203> > > > > auditEvent.eventTime is already a date. Why are we overriding it?
Bosco, please check the updated description. Hope it clarifies the fix. - Gautam ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/41919/#review112925 ----------------------------------------------------------- On Jan. 6, 2016, 4:06 a.m., Gautam Borad wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/41919/ > ----------------------------------------------------------- > > (Updated Jan. 6, 2016, 4:06 a.m.) > > > Review request for ranger, Alok Lal, Don Bosco Durai, Abhay Kulkarni, Madhan > Neethiraj, Ramesh Mani, Selvamohan Neethiraj, and Velmurugan Periasamy. > > > Bugs: RANGER-798 > https://issues.apache.org/jira/browse/RANGER-798 > > > Repository: ranger > > > Description > ------- > > As a solution, sending new Date object value as audit event time to Solr Doc, > if audit store is Solr. > > The current implementation of “auditEvent.getEventTime()” contains time in > UTC and since it's a date object it will contain component machine's local > timezone. When Solr receives this date object and timezone, it tries to > convert it from given timezone to UTC timestamp, so their is double > conversion of actual time before it get stored in Solr. > > If we can provide server local time and timezone to Solr then Solr will > convert the received time from given Timezone to UTC. > > > Diffs > ----- > > > agents-audit/src/main/java/org/apache/ranger/audit/destination/SolrAuditDestination.java > df471c3 > > Diff: https://reviews.apache.org/r/41919/diff/ > > > Testing > ------- > > Steps performed(after patch) : > 1) Changed plugin system time zone to IST and restarted all components. > 2) Initiated an HDFS audit event. > 3) Checked event time in Solr of newly created audit log, Audit log event > time was matching with UTC. > 4) Checked event time in Ranger UI, Newly generated Audit event is matching > with current time. > > > Thanks, > > Gautam Borad > >