use of org.apache.drill.exec.planner.common.DrillStatsTable.TableStatistics in project drill by apache.
the class ParquetFormatPlugin method readStatistics.
@Override
public TableStatistics readStatistics(FileSystem fs, Path statsTablePath) throws IOException {
Stopwatch timer = Stopwatch.createStarted();
ObjectMapper mapper = DrillStatsTable.getMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
FSDataInputStream is = fs.open(statsTablePath);
TableStatistics statistics = mapper.readValue((InputStream) is, TableStatistics.class);
logger.info("Took {} ms to read statistics from {} format plugin", timer.elapsed(TimeUnit.MILLISECONDS), name);
timer.stop();
return statistics;
}
Aggregations