[jira] [Commented] (MINIFI-2) File based implementation

2016-04-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-2:
-

Github user asfgit closed the pull request at:

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


> 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)


[jira] [Commented] (MINIFI-2) File based implementation

2016-04-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/MINIFI-2?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 
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)


[jira] [Commented] (MINIFI-2) File based implementation

2016-04-12 Thread ASF GitHub Bot (JIRA)

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

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_r59429946
  
--- Diff: 
minifi-api/src/main/java/org/apache/nifi/minifi/configuration/ConfigurationChangeNotifier.java
 ---
@@ -21,6 +21,11 @@
 public interface ConfigurationChangeNotifier {
 
 /**
+ * Begins the associated notification service provided by the given 
implementation.  In most implementations, no action will occur until this 
method is invoked.
+ */
+void initialize();
--- End diff --

That works for me


> 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)


[jira] [Commented] (MINIFI-2) File based implementation

2016-04-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-2:
-

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

https://github.com/apache/nifi-minifi/pull/7#discussion_r59427453
  
--- Diff: 
minifi-api/src/main/java/org/apache/nifi/minifi/configuration/ConfigurationChangeNotifier.java
 ---
@@ -21,6 +21,11 @@
 public interface ConfigurationChangeNotifier {
 
 /**
+ * Begins the associated notification service provided by the given 
implementation.  In most implementations, no action will occur until this 
method is invoked.
+ */
+void initialize();
--- End diff --

Actually, given that this is a separate task, how would you feel about 
initialize in its current context being a #start method and then #initialize 
providing the properties as discussed? 


> 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)


[jira] [Commented] (MINIFI-2) File based implementation

2016-04-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-2:
-

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

https://github.com/apache/nifi-minifi/pull/7#discussion_r59426270
  
--- Diff: 
minifi-api/src/main/java/org/apache/nifi/minifi/configuration/ConfigurationChangeNotifier.java
 ---
@@ -21,6 +21,11 @@
 public interface ConfigurationChangeNotifier {
 
 /**
+ * Begins the associated notification service provided by the given 
implementation.  In most implementations, no action will occur until this 
method is invoked.
+ */
+void initialize();
--- End diff --

I can dig that.  Will add.


> 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)


[jira] [Commented] (MINIFI-2) File based implementation

2016-04-12 Thread ASF GitHub Bot (JIRA)

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

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_r59425771
  
--- Diff: 
minifi-api/src/main/java/org/apache/nifi/minifi/configuration/ConfigurationChangeNotifier.java
 ---
@@ -21,6 +21,11 @@
 public interface ConfigurationChangeNotifier {
 
 /**
+ * Begins the associated notification service provided by the given 
implementation.  In most implementations, no action will occur until this 
method is invoked.
+ */
+void initialize();
--- End diff --

This should pass a Properties object so that change notifiers can be 
configured. The user would add properties to the bootstrap.conf (in the same 
way NiFi has notification services configured there) and RunMiNiFi would pass 
the bootstrap properties to each Change Notifier. 


> 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)


[jira] [Commented] (MINIFI-2) File based implementation

2016-04-10 Thread ASF GitHub Bot (JIRA)

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

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_r59144065
  
--- Diff: 
minifi-api/src/main/java/org/apache/nifi/minifi/configuration/ConfigurationChangeListener.java
 ---
@@ -0,0 +1,30 @@
+/**
+ * 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.configuration;
+
+/**
+ * Interface for handling events detected and driven by an associated 
{@link ConfigurationChangeNotifier} to which the listener
+ * has registered via {@link 
ConfigurationChangeNotifier#registerListener(ConfigurationChangeListener)}.
+ */
+public interface ConfigurationChangeListener {
+
+/**
+ * Provides a mechanism for the implementation to interpret the 
specified
+ */
+void handleChange();
--- End diff --

That works for me


> 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)


[jira] [Commented] (MINIFI-2) File based implementation

2016-04-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-2:
-

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

https://github.com/apache/nifi-minifi/pull/7#discussion_r59110901
  
--- Diff: 
minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-runtime/src/main/java/org/apache/nifi/minifi/configuration/FileChangeNotifier.java
 ---
@@ -0,0 +1,139 @@
+/**
+ * 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.configuration;
+
+import static java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY;
+
+import java.io.Closeable;
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.FileSystems;
+import java.nio.file.Path;
+import java.nio.file.WatchEvent;
+import java.nio.file.WatchKey;
+import java.nio.file.WatchService;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * FileChangeNotifier provides a simple FileSystem monitor for detecting 
changes for a specified file as generated from its corresponding {@link Path}.  
Upon modifications to the associated file,
+ * associated listeners receive notification of a change allowing 
configuration logic to be reanalyzed.  The backing implementation is associated 
with a {@link ScheduledExecutorService} that
+ * ensures continuity of monitoring.
+ */
+public class FileChangeNotifier implements ConfigurationChangeNotifier, 
Closeable {
+
+private final ExecutorService executorService;
+private final Path configFile;
+private final WatchService configFileWatcher;
+private final Set 
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 {
+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));
--- End diff --

Not sure about this one.  On the one hand I feel like the start up process 
need some initial value for configuration that likely falls out of the purview 
of the change notifier.  Will contemplate a bit more.


> 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 

[jira] [Commented] (MINIFI-2) File based implementation

2016-04-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-2:
-

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

https://github.com/apache/nifi-minifi/pull/7#discussion_r59110902
  
--- Diff: 
minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-runtime/src/test/java/org/apache/nifi/minifi/configuration/TestFileChangeNotifier.java
 ---
@@ -0,0 +1,83 @@
+/**
+ * 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.configuration;
+
+import java.nio.file.Paths;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+public class TestFileChangeNotifier {
--- End diff --

Certainly


> 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)


[jira] [Commented] (MINIFI-2) File based implementation

2016-04-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-2:
-

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

https://github.com/apache/nifi-minifi/pull/7#discussion_r59110888
  
--- Diff: 
minifi-api/src/main/java/org/apache/nifi/minifi/configuration/ConfigurationChangeListener.java
 ---
@@ -0,0 +1,30 @@
+/**
+ * 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.configuration;
+
+/**
+ * Interface for handling events detected and driven by an associated 
{@link ConfigurationChangeNotifier} to which the listener
+ * has registered via {@link 
ConfigurationChangeNotifier#registerListener(ConfigurationChangeListener)}.
+ */
+public interface ConfigurationChangeListener {
+
+/**
+ * Provides a mechanism for the implementation to interpret the 
specified
+ */
+void handleChange();
--- End diff --

Fair point on this one.  I was thinking a bit narrowly on the file case, 
but providing an InputStream to the consumer (in this case bootstrap) should 
provide some nice flexibility on both sides of the process.


> 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)


[jira] [Commented] (MINIFI-2) File based implementation

2016-04-08 Thread ASF GitHub Bot (JIRA)

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

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/1#discussion_r59093641
  
--- Diff: 
minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/ConfigTransformer.java
 ---
@@ -0,0 +1,331 @@
+/*
+ * 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.util;
+
+
+import org.yaml.snakeyaml.Yaml;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+import java.util.Map;
+import java.util.zip.GZIPOutputStream;
+
+public final class ConfigTransformer {
+// Underlying version NIFI POC will be using
+public static final String NIFI_VERSION = "0.6.0";
+
+public static final String NAME_KEY = "name";
+public static final String COMMENT_KEY = "comment";
+public static final String ALWAYS_SYNC_KEY = "always sync";
+public static final String YIELD_PERIOD_KEY = "yield period";
+public static final String MAX_CONCURRENT_TASKS_KEY = "max concurrent 
tasks";
+public static final String ID_KEY = "id";
+
+public static final String FLOW_CONTROLLER_PROPS_KEY = "Flow 
Controller";
+
+public static final String CORE_PROPS_KEY = "Core Properties";
+public static final String FLOW_CONTROLLER_SHUTDOWN_PERIOD_KEY = "flow 
controller graceful shutdown period";
+public static final String FLOW_SERVICE_WRITE_DELAY_INTERVAL_KEY = 
"flow service write delay interval";
+public static final String ADMINISTRATIVE_YIELD_DURATION_KEY = 
"administrative yield duration";
+public static final String BORED_YIELD_DURATION_KEY = "bored yield 
duration";
+
+public static final String FLOWFILE_REPO_KEY = "FlowFile Repository";
+public static final String PARTITIONS_KEY = "partitions";
+public static final String CHECKPOINT_INTERVAL_KEY = "checkpoint 
interval";
+public static final String THRESHOLD_KEY = "queue swap threshold";
+public static final String SWAP_PROPS_KEY = "Swap";
+public static final String IN_PERIOD_KEY = "in period";
+public static final String IN_THREADS_KEY = "in threads";
+public static final String OUT_PERIOD_KEY = "out period";
+public static final String OUT_THREADS_KEY = "out threads";
+
+
+public static final String CONTENT_REPO_KEY = "Content Repository";
+public static final String CONTENT_CLAIM_MAX_APPENDABLE_SIZE_KEY = 
"content claim max appendable size";
+public static final String CONTENT_CLAIM_MAX_FLOW_FILES_KEY = "content 
claim max flow files";
+
+public static final String COMPONENT_STATUS_REPO_KEY = "Component 
Status Repository";
+public static final String BUFFER_SIZE_KEY = "buffer size";
+public static final String SNAPSHOT_FREQUENCY_KEY = "snapshot 
frequency";
+
+public static final String SECURITY_PROPS_KEY = "Security Properties";
+public static final String KEYSTORE_KEY = "keystore";
+public static final String KEYSTORE_TYPE_KEY = "keystore type";
+public static final String KEYSTORE_PASSWORD_KEY = "keystore password";
+public static final String KEY_PASSWORD_KEY = "key password";
+public static final String TRUSTSTORE_KEY = "truststore";
+public static final String TRUSTSTORE_TYPE_KEY = "truststore type";
+public static final String TRUSTSTORE_PASSWORD_KEY = "truststore 
password";
+public static final String SENSITIVE_PROPS_KEY = "Sensitive Props";
+public static final String SENSITIVE_PROPS_KEY__KEY = "key";
+public 

[jira] [Commented] (MINIFI-2) File based implementation

2016-04-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-2:
-

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

https://github.com/apache/nifi-minifi/pull/1#discussion_r59088973
  
--- Diff: 
minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/ConfigTransformer.java
 ---
@@ -0,0 +1,331 @@
+/*
+ * 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.util;
+
+
+import org.yaml.snakeyaml.Yaml;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+import java.util.Map;
+import java.util.zip.GZIPOutputStream;
+
+public final class ConfigTransformer {
+// Underlying version NIFI POC will be using
+public static final String NIFI_VERSION = "0.6.0";
+
+public static final String NAME_KEY = "name";
+public static final String COMMENT_KEY = "comment";
+public static final String ALWAYS_SYNC_KEY = "always sync";
+public static final String YIELD_PERIOD_KEY = "yield period";
+public static final String MAX_CONCURRENT_TASKS_KEY = "max concurrent 
tasks";
+public static final String ID_KEY = "id";
+
+public static final String FLOW_CONTROLLER_PROPS_KEY = "Flow 
Controller";
+
+public static final String CORE_PROPS_KEY = "Core Properties";
+public static final String FLOW_CONTROLLER_SHUTDOWN_PERIOD_KEY = "flow 
controller graceful shutdown period";
+public static final String FLOW_SERVICE_WRITE_DELAY_INTERVAL_KEY = 
"flow service write delay interval";
+public static final String ADMINISTRATIVE_YIELD_DURATION_KEY = 
"administrative yield duration";
+public static final String BORED_YIELD_DURATION_KEY = "bored yield 
duration";
+
+public static final String FLOWFILE_REPO_KEY = "FlowFile Repository";
+public static final String PARTITIONS_KEY = "partitions";
+public static final String CHECKPOINT_INTERVAL_KEY = "checkpoint 
interval";
+public static final String THRESHOLD_KEY = "queue swap threshold";
+public static final String SWAP_PROPS_KEY = "Swap";
+public static final String IN_PERIOD_KEY = "in period";
+public static final String IN_THREADS_KEY = "in threads";
+public static final String OUT_PERIOD_KEY = "out period";
+public static final String OUT_THREADS_KEY = "out threads";
+
+
+public static final String CONTENT_REPO_KEY = "Content Repository";
+public static final String CONTENT_CLAIM_MAX_APPENDABLE_SIZE_KEY = 
"content claim max appendable size";
+public static final String CONTENT_CLAIM_MAX_FLOW_FILES_KEY = "content 
claim max flow files";
+
+public static final String COMPONENT_STATUS_REPO_KEY = "Component 
Status Repository";
+public static final String BUFFER_SIZE_KEY = "buffer size";
+public static final String SNAPSHOT_FREQUENCY_KEY = "snapshot 
frequency";
+
+public static final String SECURITY_PROPS_KEY = "Security Properties";
+public static final String KEYSTORE_KEY = "keystore";
+public static final String KEYSTORE_TYPE_KEY = "keystore type";
+public static final String KEYSTORE_PASSWORD_KEY = "keystore password";
+public static final String KEY_PASSWORD_KEY = "key password";
+public static final String TRUSTSTORE_KEY = "truststore";
+public static final String TRUSTSTORE_TYPE_KEY = "truststore type";
+public static final String TRUSTSTORE_PASSWORD_KEY = "truststore 
password";
+public static final String SENSITIVE_PROPS_KEY = "Sensitive Props";
+public static final String SENSITIVE_PROPS_KEY__KEY = "key";
+public static 

[jira] [Commented] (MINIFI-2) File based implementation

2016-04-08 Thread ASF GitHub Bot (JIRA)

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

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_r59087047
  
--- Diff: 
minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-runtime/src/test/java/org/apache/nifi/minifi/configuration/TestFileChangeNotifier.java
 ---
@@ -0,0 +1,83 @@
+/**
+ * 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.configuration;
+
+import java.nio.file.Paths;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+public class TestFileChangeNotifier {
--- End diff --

Could a unit be added to test the watcher notifying when a config file gets 
changed?


> 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)


[jira] [Commented] (MINIFI-2) File based implementation

2016-04-08 Thread ASF GitHub Bot (JIRA)

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

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_r59085169
  
--- Diff: 
minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-runtime/src/main/java/org/apache/nifi/minifi/configuration/FileChangeNotifier.java
 ---
@@ -0,0 +1,139 @@
+/**
+ * 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.configuration;
+
+import static java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY;
+
+import java.io.Closeable;
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.FileSystems;
+import java.nio.file.Path;
+import java.nio.file.WatchEvent;
+import java.nio.file.WatchKey;
+import java.nio.file.WatchService;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * FileChangeNotifier provides a simple FileSystem monitor for detecting 
changes for a specified file as generated from its corresponding {@link Path}.  
Upon modifications to the associated file,
+ * associated listeners receive notification of a change allowing 
configuration logic to be reanalyzed.  The backing implementation is associated 
with a {@link ScheduledExecutorService} that
+ * ensures continuity of monitoring.
+ */
+public class FileChangeNotifier implements ConfigurationChangeNotifier, 
Closeable {
+
+private final ExecutorService executorService;
+private final Path configFile;
+private final WatchService configFileWatcher;
+private final Set 
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 {
+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));
--- End diff --

Should it be a valid state to start with no config file and wait for it to 
be put there?


> 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 

[jira] [Commented] (MINIFI-2) File based implementation

2016-04-08 Thread ASF GitHub Bot (JIRA)

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

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_r59085011
  
--- Diff: 
minifi-api/src/main/java/org/apache/nifi/minifi/configuration/ConfigurationChangeListener.java
 ---
@@ -0,0 +1,30 @@
+/**
+ * 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.configuration;
+
+/**
+ * Interface for handling events detected and driven by an associated 
{@link ConfigurationChangeNotifier} to which the listener
+ * has registered via {@link 
ConfigurationChangeNotifier#registerListener(ConfigurationChangeListener)}.
+ */
+public interface ConfigurationChangeListener {
+
+/**
+ * Provides a mechanism for the implementation to interpret the 
specified
+ */
+void handleChange();
--- End diff --

How will the ConfigurationChangeNotifier let the listeners know what the 
configuration changed to?


> 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)


[jira] [Commented] (MINIFI-2) File based implementation

2016-04-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on MINIFI-2:
-

GitHub user apiri opened a pull request:

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

MINIFI-2 MINIFI-4 Configuration change notifier and listener

MINIFI-2
MINIFI-4
Providing Configuration change notifier and listener interfaces with 
accompanying File implementation.

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

$ git pull https://github.com/apiri/nifi-minifi MINIFI-4

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

https://github.com/apache/nifi-minifi/pull/7.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 #7


commit 50ed9bf9ad86729379f72b8d5f2c694244764054
Author: Aldrin Piri 
Date:   2016-04-08T18:59:58Z

MINIFI-2 MINIFI-4 Establishing a base implementation of the configuration 
change listener and notification services as well as a File implementation.




> 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)


[jira] [Commented] (MINIFI-2) File based implementation

2016-03-30 Thread Joseph Percivall (JIRA)

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

Joseph Percivall commented on MINIFI-2:
---

I opened a PR with a Util class that transforms a config.yml file to 
nifi.properties and flow.xml. I fat-fingered the commit message when I first 
opened the PR so I don't think it will get automatically linked, so here it is: 
https://github.com/apache/nifi-minifi/pull/1

> 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, 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)


[jira] [Commented] (MINIFI-2) File based implementation

2016-03-30 Thread Joseph Percivall (JIRA)

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

Joseph Percivall commented on MINIFI-2:
---

For the initial proof of concept (MINIFI-5), the underlying framework should 
re-use the nifi.properties and flow.xml* for configuration but we should offer 
a more use friendly config file to be able to set all the pertinent properties. 
My idea is to have "config.yml" that outlines all the properties for 
configuring and starting up NiFi with a ConfigTransformer that is called by 
bootstrap.java (or other startup class), takes in the config.yml and writes out 
the flow.xml and nifi.properties.
I suggested a Yaml file because it is very user friendly and has very good 
libraries to use.

*I did not include bootstrap.conf because all the configuration in there is 
necessary to start the JVM which, in my view, is outside the scope something a 
user would regularly set.

> 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
>
>
> 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)