[
https://issues.apache.org/jira/browse/RANGER-2326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16758617#comment-16758617
]
Ramesh Mani commented on RANGER-2326:
-------------------------------------
With in the introduction to Zone Feature in Ranger, ranger audits that are sent
to SOLR will have to have ZoneName. For this the Solr ranger_audits collection
has to be updated with this new field zoneName. Currently this would be a
manual process to be done.
NOTE: This update of the Solr ranger_audits collection schema has to be done
after Infra Solr is up and before any service with ranger plugin are started.
Ranger ranger_audits collection
Command to add zoneName field to ranger_audits:
In the node where infra-solr is running execute the following command
\{code:java}
curl -k -u : --negotiate -X POST -H 'Content-type:application/json'
--data-binary '\{"add-field":{"name":"zoneName", "type":"key_lower_case",
"multiValued":false }}' http://`hostname -f`:8886/solr/ranger_audits/schema
{code}
Verify in Zookeeper that managed-schema is updated:
\{code:java}
/usr/hdp/current/zookeeper-client/bin/zkCli.sh -server `hostname -f`:2181 get
/infra-solr/configs/ranger_audits/managed-schema
{code}
> zoneName field is getting added with type "boolean" in Ranger Solr schema
> -------------------------------------------------------------------------
>
> Key: RANGER-2326
> URL: https://issues.apache.org/jira/browse/RANGER-2326
> Project: Ranger
> Issue Type: Bug
> Components: Ranger
> Affects Versions: 2.0.0
> Reporter: Mugdha Varadkar
> Assignee: Ramesh Mani
> Priority: Major
> Fix For: 2.0.0
>
>
> After upgrade to latest ranger master code having zone feature, below
> {{zoneName}} field gets added to manage-schema.
> {code:java}
> <field name="zoneName" type="boolean"/>{code}
> Because of this audit logs having {{zoneName}} value is getting set as
> "false".
>
> To get the actual value of the {{zoneName}} in audit logs, Need to manually
> uploaded the manage-schema having the expected field as below,
> {code:java}
> <field name="zoneName" type="key_lower_case" multiValued="false"/>{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)