You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by J G <sk...@hotmail.com> on 2009/07/18 02:45:28 UTC

Obtaining SOLR index size on disk

Hello,

Is it possible to obtain the SOLR index size on disk through the SOLR API? I've read through the docs and mailing list questions but can't seem to find the answer.

Any help is appreciated.

Thanks.



_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits. 
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009

Re: Obtaining SOLR index size on disk

Posted by Lance Norskog <go...@gmail.com>.
This information is not available via the API. If you would like this
information added to the statistics request, please file a JIRA
requesting it.

Without knowing the size of the index files to be transferred, the
client cannot monitor its own disk space. This would be useful for the
cloud management features.

On Mon, Apr 5, 2010 at 5:35 AM, Na_D <na...@zaloni.com> wrote:
>
>  hi,
>
>   I am using the piece of code given below
>
>          ReplicationHandler handler2 = new ReplicationHandler();
>                 System.out.println( handler2.getDescription());
>
>
>                 NamedList statistics = handler2.getStatistics();
>                 System.out.println("Statistics   "+ statistics);
>
> The result that i am getting (ie the printed statment is :
> Statistics
> {handlerStart=1270469530218,requests=0,errors=0,timeouts=0,totalTime=0,avgTimePerRequest=NaN,avgRequestsPerSecond=NaN}
>
>
> But the Statistics consists of the other info too:
>
> <class>
>        org.apache.solr.handler.ReplicationHandler
>      </class>
>      <version>
>        $Revision: 829682 $
>      </version>
>
>      <description>
>        ReplicationHandler provides replication of index and configuration
> files from Master to Slaves
>      </description>
>      <stats>
>
>        <stat name="handlerStart" >
>          1270463612968
>        </stat>
>
>        <stat name="requests" >
>          0
>        </stat>
>
>        <stat name="errors" >
>          0
>        </stat>
>
>        <stat name="timeouts" >
>          0
>        </stat>
>
>        <stat name="totalTime" >
>          0
>        </stat>
>
>        <stat name="avgTimePerRequest" >
>          NaN
>        </stat>
>
>        <stat name="avgRequestsPerSecond" >
>          0.0
>        </stat>
>
>        <stat name="indexSize" >
>          19.29 KB
>        </stat>
>
>        <stat name="indexVersion" >
>          1266984293131
>        </stat>
>
>        <stat name="generation" >
>          3
>        </stat>
>
>        <stat name="indexPath" >
>          C:\solr\apache-solr-1.4.0\example\example-DIH\solr\db\data\index
>        </stat>
>
>        <stat name="isMaster" >
>          true
>        </stat>
>
>        <stat name="isSlave" >
>          false
>        </stat>
>
>        <stat name="confFilesToReplicate" >
>          schema.xml,stopwords.txt,elevate.xml
>        </stat>
>
>        <stat name="replicateAfter" >
>          [commit, startup]
>        </stat>
>
>        <stat name="replicationEnabled" >
>          true
>        </stat>
>
>      </stats>
>    </entry>
>
>
>
> this is where the problem lies : i need the size of the index im not finding
> the API
> nor is the statistics printing out(sysout) the same.
> how to i get the size of the index????
> --
> View this message in context: http://n3.nabble.com/Obtaining-SOLR-index-size-on-disk-tp500095p697599.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Lance Norskog
goksron@gmail.com

Re: Obtaining SOLR index size on disk

Posted by Na_D <na...@zaloni.com>.
  hi,
 
   I am using the piece of code given below
             
          ReplicationHandler handler2 = new ReplicationHandler();
		 System.out.println( handler2.getDescription());
		 
		 
		 NamedList statistics = handler2.getStatistics();
		 System.out.println("Statistics   "+ statistics);

The result that i am getting (ie the printed statment is :
Statistics  
{handlerStart=1270469530218,requests=0,errors=0,timeouts=0,totalTime=0,avgTimePerRequest=NaN,avgRequestsPerSecond=NaN}


But the Statistics consists of the other info too:

<class>
        org.apache.solr.handler.ReplicationHandler
      </class>
      <version>
        $Revision: 829682 $
      </version>

      <description>
        ReplicationHandler provides replication of index and configuration
files from Master to Slaves
      </description>
      <stats>

        <stat name="handlerStart" >
          1270463612968
        </stat>

        <stat name="requests" >
          0
        </stat>

        <stat name="errors" >
          0
        </stat>

        <stat name="timeouts" >
          0
        </stat>

        <stat name="totalTime" >
          0
        </stat>

        <stat name="avgTimePerRequest" >
          NaN
        </stat>

        <stat name="avgRequestsPerSecond" >
          0.0
        </stat>

        <stat name="indexSize" >
          19.29 KB
        </stat>

        <stat name="indexVersion" >
          1266984293131
        </stat>

        <stat name="generation" >
          3
        </stat>

        <stat name="indexPath" >
          C:\solr\apache-solr-1.4.0\example\example-DIH\solr\db\data\index
        </stat>

        <stat name="isMaster" >
          true
        </stat>

        <stat name="isSlave" >
          false
        </stat>

        <stat name="confFilesToReplicate" >
          schema.xml,stopwords.txt,elevate.xml
        </stat>

        <stat name="replicateAfter" >
          [commit, startup]
        </stat>

        <stat name="replicationEnabled" >
          true
        </stat>

      </stats>
    </entry>



this is where the problem lies : i need the size of the index im not finding
the API 
nor is the statistics printing out(sysout) the same.
how to i get the size of the index????
-- 
View this message in context: http://n3.nabble.com/Obtaining-SOLR-index-size-on-disk-tp500095p697599.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Obtaining SOLR index size on disk

Posted by Peter Wolanin <pe...@acquia.com>.
Actually, if you have a server enabled as a replication master, the
stats.jsp page reports the index size, so that information is
available in some cases.

-Peter

On Sat, Jul 18, 2009 at 8:14 AM, Erik Hatcher<er...@ehatchersolutions.com> wrote:
>
> On Jul 17, 2009, at 8:45 PM, J G wrote:
>>
>> Is it possible to obtain the SOLR index size on disk through the SOLR API?
>> I've read through the docs and mailing list questions but can't seem to find
>> the answer.
>
> No, but it'd be a great addition to the /admin/system handler which returns
> lots of other useful trivia like the free memory, ulimit, uptime, and such.
>
>        Erik
>
>



-- 
Peter M. Wolanin, Ph.D.
Momentum Specialist,  Acquia. Inc.
peter.wolanin@acquia.com

Re: Obtaining SOLR index size on disk

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jul 17, 2009, at 8:45 PM, J G wrote:
> Is it possible to obtain the SOLR index size on disk through the  
> SOLR API? I've read through the docs and mailing list questions but  
> can't seem to find the answer.

No, but it'd be a great addition to the /admin/system handler which  
returns lots of other useful trivia like the free memory, ulimit,  
uptime, and such.

	Erik