SOLR-13432: Add .toString methods to BitDocSet and SortedIntDocSet so that enabling "showItems" on the filter caches shows some useful information about the values in the cache

(cherry picked from commit f77c56dbc636ec2305826c1734ae0885f222dd03)
This commit is contained in:
Shalin Shekhar Mangar 2019-04-29 12:34:03 +05:30
parent 980472aa47
commit 793c974a59
3 changed files with 19 additions and 0 deletions

View File

@ -233,6 +233,9 @@ Improvements
* SOLR-13394: Switch default GC from CMS to G1 (Ishan Chattopadhyaya, Kesharee Nandan Vishwakarma, Shawn Heisey,
Uwe Schindler, Erick Ericsson)
* SOLR-13432: Add .toString methods to BitDocSet and SortedIntDocSet so that enabling "showItems" on the filter caches
shows some useful information about the values in the cache. (shalin)
Other Changes
----------------------

View File

@ -385,4 +385,12 @@ public class BitDocSet extends DocSetBase {
public Collection<Accountable> getChildResources() {
return Collections.emptyList();
}
@Override
public String toString() {
return "BitDocSet{" +
"size=" + size() +
",ramUsed=" + RamUsageEstimator.humanReadableUnits(ramBytesUsed()) +
'}';
}
}

View File

@ -804,4 +804,12 @@ public class SortedIntDocSet extends DocSetBase {
public Collection<Accountable> getChildResources() {
return Collections.emptyList();
}
@Override
public String toString() {
return "SortedIntDocSet{" +
"size=" + size() + "," +
"ramUsed=" + RamUsageEstimator.humanReadableUnits(ramBytesUsed())+
'}';
}
}