You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by JPercivall <gi...@git.apache.org> on 2016/10/18 20:32:38 UTC

[GitHub] nifi-minifi pull request #46: MINIFI-39 Adding PeriodicStatusReporter to the...

GitHub user JPercivall opened a pull request:

    https://github.com/apache/nifi-minifi/pull/46

    MINIFI-39 Adding PeriodicStatusReporter to the bootstrap process with\u2026

    \u2026 an implementation to log the FlowStatus

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/JPercivall/nifi-minifi MINIFI-39

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi-minifi/pull/46.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #46
    
----
commit 2e6d89e56f54ed82b75eef56f16062c35dbd70c2
Author: Joseph Percivall <jo...@yahoo.com>
Date:   2016-10-18T20:33:25Z

    MINIFI-39 Adding PeriodicStatusReporter to the bootstrap process with an implementation to log the FlowStatus

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi pull request #46: MINIFI-39 Adding PeriodicStatusReporter to the...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi-minifi/pull/46


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi pull request #46: MINIFI-39 Adding PeriodicStatusReporter to the...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi/pull/46#discussion_r84304728
  
    --- Diff: minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/status/PeriodicStatusReporter.java ---
    @@ -0,0 +1,81 @@
    +/*
    + * 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.
    + */
    +
    +package org.apache.nifi.minifi.bootstrap.status;
    +
    +import org.apache.nifi.minifi.bootstrap.QueryableStatusAggregator;
    +
    +import java.util.Properties;
    +import java.util.concurrent.ScheduledThreadPoolExecutor;
    +import java.util.concurrent.TimeUnit;
    +
    +public abstract class PeriodicStatusReporter {
    +
    +    private final ScheduledThreadPoolExecutor scheduledExecutorService = new ScheduledThreadPoolExecutor(1);
    +
    +    private volatile int period = -1;
    +    private volatile int termination_wait = 5000;
    +
    +    public volatile Runnable reportRunner;
    +
    +    /**
    +     * Provides an opportunity for the implementation to perform configuration and initialization based on properties received from the bootstrapping configuration.
    +     *
    +     * @param properties from the bootstrap configuration
    +     */
    +    public abstract void initialize(Properties properties, QueryableStatusAggregator queryableStatusAggregator);
    +
    +    /**
    +     * Begins the associated reporting service provided by the given implementation.  In most implementations, no action will occur until this method is invoked. The implementing class must have set
    +     * 'reportRunner' prior to this method being called.
    +     *
    +     */
    +    public void start() {
    +        if (reportRunner == null){
    +            throw new IllegalStateException("Programmatic error, the reportRunner has is still NULL when 'start' was called.");
    --- End diff --
    
    minor:  has is -> is


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---