use of org.apache.orc.impl.RecordReaderImpl in project hive by apache.
the class TestCrudCompactorOnTez method checkBloomFilterInAcidFile.
private void checkBloomFilterInAcidFile(FileSystem fs, Path bucketFilePath) throws IOException {
Reader orcReader = OrcFile.createReader(bucketFilePath, OrcFile.readerOptions(fs.getConf()).filesystem(fs));
StripeInformation stripe = orcReader.getStripes().get(0);
try (RecordReaderImpl rows = (RecordReaderImpl) orcReader.rows()) {
boolean bloomFilter = rows.readStripeFooter(stripe).getStreamsList().stream().anyMatch(s -> s.getKind() == OrcProto.Stream.Kind.BLOOM_FILTER_UTF8 || s.getKind() == OrcProto.Stream.Kind.BLOOM_FILTER);
Assert.assertTrue("Bloom filter is missing", bloomFilter);
}
}
Aggregations