nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danbr...@apache.org
Subject [15/50] [abbrv] incubator-nifi git commit: NIFI-632 moving thread start to init method
Date Sat, 27 Jun 2015 00:29:42 GMT
NIFI-632 moving thread start to init method


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/089a27f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/089a27f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/089a27f2

Branch: refs/heads/NIFI-680
Commit: 089a27f227afac1bff960d0b8cc0f31d206156d2
Parents: 196da2b
Author: danbress <dbress@onyxconsults.com>
Authored: Mon Jun 8 22:06:23 2015 -0400
Committer: danbress <dbress@onyxconsults.com>
Committed: Tue Jun 9 21:34:27 2015 -0400

----------------------------------------------------------------------
 .../controller/repository/FileSystemRepository.java   | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/089a27f2/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
index e212bdb..3a03fad 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
@@ -193,11 +193,6 @@ public class FileSystemRepository implements ContentRepository {
         LOG.info("Initializing FileSystemRepository with 'Always Sync' set to {}", alwaysSync);
         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;
         if (archiveCleanupFrequency == null) {
             cleanupMillis = 1000L;
@@ -221,6 +216,15 @@ public class FileSystemRepository implements ContentRepository {
     @Override
     public void initialize(final 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


Mime
View raw message