[
https://issues.apache.org/jira/browse/SOLR-7555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14567382#comment-14567382
]
Eric Pugh commented on SOLR-7555:
---------------------------------
Ugh.. So this is getting rather more complex then I expected. Sigh. So,
are you suggesting that instead of adding DiskSpaceAwareDirectory as an
interface, I just add a instanceOf check for HdfsDirectory and FSDirectory, and
then call the method?
{code}
if (directory instanceOf HdfsDirectory) {
totalSpace = ((HdfsDirectory)directory).getTotalSpace()
elseif (directory instanceOf FSDirectory) {
totalSpace = ((FSDirectory)directory).getTotalSpace()
{code}
Would that approach be acceptable, and then I don't add a new interface, and
the changes are localized to FSDirectory and HdfsDirectory.
Eric
> Display total space and available space in Admin
> ------------------------------------------------
>
> Key: SOLR-7555
> URL: https://issues.apache.org/jira/browse/SOLR-7555
> Project: Solr
> Issue Type: Improvement
> Components: web gui
> Affects Versions: 5.1
> Reporter: Eric Pugh
> Assignee: Erik Hatcher
> Priority: Minor
> Fix For: 5.2
>
> Attachments: DiskSpaceAwareDirectory.java,
> SOLR-7555-display_disk_space.patch, SOLR-7555-display_disk_space_v2.patch,
> SOLR-7555-display_disk_space_v3.patch, SOLR-7555.patch
>
>
> Frequently I have access to the Solr Admin console, but not the underlying
> server, and I'm curious how much space remains available. This little patch
> exposes total Volume size as well as the usable space remaining:
> !https://monosnap.com/file/VqlReekCFwpK6utI3lP18fbPqrGI4b.png!
> I'm not sure if this is the best place to put this, as every shard will share
> the same data, so maybe it should be on the top level Dashboard? Also not
> sure what to call the fields!
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]