Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Solr data directory issue

Highlighted

Solr data directory issue

Explorer

Hi ,

 

My solr data directory is full. 

/opt/ambari_infra_solr/data/ranger_audits_shard1_replica1/data/index

Can I delete any data from this? I tried to use CURL command but it didn't work as it throws error as no space left on device.

 

Can you please help?

 

 

@jsensharma @Shelton 

4 REPLIES 4

Re: Solr data directory issue

Mentor

@madhura2688 

Can you try this other method to create script solr.sh using below example set permission u+x

 

!/bin/sh
curl http://<localhost:port>/solr/core_name/update?commit=true -H "Content-Type: text/xml" --data-binary `'<delete><query>*:*</query></delete>'`

 

Then launch notice the commit=true this should resolve the no space left on device issue.

Re: Solr data directory issue

Explorer

@Shelton ,

 

I am using below CURL command 

 

!/bin/sh

curl -v --negotiate -u : 'http://<host>:8886/solr/ranger_audits/update?commit=true' -H 'Content-Type: text/xml' --data-binary '<delete><query>evtTime:[* TO NOW-30DAYS]</query></delete>'

 

you mentioned after that launch notice commit=true. How should I launch that ?

 

@Shelton 

 

 

Re: Solr data directory issue

Mentor

@madhura2688 

No, I just wanted to emphasize that the parameter commit=true will continuously delete as it progresses it in a bash script. Just run it as a normal bask script ie.
$. solr.sh

This should ensure the deletion occurs for every entry rather than for the last 30days  [* TO NOW-30DAYS]  at once 

HTH

Re: Solr data directory issue

Explorer

Hi @Shelton 

 

When I run that command its saying:

 

How do I know the exact path?or what other commands I can try?

 

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /solr/ranger_audits/update. Reason:
<pre>    Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>

 

Don't have an account?
Coming from Hortonworks? Activate your account here