[ 
https://issues.apache.org/jira/browse/MINIFI-2?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15237924#comment-15237924
 ] 

ASF GitHub Bot commented on MINIFI-2:
-------------------------------------

Github user JPercivall commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi/pull/7#discussion_r59448506
  
    --- Diff: 
minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-runtime/src/main/java/org/apache/nifi/minifi/configuration/FileChangeNotifier.java
 ---
    @@ -42,33 +43,18 @@
      */
     public class FileChangeNotifier implements Runnable, 
ConfigurationChangeNotifier, Closeable {
     
    +    private Path configFile;
    +    private WatchService watchService;
    +    private long pollingSeconds;
    +
         private final ScheduledExecutorService executorService = 
Executors.newSingleThreadScheduledExecutor();
    -    private final Path configFile;
    -    private final WatchService watchService;
         private final Set<ConfigurationChangeListener> 
configurationChangeListeners = new HashSet<>();
     
    -    private static final int DEFAULT_POLLING_PERIOD_INTERVAL = 15;
    -    private static final TimeUnit DEFAULT_POLLING_PERIOD_UNIT = 
TimeUnit.SECONDS;
    -
    -    /**
    -     * @param configFile to monitor for changes
    -     * @throws IOException if there are any issues with accessing the 
specified config file or generating the associated {@link WatchService}.
    -     */
    -    public FileChangeNotifier(Path configFile) throws IOException {
    -        this(configFile, initializeWatcher(configFile));
    -    }
    -
    -
    -    public FileChangeNotifier(Path configFile, WatchService watchService) {
    -        final File file = configFile.toFile();
    -        if (!file.exists() || !file.canRead() || !file.isFile()) {
    -            throw new IllegalArgumentException(String.format("The 
specified path %s must be a readable file.", configFile));
    -        }
    -
    -        this.configFile = configFile;
    -        this.watchService = watchService;
    -    }
    +    protected static final String CONFIG_FILE_PATH_KEY = 
"nifi.notifier.file.config.path";
    +    protected static final String POLLING_PERIOD_INTERVAL_KEY = 
"nifi.notifier.file.polling.period.seconds";
    --- End diff --
    
    Should include "minifi" either by replacing "nifi" with it or by adding it 
subsequently. 


> File based implementation
> -------------------------
>
>                 Key: MINIFI-2
>                 URL: https://issues.apache.org/jira/browse/MINIFI-2
>             Project: Apache NiFi MiNiFi
>          Issue Type: Sub-task
>          Components: Processing Configuration
>            Reporter: Aldrin Piri
>             Fix For: 0.0.1
>
>         Attachments: ConfigFileExplanation.xml, Properties_Guide.md, 
> config.yml
>
>
> A defined schema for processing configuration will need to be defined.  XML 
> or YAML seem like possible options for achieving this.
> Agent configuration will come from two places, a bootstrap properties file 
> and a flow configuration file. The bootstrap will make use of some of the 
> original nifi.properties in order to start up the agent. The flow 
> configuration file will essentially be a stripped down version of a flow.xml 
> (with potentially S2S properties from nifi.properties).
> The format for the bootstrap.properties should likely be similar to 
> nifi.properties. 
> Further, a way to incorporate this to leverage the libraries from core NiFi 
> will aid in achieving a proof of concept implementation more expediently.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to