Return-Path: X-Original-To: apmail-nifi-commits-archive@minotaur.apache.org Delivered-To: apmail-nifi-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 71CB118509 for ; Sat, 27 Jun 2015 00:29:55 +0000 (UTC) Received: (qmail 46626 invoked by uid 500); 27 Jun 2015 00:29:55 -0000 Delivered-To: apmail-nifi-commits-archive@nifi.apache.org Received: (qmail 46589 invoked by uid 500); 27 Jun 2015 00:29:55 -0000 Mailing-List: contact commits-help@nifi.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.incubator.apache.org Delivered-To: mailing list commits@nifi.incubator.apache.org Received: (qmail 46576 invoked by uid 99); 27 Jun 2015 00:29:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Jun 2015 00:29:55 +0000 X-ASF-Spam-Status: No, hits=-2001.4 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 27 Jun 2015 00:27:41 +0000 Received: (qmail 45747 invoked by uid 99); 27 Jun 2015 00:29:28 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Jun 2015 00:29:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B79F6E05D6; Sat, 27 Jun 2015 00:29:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: danbress@apache.org To: commits@nifi.incubator.apache.org Date: Sat, 27 Jun 2015 00:29:42 -0000 Message-Id: In-Reply-To: <63df9b495ce942baa58fe81ee84fec79@git.apache.org> References: <63df9b495ce942baa58fe81ee84fec79@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [15/50] [abbrv] incubator-nifi git commit: NIFI-632 moving thread start to init method X-Virus-Checked: Checked by ClamAV on apache.org 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 Authored: Mon Jun 8 22:06:23 2015 -0400 Committer: danbress 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 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