NIFI-886 purging old events much more frequently

This commit is contained in:
joewitt 2015-08-21 15:40:26 -04:00
parent 1ddd736558
commit 1f6805f06d
1 changed files with 2 additions and 1 deletions

View File

@ -108,6 +108,7 @@ public class PersistentProvenanceRepository implements ProvenanceEventRepository
public static final String EVENT_CATEGORY = "Provenance Repository";
private static final String FILE_EXTENSION = ".prov";
private static final String TEMP_FILE_SUFFIX = ".prov.part";
private static final long PURGE_EVENT_MILLISECONDS = 2500L; //Determines the frequency over which the task to delete old events will occur
public static final int SERIALIZATION_VERSION = 8;
public static final Pattern NUMBER_PATTERN = Pattern.compile("\\d+");
public static final Pattern INDEX_PATTERN = Pattern.compile("index-\\d+");
@ -265,7 +266,7 @@ public class PersistentProvenanceRepository implements ProvenanceEventRepository
eventReporter.reportEvent(Severity.ERROR, EVENT_CATEGORY, "Failed to purge old events from Provenance Repo due to " + e.toString());
}
}
}, 1L, 1L, TimeUnit.MINUTES);
}, PURGE_EVENT_MILLISECONDS, PURGE_EVENT_MILLISECONDS, TimeUnit.MILLISECONDS);
}
firstEventTimestamp = determineFirstEventTimestamp();