}
catch (Throwable t) {}
// first of all, get the statistics from the cache
final String statisticsKey = getPactContract().getStatisticsKey();
final BaseStatistics cachedStatistics = statistics.getBaseStatistics(statisticsKey);
BaseStatistics bs = null;
try {
bs = format.getStatistics(cachedStatistics);
}
catch (Throwable t) {
if (PactCompiler.LOG.isWarnEnabled()) {
PactCompiler.LOG.warn("Error obtaining statistics from input format: " + t.getMessage(), t);
}
}
if (bs != null) {
final long len = bs.getTotalInputSize();
if (len == BaseStatistics.SIZE_UNKNOWN) {
if (PactCompiler.LOG.isInfoEnabled()) {
PactCompiler.LOG.info("Compiler could not determine the size of input '" + inFormatDescription + "'. Using default estimates.");
}
}
else if (len >= 0) {
this.estimatedOutputSize = len;
}
final long card = bs.getNumberOfRecords();
if (card != BaseStatistics.NUM_RECORDS_UNKNOWN) {
this.estimatedNumRecords = card;
}
}
}