VIVO-469 print progress messages while looking for URIs to re-index.
This commit is contained in:
parent
68d1129114
commit
5af822f7ab
1 changed files with 18 additions and 5 deletions
|
@ -281,10 +281,23 @@ public class IndexBuilder extends VitroBackgroundThread {
|
||||||
|
|
||||||
//keep uris unique by using a HashSet
|
//keep uris unique by using a HashSet
|
||||||
Collection<String> urisToUpdate = new HashSet<String>();
|
Collection<String> urisToUpdate = new HashSet<String>();
|
||||||
for( Statement stmt : getAndClearChangedStmts() ){
|
Statement[] changedStatements = getAndClearChangedStmts();
|
||||||
|
int howManyChanges = changedStatements.length;
|
||||||
|
|
||||||
|
if (howManyChanges > 100) {
|
||||||
|
log.info("Finding URIs that are affected by " + howManyChanges
|
||||||
|
+ " changed statements.");
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < howManyChanges; i++) {
|
||||||
|
Statement stmt = changedStatements[i];
|
||||||
for (StatementToURIsToUpdate stu : stmtToURIsToIndexFunctions) {
|
for (StatementToURIsToUpdate stu : stmtToURIsToIndexFunctions) {
|
||||||
urisToUpdate.addAll(stu.findAdditionalURIsToIndex(stmt));
|
urisToUpdate.addAll(stu.findAdditionalURIsToIndex(stmt));
|
||||||
}
|
}
|
||||||
|
if ((i > 0) && (i % 1000 == 0)) {
|
||||||
|
log.info("Processed " + i + " changed statements; found "
|
||||||
|
+ urisToUpdate.size() + " affected URIs.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//inform StatementToURIsToUpdate that they are done
|
//inform StatementToURIsToUpdate that they are done
|
||||||
|
|
Loading…
Add table
Reference in a new issue