Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-3990

index size unavailable in gui/mbeans unless replication handler configured

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 6.4
    • Component/s: Admin UI
    • Labels:
      None

      Description

      Unless you configure the replication handler, the on-disk size of each core's index seems to be unavailable in the gui or from the mbeans handler. If you are not doing replication, you should still be able to get the size of each index without configuring things that won't be used.

      Also, I would like to get the size of the index in a consistent unit of measurement, probably MB. I understand the desire to give people a human readable unit next to a number that's not enormous, but it's difficult to do programmatic comparisons between values such as 787.33 MB and 23.56 GB. That may mean that the number needs to be available twice, one format to be shown in the admin GUI and both formats available from the mbeans handler, for scripting.

      1. SOLR-3990.patch
        4 kB
        Dennis Gove
      2. SOLR-3990.patch
        4 kB
        Keith Laban
      3. SOLR-3990.patch
        6 kB
        Shawn Heisey

        Activity

        Hide
        markrmiller@gmail.com Mark Miller added a comment -

        That may mean that the number needs to be available twice, one format to be shown in the admin GUI and both formats available from the mbeans handler, for scripting.

        I think the system info handler does exactly that - I remember working on it at some point.

        Show
        markrmiller@gmail.com Mark Miller added a comment - That may mean that the number needs to be available twice, one format to be shown in the admin GUI and both formats available from the mbeans handler, for scripting. I think the system info handler does exactly that - I remember working on it at some point.
        Hide
        elyograg Shawn Heisey added a comment -

        Is the system info handler accessed via the /admin/system URL? If so, it doesn't seem to have the index size.

        I would prefer to have it accessible via /admin/mbeans?stats=true so that I don't have to make more than one SolrJ call per core to gather stats, but you should do whatever makes the most sense for Solr, not for me. I'll adapt to it either way.

        Show
        elyograg Shawn Heisey added a comment - Is the system info handler accessed via the /admin/system URL? If so, it doesn't seem to have the index size. I would prefer to have it accessible via /admin/mbeans?stats=true so that I don't have to make more than one SolrJ call per core to gather stats, but you should do whatever makes the most sense for Solr, not for me. I'll adapt to it either way.
        Hide
        markrmiller@gmail.com Mark Miller added a comment -

        Sorry, didn't mean it had the index size - that it did the same thing - includes human readable stats and 'raw' stats.

        Show
        markrmiller@gmail.com Mark Miller added a comment - Sorry, didn't mean it had the index size - that it did the same thing - includes human readable stats and 'raw' stats.
        Hide
        hossman Hoss Man added a comment -

        If you are not doing replication, you should still be able to get the size of each index without configuring things that won't be used.

        agreed ... adding the current index size (in both raw and human readble formats) as a stat to either the "SolrCore" or "SolrIndexSearcher" could make sense.

        That may mean that the number needs to be available twice

        yeah, i'm not sure why Replicationhandler only exposes the human readable version at the moment.

        Show
        hossman Hoss Man added a comment - If you are not doing replication, you should still be able to get the size of each index without configuring things that won't be used. agreed ... adding the current index size (in both raw and human readble formats) as a stat to either the "SolrCore" or "SolrIndexSearcher" could make sense. That may mean that the number needs to be available twice yeah, i'm not sure why Replicationhandler only exposes the human readable version at the moment.
        Hide
        elyograg Shawn Heisey added a comment -

        I think this issue will be a good learning experience for me. If anyone knows exactly what to do and wants it implemented faster, feel free to take over.

        This is part of an effort to close old issues that I have reported. Search tag: elyograg2013springclean

        Show
        elyograg Shawn Heisey added a comment - I think this issue will be a good learning experience for me. If anyone knows exactly what to do and wants it implemented faster, feel free to take over. This is part of an effort to close old issues that I have reported. Search tag: elyograg2013springclean
        Hide
        steve_rowe Steve Rowe added a comment -

        Bulk move 4.4 issues to 4.5 and 5.0

        Show
        steve_rowe Steve Rowe added a comment - Bulk move 4.4 issues to 4.5 and 5.0
        Hide
        thetaphi Uwe Schindler added a comment -

        Move issue to Solr 4.9.

        Show
        thetaphi Uwe Schindler added a comment - Move issue to Solr 4.9.
        Hide
        elyograg Shawn Heisey added a comment -

        Patch against branch_4x, for comment. I've centralized the getIndexSize method and added the size in bytes and readable units to the core stats. For 5.0, will we still need the index size in the replication stats, or should the webUI get that info from the core stats?

        Show
        elyograg Shawn Heisey added a comment - Patch against branch_4x, for comment. I've centralized the getIndexSize method and added the size in bytes and readable units to the core stats. For 5.0, will we still need the index size in the replication stats, or should the webUI get that info from the core stats?
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        +1 LGTM

        For 5.0, will we still need the index size in the replication stats, or should the webUI get that info from the core stats?

        Yank it from ReplicationHandler from 5.0. I'll give a patch to read the size from the core stats.

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - +1 LGTM For 5.0, will we still need the index size in the replication stats, or should the webUI get that info from the core stats? Yank it from ReplicationHandler from 5.0. I'll give a patch to read the size from the core stats.
        Hide
        k317h Keith Laban added a comment -

        Bumping this ticket. Attaching a new patch for current master (should also apply to 5x)

        Show
        k317h Keith Laban added a comment - Bumping this ticket. Attaching a new patch for current master (should also apply to 5x)
        Hide
        elyograg Shawn Heisey added a comment -

        This may be moot in recent versions – the /replication handler is implicitly created even if it's not configured. Even so, I think it's probably a good idea to move the functionality to something more central.

        Show
        elyograg Shawn Heisey added a comment - This may be moot in recent versions – the /replication handler is implicitly created even if it's not configured. Even so, I think it's probably a good idea to move the functionality to something more central.
        Hide
        dpgove Dennis Gove added a comment -

        I agree, I think it still makes sense to put this in a more central location. I'd expect to be able to ask the core what the index size is.

        Show
        dpgove Dennis Gove added a comment - I agree, I think it still makes sense to put this in a more central location. I'd expect to be able to ask the core what the index size is.
        Hide
        dpgove Dennis Gove added a comment -

        Only changes in this are the hashes for the diff (applied to current master). No code changes.

        Show
        dpgove Dennis Gove added a comment - Only changes in this are the hashes for the diff (applied to current master). No code changes.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit bd39ae9c9d8500d92306478fb51ee6e19009cee9 in lucene-solr's branch refs/heads/master from Dennis Gove
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=bd39ae9 ]

        SOLR-3990: Moves getIndexSize() from ReplicationHandler to SolrCore

        Show
        jira-bot ASF subversion and git services added a comment - Commit bd39ae9c9d8500d92306478fb51ee6e19009cee9 in lucene-solr's branch refs/heads/master from Dennis Gove [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=bd39ae9 ] SOLR-3990 : Moves getIndexSize() from ReplicationHandler to SolrCore
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 973a48e3e7fddef2ee3a21864783423974d6c6b7 in lucene-solr's branch refs/heads/branch_6x from Dennis Gove
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=973a48e ]

        SOLR-3990: Moves getIndexSize() from ReplicationHandler to SolrCore

        Show
        jira-bot ASF subversion and git services added a comment - Commit 973a48e3e7fddef2ee3a21864783423974d6c6b7 in lucene-solr's branch refs/heads/branch_6x from Dennis Gove [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=973a48e ] SOLR-3990 : Moves getIndexSize() from ReplicationHandler to SolrCore
        Hide
        dpgove Dennis Gove added a comment -

        Committed into both master and branch_6x.

        Thank you, Shawn!

        Show
        dpgove Dennis Gove added a comment - Committed into both master and branch_6x. Thank you, Shawn!

          People

          • Assignee:
            dpgove Dennis Gove
            Reporter:
            elyograg Shawn Heisey
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development