Skip to content

Commit

Permalink
improved logging, added queries for retrieving max
Browse files Browse the repository at this point in the history
metrics  #EA-3720 #EA-3579
  • Loading branch information
GordeaS authored and GordeaS committed Feb 23, 2024
1 parent 12626f8 commit b1a4eaf
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
## overall max recordcount
db.getCollection("EntityRecord").find({}, {entityId: 1, "entity.isAggregatedBy.recordCount": 1}).sort({"entity.isAggregatedBy.recordCount": -1}).limit(1)
(OpenUp!), http://data.europeana.eu/organization/1609, { "recordCount" : 12113168 }

## overall max pagerank
db.getCollection("EntityRecord").find({}, {entityId: 1, "entity.isAggregatedBy.pageRank": 1}).sort({"entity.isAggregatedBy.pageRank": -1}).limit(1)
(US) http://data.europeana.eu/place/216254, { "pageRank" : 24772.0 }

## max for Agent
# pagerank
db.getCollection("EntityRecord").find({"entity.type": "Agent"}, {entityId: 1, "entity.type": 1, "entity.isAggregatedBy.pageRank": 1, "entity.prefLabel.en":1 }).sort({"entity.isAggregatedBy.pageRank": -1}).limit(1)
http://data.europeana.eu/agent/174116, { "type" : "Agent", "prefLabel" : { "en" : "United Nations" }, "isAggregatedBy" : { "pageRank" : 3105.0 } }

#record count
db.getCollection("EntityRecord").find({"entity.type": "Agent"}, {entityId: 1, "entity.type": 1, "entity.isAggregatedBy.recordCount": 1, "entity.prefLabel.en":1 }).sort({"entity.isAggregatedBy.recordCount": -1}).limit(1)
http://data.europeana.eu/agent/166033, { "type" : "Agent", "prefLabel" : { "en" : "Etienne Tordoir" }, "isAggregatedBy" : { "recordCount" : 522630 } }

## max for Concept
#pagerank
db.getCollection("EntityRecord").find({"entity.type": "Concept"}, {entityId: 1, "entity.type": 1, "entity.isAggregatedBy.pageRank": 1, "entity.prefLabel.en":1 }).sort({"entity.isAggregatedBy.pageRank": -1}).limit(1)
http://data.europeana.eu/concept/3286, { "type" : "Concept", "prefLabel" : { "en" : "World War II" }, "isAggregatedBy" : { "pageRank" : 7646.0 } }

#record count
db.getCollection("EntityRecord").find({"entity.type": "Concept"}, {entityId: 1, "entity.type": 1, "entity.isAggregatedBy.recordCount": 1, "entity.prefLabel.en":1 }).sort({"entity.isAggregatedBy.recordCount": -1}).limit(1)
http://data.europeana.eu/concept/48, { "type" : "Concept", "prefLabel" : { "en" : "Photograph" }, "isAggregatedBy" : { "recordCount" : 4215359 } }

## max for Organization
#pagerank
db.getCollection("EntityRecord").find({"entity.type": "Organization"}, {entityId: 1, "entity.type": 1, "entity.isAggregatedBy.pageRank": 1, "entity.prefLabel.en":1 }).sort({"entity.isAggregatedBy.pageRank": -1}).limit(1)
http://data.europeana.eu/organization/4373, { "type" : "Organization", "prefLabel" : { "en" : "National Library of France" }, "isAggregatedBy" : { "pageRank" : 18909.0 } }

#record count
db.getCollection("EntityRecord").find({"entity.type": "Organization"}, {entityId: 1, "entity.type": 1, "entity.isAggregatedBy.recordCount": 1, "entity.prefLabel.en":1 }).sort({"entity.isAggregatedBy.recordCount": -1}).limit(1)
http://data.europeana.eu/organization/1609, { "type" : "Organization", "prefLabel" : { "en" : "OpenUp!" }, "isAggregatedBy" : { "recordCount" : 12113168 } }

## max for Place
#pagerank
db.getCollection("EntityRecord").find({"entity.type": "Place"}, {entityId: 1, "entity.type": 1, "entity.isAggregatedBy.pageRank": 1, "entity.prefLabel.en":1 }).sort({"entity.isAggregatedBy.pageRank": -1}).limit(1)
http://data.europeana.eu/place/216254, { "type" : "Place", "prefLabel" : { "en" : "United States of America" }, "isAggregatedBy" : { "pageRank" : 24772.0 } }

#record count
db.getCollection("EntityRecord").find({"entity.type": "Place"}, {entityId: 1, "entity.type": 1, "entity.isAggregatedBy.recordCount": 1, "entity.prefLabel.en":1 }).sort({"entity.isAggregatedBy.recordCount": -1}).limit(1)
http://data.europeana.eu/place/107, { "type" : "Place", "prefLabel" : { "en" : "Norway" }, "isAggregatedBy" : { "recordCount" : 2310764 } }

## max for TimeSpan
#pagerank
db.getCollection("EntityRecord").find({"entity.type": "TimeSpan"}, {entityId: 1, "entity.type": 1, "entity.isAggregatedBy.pageRank": 1, "entity.prefLabel.en":1 }).sort({"entity.isAggregatedBy.pageRank": -1}).limit(1)
http://data.europeana.eu/timespan/19, { "type" : "TimeSpan", "prefLabel" : { "en" : "19th century" }, "isAggregatedBy" : { "pageRank" : 5986.0 } }

#record count
db.getCollection("EntityRecord").find({"entity.type": "TimeSpan"}, {entityId: 1, "entity.type": 1, "entity.isAggregatedBy.recordCount": 1, "entity.prefLabel.en":1 }).sort({"entity.isAggregatedBy.recordCount": -1}).limit(1)
http://data.europeana.eu/timespan/20, { "type" : "TimeSpan", "prefLabel" : { "en" : "20th century" }, "isAggregatedBy" : { "recordCount" : 3301125 } }

Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static void main(String[] args) {
long currentRunningTasks = scheduledTaskService.getRunningTasksCount();
// log progress
if (LOG.isInfoEnabled()) {
LOG.info("Scheduled Tasks to process : {}", notCompletedTasks);
LOG.info("Scheduled Tasks to process : before {}, after {}", notCompletedTasks, currentRunningTasks);
}

//failed tasks will not complete, therefore not all scheduled tasks are marked as completed in the database
Expand Down

0 comments on commit b1a4eaf

Please sign in to comment.