Some useful Solr REST API calls

curl -v –negotiate -u : “http://<solr_host&gt;:8886/solr/ranger_audits/update?commit=true”
curl -v –negotiate -u : “http://<solr_host&gt;:8886/solr/ranger_audits/update?commit=true” -H “Content-Type: text/xml” –data-binary “<delete><query>evtTime:[* TO NOW-7DAYS]</query></delete>”
curl -v –negotiate -u : “http://<solr_host&gt;:8886/solr/ranger_audits/update?commit=true” -H “Content-Type: text/xml” –data-binary “<delete><query>evtTime:[* TO NOW-7DAYS]</query></delete>”
curl -v –negotiate -u “http://<solr_host&gt;:8886/solr/ranger_audits/update?commit=true” -H “Content-Type: text/xml” –data-binary “<delete><query>evtTime:[* TO NOW-7DAYS]</query></delete>”

command to remove and add shard in infra-solr

curl –negotiate -u : “http://<solr-host&gt;:8886/solr/admin/collections?action=DELETEREPLICA&collection=ranger_audits&shard=<shard-name>&replica=<core-node-name>”

core-node-name can be found at: <ambari_infra_solr_home>/data/ranger_audits_<shard-name>_replica2/
curl –negotiate -u : “http://<solr-host&gt;:8886/solr/admin/collections?action=ADDREPLICA&collection=ranger_audits&shard=shard3&node=<solr-host>:8886_solr”

How to fix Falcon service not started issue in HDP2.5+


If you installed HDP 2.5 or later, you must manually install the Berkeley DB file required for Falcon. Below are the instructions for Ambari installations. See if this helps.

1. Download the required Berkeley DB implementation file.

wget –O je-5.0.73.jar

2. Log in to the Ambari server with administrator privileges.

su – root

3. Copy the file to the Ambari server share folder.

cp je-5.0.73.jar /usr/share/

4. Set permissions on the file to owner=read/write, group=read, other=read.

chmod 644 /usr/share/je-5.0.73.jar

5. Configure the Ambari server to use the Berkeley DB driver.

ambari-server setup –jdbc-db=bdb –jdbc-driver=/usr/share/je-5.0.73.jar

6. Restart the Ambari server.

ambari-server restart

7. Restart the Falcon service from the Ambari UI.

You need to have administrator privileges in Ambari to restart a service.

a) In the Ambari web UI, click the Services tab and select the Falcon service in the left Services pane.

b) From the Falcon Summary page, click Service Actions > Restart All.

c) Click Confirm Restart All.

When the service is available, the Falcon status displays as Started on the Summary page.