private void run() { int batchSize = inputData.getConsumption().getBatchJobs().getBatchData().size(); LOG.info("size of batches={}", batchSize); for (BatchData batch : inputData.getConsumption().getBatchJobs().getBatchData()) { InputReader reader = InputReader.create(batch); List<ConsumptionDataRecord> records = reader.getRecords(); EnergyFlowModel model = consumptionModelPool.get(batch.getModel()); Preconditions.checkNotNull(model, "model not available with name=" + batch.getModel()); ConsumptionCalculation calculation = new ConsumptionCalculation(model); calculation.process(records); OutputWriter writer = createWriter(batch, ProjectMetaData.getInstance().getOutputPath()); writer.write(records); } LOG.info("{} batches done.", batchSize); }