ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gautam Borad <gbo...@gmail.com>
Subject Re: Review Request 41919: RANGER-798 - Approach 2 : Handle different timezone issue while saving audit logs to Solr
Date Wed, 27 Jan 2016 04:21:00 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41919/
-----------------------------------------------------------

(Updated Jan. 27, 2016, 4:21 a.m.)


Review request for ranger, Alok Lal, Don Bosco Durai, Abhay Kulkarni, Madhan Neethiraj, Ramesh
Mani, Selvamohan Neethiraj, and Velmurugan Periasamy.


Changes
-------

Update patch will convert the received UTC timestamp value to Local timestamp and there will
not be any difference in actual audit event time and event time inserted in solr.


Summary (updated)
-----------------

RANGER-798 - Approach 2  : Handle different timezone issue while saving audit logs to Solr


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 (updated)
-----

  agents-audit/src/main/java/org/apache/ranger/audit/destination/SolrAuditDestination.java
f875842 
  agents-audit/src/main/java/org/apache/ranger/audit/provider/MiscUtil.java 9586f73 

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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message