@@ -35,6 +35,7 @@ public class ConsolidationPolicy {
3535 private Long segmentsMax ;
3636 private Long segmentsBytesMax ;
3737 private Long segmentsBytesFloor ;
38+ private Long minScore ;
3839
3940
4041 public ConsolidationPolicy () {
@@ -139,16 +140,29 @@ public ConsolidationPolicy segmentsBytesFloor(final Long segmentsBytesFloor) {
139140 return this ;
140141 }
141142
143+ public Long getMinScore () {
144+ return minScore ;
145+ }
146+
147+ /**
148+ * @param minScore Filter out consolidation candidates with a score less than this. (default: 0)
149+ * @return this
150+ */
151+ public ConsolidationPolicy minScore (final Long minScore ) {
152+ this .minScore = minScore ;
153+ return this ;
154+ }
155+
142156 @ Override
143157 public boolean equals (Object o ) {
144158 if (this == o ) return true ;
145159 if (o == null || getClass () != o .getClass ()) return false ;
146160 ConsolidationPolicy that = (ConsolidationPolicy ) o ;
147- return type == that .type && Objects .equals (threshold , that .threshold ) && Objects .equals (segmentThreshold , that .segmentThreshold ) && Objects .equals (segmentsMin , that .segmentsMin ) && Objects .equals (segmentsMax , that .segmentsMax ) && Objects .equals (segmentsBytesMax , that .segmentsBytesMax ) && Objects .equals (segmentsBytesFloor , that .segmentsBytesFloor );
161+ return type == that .type && Objects .equals (threshold , that .threshold ) && Objects .equals (segmentThreshold , that .segmentThreshold ) && Objects .equals (segmentsMin , that .segmentsMin ) && Objects .equals (segmentsMax , that .segmentsMax ) && Objects .equals (segmentsBytesMax , that .segmentsBytesMax ) && Objects .equals (segmentsBytesFloor , that .segmentsBytesFloor ) && Objects . equals ( minScore , that . minScore ) ;
148162 }
149163
150164 @ Override
151165 public int hashCode () {
152- return Objects .hash (type , threshold , segmentThreshold , segmentsMin , segmentsMax , segmentsBytesMax , segmentsBytesFloor );
166+ return Objects .hash (type , threshold , segmentThreshold , segmentsMin , segmentsMax , segmentsBytesMax , segmentsBytesFloor , minScore );
153167 }
154168}
0 commit comments