DataImportHandler has onImportStart and onImportEnd. An onRollback handler is a useful addition.
Commit 1612126 from Erik Hatcher in branch 'dev/branches/branch_4x'
[ https://svn.apache.org/r1612126 ]
SOLR-6258: Added onRollback event handler hook to Data Import Handler
Commit 1612124 from Erik Hatcher in branch 'dev/trunk'
[ https://svn.apache.org/r1612124 ]
Here's a patch that implements onRollback, including tests.