Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DD0C9200C2B for ; Thu, 2 Mar 2017 17:14:51 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DBA7B160B7D; Thu, 2 Mar 2017 16:14:51 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3C792160B61 for ; Thu, 2 Mar 2017 17:14:51 +0100 (CET) Received: (qmail 54463 invoked by uid 500); 2 Mar 2017 16:14:50 -0000 Mailing-List: contact commits-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list commits@nifi.apache.org Received: (qmail 54454 invoked by uid 99); 2 Mar 2017 16:14:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Mar 2017 16:14:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id EB22E188004 for ; Thu, 2 Mar 2017 16:14:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.346 X-Spam-Level: X-Spam-Status: No, score=-2.346 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-2.999, SPF_NEUTRAL=0.652, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id QiaD3Tp9rgiH for ; Thu, 2 Mar 2017 16:14:48 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id D18925FBB0 for ; Thu, 2 Mar 2017 16:14:47 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id B88E4E088A for ; Thu, 2 Mar 2017 16:14:46 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 15EA824164 for ; Thu, 2 Mar 2017 16:14:46 +0000 (UTC) Date: Thu, 2 Mar 2017 16:14:46 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: commits@nifi.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MINIFI-231) FlowFile Persistent MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 02 Mar 2017 16:14:52 -0000 [ https://issues.apache.org/jira/browse/MINIFI-231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15892489#comment-15892489 ] ASF GitHub Bot commented on MINIFI-231: --------------------------------------- Github user phrocker commented on a diff in the pull request: https://github.com/apache/nifi-minifi-cpp/pull/62#discussion_r103961349 --- Diff: libminifi/src/Repository.cpp --- @@ -0,0 +1,140 @@ +/** + * @file Repository.cpp + * Repository implemenatation + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include "io/DataStream.h" +#include "io/Serializable.h" +#include "Relationship.h" +#include "Logger.h" +#include "FlowController.h" +#include "Repository.h" +#include "Provenance.h" +#include "FlowFileRepository.h" + +const char *Repository::RepositoryTypeStr[MAX_REPO_TYPE] = {"Provenace Repository", "FlowFile Repository"}; +uint64_t Repository::_repoSize[MAX_REPO_TYPE] = {0, 0}; + +void Repository::start() { + if (!_enable) + return; + if (this->_purgePeriod <= 0) + return; + if (_running) + return; + _running = true; + logger_->log_info("%s Repository Monitor Thread Start", RepositoryTypeStr[_type]); + _thread = new std::thread(run, this); + _thread->detach(); +} + +void Repository::stop() { + if (!_running) + return; + _running = false; + logger_->log_info("%s Repository Monitor Thread Stop", RepositoryTypeStr[_type]); +} + +void Repository::run(Repository *repo) { + // threshold for purge --- End diff -- What is this calculation based on? > FlowFile Persistent > -------------------- > > Key: MINIFI-231 > URL: https://issues.apache.org/jira/browse/MINIFI-231 > Project: Apache NiFi MiNiFi > Issue Type: Bug > Components: Core Framework, Data Format > Affects Versions: cpp-1.0.0 > Reporter: bqiu > Assignee: bqiu > Fix For: cpp-1.0.0 > > > Add FlowFile persistent support -- This message was sent by Atlassian JIRA (v6.3.15#6346)