From ac5b7f89b5b71f098bd63ec31eadd3afb5ce5e15 Mon Sep 17 00:00:00 2001 From: Dimitris Date: Wed, 17 Feb 2021 14:56:13 +0200 Subject: [PATCH] Changes to logger.info --- .gitignore | 3 +-- .../export/ReadReportsListFromDatacite.java | 10 ++++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 2d7730711..f5d6c2bc0 100644 --- a/.gitignore +++ b/.gitignore @@ -23,5 +23,4 @@ /build spark-warehouse /**/job-override.properties -/**/*.log - +/**/*.log \ No newline at end of file diff --git a/dhp-workflows/dhp-usage-datasets-stats-update/src/main/java/eu/dnetlib/oa/graph/datasetsusagestats/export/ReadReportsListFromDatacite.java b/dhp-workflows/dhp-usage-datasets-stats-update/src/main/java/eu/dnetlib/oa/graph/datasetsusagestats/export/ReadReportsListFromDatacite.java index 6e8c0e397..1b769bf53 100644 --- a/dhp-workflows/dhp-usage-datasets-stats-update/src/main/java/eu/dnetlib/oa/graph/datasetsusagestats/export/ReadReportsListFromDatacite.java +++ b/dhp-workflows/dhp-usage-datasets-stats-update/src/main/java/eu/dnetlib/oa/graph/datasetsusagestats/export/ReadReportsListFromDatacite.java @@ -105,7 +105,7 @@ public class ReadReportsListFromDatacite { ResultSet rstmpReportAll = stmt.getResultSet(); if (rstmpReportAll.next()) { String listDatasets = rstmpReportAll.getString(1); - logger.info("No compressed performance found"); + logger.info("Adding uncompressed performance for " + reportID); this.readDatasetsReport(listDatasets, reportID); } @@ -125,6 +125,9 @@ public class ReadReportsListFromDatacite { } public void readDatasetsReport(String prettyDatasetsReports, String reportId) throws Exception { + logger.info("Reading Datasets performance for report " + reportId); + logger.info("Write Performance Report To File"); + ObjectMapper objectMapper = new ObjectMapper(); JsonNode jsonNode = objectMapper.readValue(prettyDatasetsReports, JsonNode.class); String datasetsReports = jsonNode.toString(); @@ -151,8 +154,7 @@ public class ReadReportsListFromDatacite { fin.writeChar('\n'); fin.close(); - logger.info("Write Compress Report To File"); - logger.info("Reading Compress Report From File..."); + logger.info("Reading Performance Report From File..."); String sqlCreateTempTableForDatasets = "CREATE TEMPORARY TABLE " + ConnectDB.getDataSetUsageStatsDBSchema() + ".tmpjsoncompressesed (report_datasets array>,dataset_title:string, data_type:string, " @@ -196,7 +198,7 @@ public class ReadReportsListFromDatacite { stmt.executeUpdate(sqlInsertToDatasetsPerformance); - logger.info("Datasets Performance Inserted "); + logger.info("Datasets Performance Inserted for Report " + reportId); stmt.execute("Drop table " + ConnectDB.getDataSetUsageStatsDBSchema() + ".tmpjsoncompressesed");