use of org.apache.accumulo.core.summary.SummaryReader in project accumulo by apache.
the class RFileSummariesRetriever method read.
@Override
public Collection<Summary> read() throws IOException {
SummarizerFactory factory = new SummarizerFactory();
AccumuloConfiguration acuconf = DefaultConfiguration.getInstance();
Configuration conf = in.getFileSystem().getConf();
RFileSource[] sources = in.getSources();
try {
SummaryCollection all = new SummaryCollection();
for (RFileSource source : sources) {
SummaryReader fileSummary = SummaryReader.load(conf, acuconf, source.getInputStream(), source.getLength(), summarySelector, factory);
SummaryCollection sc = fileSummary.getSummaries(Collections.singletonList(new Gatherer.RowRange(startRow, endRow)));
all.merge(sc, factory);
}
return all.getSummaries();
} finally {
for (RFileSource source : sources) {
source.getInputStream().close();
}
}
}
Aggregations