Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
avatar
Expert Contributor

Quick tips to optimise your infra Solr for Ranger audits using SolrCloud.

1) Change the SolrCloud retention period of the audit.
On the server of ranger under : /usr/hdp/current/ranger-admin/contrib/solr_for_audit_setup/conf

#### Edit the file or use sed to replace the 90 Days in the solrconfig.xml , choose the right retention period, here is 6 hours

sed -i 's/+90DAYS/+6HOURS/g' solrconfig.xml 

sed -i 's/86400/7200/g' solrconfig.xml

2) Change ZK config, by submitting the xml again

/usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string XXXXXX:2181/infra-solr --upload-config --config-dir /usr/hdp/current/ranger-admin/contrib/solr_for_audit_setup/conf --config-set ranger_audits  --jaas-file /usr/hdp/current/ranger-admin/conf/ranger_solr_jaas.conf

Check that we loaded it correctly, in the Solr UI or with the following command

#Download the solrconfig.xml from Zookeeper

/usr/lib/ambari-infra-solr/server/scripts/cloud-scripts/zkcli.sh --zkhost XXXXXX:2181 -cmd getfile /infra-solr/configs/ranger_audits/solrconfig.xml /tmp/solrconfig.xml


3) Restart Infra

1,950 Views
0 Kudos
Version history
Last update:
‎03-09-2018 02:07 PM
Updated by:
Contributors