}
/** Verify arbitrary flush. */
protected void verifyFlush(StripeCompactionPolicy policy, StripeInformationProvider si,
KeyValue[] input, KeyValue[][] expected, byte[][] boundaries) throws IOException {
StoreFileWritersCapture writers = new StoreFileWritersCapture();
StripeStoreFlusher.StripeFlushRequest req = policy.selectFlush(si, input.length);
StripeMultiFileWriter mw = req.createWriter();
mw.init(null, writers, new KeyValue.KVComparator());
for (KeyValue kv : input) {
mw.append(kv);
}
boolean hasMetadata = boundaries != null;
mw.commitWriters(0, false);
writers.verifyKvs(expected, true, hasMetadata);
if (hasMetadata) {
writers.verifyBoundaries(boundaries);
}
}