ukwa / monitrix

A monitoring system for Heritrix 3.
Other
12 stars 9 forks source link

Changes related to issue #18 #20

Closed shsdev closed 10 years ago

shsdev commented 10 years ago

Reproducing issue #18 was possible. The cause of this issue was a missing record line for a previously recorded host. In consequence, variable unitToModify in CassandraCrawlStatsImporter.update was null in some cases and a NullPointerException was thrown:

https://github.com/ukwa/monitrix/blob/master/monitrix-webapp/app/uk/bl/monitrix/database/cassandra/ingest/CassandraCrawlStatsImporter.java#L83

The solution was to add an empty record line in this case.

Additionally, several try-catch blocks were added to avoid stack-trace messages in case the cassandra db is currently shut down.

Behaviour of the monitrix webapp was tested with shutdowns in idle and during log file ingest successfully.