mirror of https://github.com/apache/nifi.git
NIFI-886 purging old events much more frequently
This commit is contained in:
parent
1ddd736558
commit
1f6805f06d
|
@ -108,6 +108,7 @@ public class PersistentProvenanceRepository implements ProvenanceEventRepository
|
||||||
public static final String EVENT_CATEGORY = "Provenance Repository";
|
public static final String EVENT_CATEGORY = "Provenance Repository";
|
||||||
private static final String FILE_EXTENSION = ".prov";
|
private static final String FILE_EXTENSION = ".prov";
|
||||||
private static final String TEMP_FILE_SUFFIX = ".prov.part";
|
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 int SERIALIZATION_VERSION = 8;
|
||||||
public static final Pattern NUMBER_PATTERN = Pattern.compile("\\d+");
|
public static final Pattern NUMBER_PATTERN = Pattern.compile("\\d+");
|
||||||
public static final Pattern INDEX_PATTERN = Pattern.compile("index-\\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());
|
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();
|
firstEventTimestamp = determineFirstEventTimestamp();
|
||||||
|
|
Loading…
Reference in New Issue