mirror of https://github.com/apache/nifi.git
NIFI-632 moving thread start to init method
This commit is contained in:
parent
196da2b443
commit
089a27f227
|
@ -193,11 +193,6 @@ public class FileSystemRepository implements ContentRepository {
|
||||||
LOG.info("Initializing FileSystemRepository with 'Always Sync' set to {}", alwaysSync);
|
LOG.info("Initializing FileSystemRepository with 'Always Sync' set to {}", alwaysSync);
|
||||||
initializeRepository();
|
initializeRepository();
|
||||||
|
|
||||||
executor.scheduleWithFixedDelay(new BinDestructableClaims(), 1, 1, TimeUnit.SECONDS);
|
|
||||||
for (int i = 0; i < fileRespositoryPaths.size(); i++) {
|
|
||||||
executor.scheduleWithFixedDelay(new ArchiveOrDestroyDestructableClaims(), 1, 1, TimeUnit.SECONDS);
|
|
||||||
}
|
|
||||||
|
|
||||||
final long cleanupMillis;
|
final long cleanupMillis;
|
||||||
if (archiveCleanupFrequency == null) {
|
if (archiveCleanupFrequency == null) {
|
||||||
cleanupMillis = 1000L;
|
cleanupMillis = 1000L;
|
||||||
|
@ -221,6 +216,15 @@ public class FileSystemRepository implements ContentRepository {
|
||||||
@Override
|
@Override
|
||||||
public void initialize(final ContentClaimManager claimManager) {
|
public void initialize(final ContentClaimManager claimManager) {
|
||||||
this.contentClaimManager = claimManager;
|
this.contentClaimManager = claimManager;
|
||||||
|
|
||||||
|
final NiFiProperties properties = NiFiProperties.getInstance();
|
||||||
|
|
||||||
|
final Map<String, Path> fileRespositoryPaths = properties.getContentRepositoryPaths();
|
||||||
|
|
||||||
|
executor.scheduleWithFixedDelay(new BinDestructableClaims(), 1, 1, TimeUnit.SECONDS);
|
||||||
|
for (int i = 0; i < fileRespositoryPaths.size(); i++) {
|
||||||
|
executor.scheduleWithFixedDelay(new ArchiveOrDestroyDestructableClaims(), 1, 1, TimeUnit.SECONDS);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue