@@ -35,6 +35,7 @@ public class ConsolidationPolicy {
35
35
private Long segmentsMax ;
36
36
private Long segmentsBytesMax ;
37
37
private Long segmentsBytesFloor ;
38
+ private Long minScore ;
38
39
39
40
40
41
public ConsolidationPolicy () {
@@ -139,16 +140,29 @@ public ConsolidationPolicy segmentsBytesFloor(final Long segmentsBytesFloor) {
139
140
return this ;
140
141
}
141
142
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
+
142
156
@ Override
143
157
public boolean equals (Object o ) {
144
158
if (this == o ) return true ;
145
159
if (o == null || getClass () != o .getClass ()) return false ;
146
160
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 ) ;
148
162
}
149
163
150
164
@ Override
151
165
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 );
153
167
}
154
168
}
0 commit comments