[jira] [Resolved] (NIFI-72) Framework should automatically create attributes_modified and content_modified events if needed

2014-12-11 Thread Mark Payne (JIRA)

 [ 
https://issues.apache.org/jira/browse/NIFI-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Payne resolved NIFI-72.

Resolution: Fixed

 Framework should automatically create attributes_modified and 
 content_modified events if needed
 ---

 Key: NIFI-72
 URL: https://issues.apache.org/jira/browse/NIFI-72
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Core Framework, Extensions
Reporter: Joseph Witt
Priority: Minor
 Fix For: 0.0.1


 Should probably also emit CREATE if FlowFile created without a parent and no 
 CREATE, FORK, JOIN, or RECEIVE was emitted.
 In general if we can reasonably set the event type and one wasn't already set 
 then the framework should do it automatically.



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


svn commit: r1644648 - /incubator/nifi/site/trunk/content/development/quickstart.md

2014-12-11 Thread joewitt
Author: joewitt
Date: Thu Dec 11 14:18:54 2014
New Revision: 1644648

URL: http://svn.apache.org/r1644648
Log:
Updated details for launching application

Modified:
incubator/nifi/site/trunk/content/development/quickstart.md

Modified: incubator/nifi/site/trunk/content/development/quickstart.md
URL: 
http://svn.apache.org/viewvc/incubator/nifi/site/trunk/content/development/quickstart.md?rev=1644648r1=1644647r2=1644648view=diff
==
--- incubator/nifi/site/trunk/content/development/quickstart.md (original)
+++ incubator/nifi/site/trunk/content/development/quickstart.md Thu Dec 11 
14:18:54 2014
@@ -46,8 +46,11 @@ to 8080 is a good start, but on systems
 `mvn assembly:assembly` will create a tar.gz file in the target directory in 
`assemblies/nifi`. This tar.gz should
 contain the full application. Decompressing the tar.gz should make a directory 
for you containing several other
 directories. `conf` contains application configuration, `logs` will contain 
log files, `bin` contains a fairly
-bare-bones script for launching the application, `nifi.sh`. Running 
`bin/nifi.sh` should start the application in
-the foreground after trying to detect a Java installation.
+bare-bones script for launching the application, `nifi.sh`. On linux (and 
possibly macos) running `bin/nifi.sh start` 
+should start the application in the foreground after trying to detect a Java 
installation.  There are scripts to help with
+startup on windows as well.  The entire concept of how the application will 
integrate to a given OS and run as an
+enduring service is something we're working hard on and would appreciate ideas 
for.  The user experience needs to
+be excellent.
 
 With the default settings you can point a web browser at 
`http://localhost:8080/nifi/`
 




[jira] [Commented] (NIFI-132) EvaluateXPath logs to standard out if there is an error evaluating the XPath

2014-12-11 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14242625#comment-14242625
 ] 

ASF subversion and git services commented on NIFI-132:
--

Commit 2bcd1e657a5a959fad6572b011924f07d995abe8 in incubator-nifi's branch 
refs/heads/develop from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git;h=2bcd1e6 ]

NIFI-132: Log to Processor's logger


 EvaluateXPath logs to standard out if there is an error evaluating the XPath
 

 Key: NIFI-132
 URL: https://issues.apache.org/jira/browse/NIFI-132
 Project: Apache NiFi
  Issue Type: Bug
  Components: Extensions
Reporter: Matt Gilman
Priority: Minor
 Fix For: 0.0.1






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


[2/2] incubator-nifi git commit: NIFI-145: Bug Fixes and updated nifi.sh to use bootstrap code

2014-12-11 Thread markap14
NIFI-145: Bug Fixes and updated nifi.sh to use bootstrap code


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/192d7822
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/192d7822
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/192d7822

Branch: refs/heads/bootstrap
Commit: 192d7822772752cb939921af1610476c8e7dcfda
Parents: 6d46829
Author: Mark Payne marka...@hotmail.com
Authored: Wed Dec 10 11:03:21 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Wed Dec 10 11:03:21 2014 -0500

--
 .../apache/nifi/controller/FlowController.java  |  15 ++
 .../repository/FileSystemRepository.java|   4 +-
 .../WriteAheadFlowFileRepository.java   |   7 +-
 .../scheduling/StandardProcessScheduler.java|   3 +
 .../java/org/apache/nifi/engine/FlowEngine.java |  15 ++
 .../src/main/resources/bin/nifi-status.bat  |  19 +-
 .../resources/src/main/resources/bin/nifi.sh| 193 +--
 .../src/main/resources/bin/run-nifi.bat |  19 +-
 .../src/main/resources/bin/start-nifi.bat   |  19 +-
 .../src/main/resources/bin/stop-nifi.bat|  19 +-
 .../java/org/apache/nifi/bootstrap/RunNiFi.java |  15 +-
 .../org/apache/nifi/bootstrap/ShutdownHook.java |  13 +-
 12 files changed, 130 insertions(+), 211 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/192d7822/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowController.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowController.java
 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowController.java
index a0a07f2..20c50b5 100644
--- 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowController.java
+++ 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/FlowController.java
@@ -1045,6 +1045,21 @@ public class FlowController implements EventAccess, 
ControllerServiceProvider, H
 if (flowFileSwapManager != null) {
 flowFileSwapManager.shutdown();
 }
+
+if ( processScheduler != null ) {
+   processScheduler.shutdown();
+}
+
+if ( provenanceEventRepository != null ) {
+   try {
+   provenanceEventRepository.close();
+   } catch (final IOException ioe) {
+   LOG.warn(There was a problem shutting down the 
Provenance Repository:  + ioe.toString());
+   if ( LOG.isDebugEnabled() ) {
+   LOG.warn(, ioe);
+   }
+   }
+}
 } finally {
 writeLock.unlock();
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/192d7822/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
index 8be9c62..ba74295 100644
--- 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
+++ 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/FileSystemRepository.java
@@ -92,7 +92,7 @@ public class FileSystemRepository implements 
ContentRepository {
 private final ListString containerNames;
 private final AtomicLong index;
 
-private final ScheduledExecutorService executor = new FlowEngine(4, 
FileSystemRepository Workers);
+private final ScheduledExecutorService executor = new FlowEngine(4, 
FileSystemRepository Workers, true);
 private final ConcurrentMapString, BlockingQueueContentClaim 
reclaimable = new ConcurrentHashMap();
 private final MapString, ContainerState containerStateMap = new 
HashMap();
 
@@ -209,7 +209,7 @@ public class FileSystemRepository implements 
ContentRepository {
 }
 }
 
-containerCleanupExecutor = new FlowEngine(containers.size(), Cleanup 
FileSystemRepository Container);
+containerCleanupExecutor = new FlowEngine(containers.size(), Cleanup 
FileSystemRepository Container, true);
 for (final Map.EntryString, Path containerEntry : 
containers.entrySet()) {
 final String containerName = 

[jira] [Commented] (NIFI-145) Develop Bootstrap module

2014-12-11 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14242629#comment-14242629
 ] 

ASF subversion and git services commented on NIFI-145:
--

Commit 192d7822772752cb939921af1610476c8e7dcfda in incubator-nifi's branch 
refs/heads/bootstrap from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git;h=192d782 ]

NIFI-145: Bug Fixes and updated nifi.sh to use bootstrap code


 Develop Bootstrap module
 

 Key: NIFI-145
 URL: https://issues.apache.org/jira/browse/NIFI-145
 Project: Apache NiFi
  Issue Type: New Feature
  Components: Core Framework
Affects Versions: 0.0.1
Reporter: Mark Payne
Assignee: Mark Payne
   Original Estimate: 72h
  Remaining Estimate: 72h

 We need a module that can parse a configuration file in order to determine 
 runtime parameters to run the Java executable for NiFi.
 This should include JVM args, such as agentlib, Xmx, Xms, etc., as well as 
 indicating where the NiFi properties file can be found and what the Java 
 command should be (java vs. $JAVA_HOME/bin/java, etc.)



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


[jira] [Created] (NIFI-162) Create overall documentation/engage theme on website

2014-12-11 Thread Joseph Witt (JIRA)
Joseph Witt created NIFI-162:


 Summary: Create overall documentation/engage theme on website
 Key: NIFI-162
 URL: https://issues.apache.org/jira/browse/NIFI-162
 Project: Apache NiFi
  Issue Type: Task
  Components: Documentation  Website
 Environment: apache nifi website
Reporter: Joseph Witt
Assignee: Joseph Witt
Priority: Critical


Perspectives / Flow of Documentation:

- All
  - What problem does NiFi solve?
  - What is the general design philosophy of NiFi?
  - What are some of the key features?

- User
  - SA
- How to install
- Best practice configuration
- Security / Hardening
  - Dataflow Manager
- How to build flows
- Create / Share / Use templates
- How to monitor behavior/performance
- Data Provenance
  - Observer
- Read-only access

- Developer
  - What are the extension points
  - How to build extensions
  - Key things to consider/design considerations/strengths/limitations
  - How to contribute to Apache NiFI





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


[05/25] incubator-nifi git commit: NIFI-147: - Clean up change for SVG resizing to remove unnecessary window resize listener.

2014-12-11 Thread markap14
NIFI-147:
- Clean up change for SVG resizing to remove unnecessary window resize listener.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/63e80d3f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/63e80d3f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/63e80d3f

Branch: refs/heads/bootstrap
Commit: 63e80d3fdc62034d445c1d5725af8c83e221a74a
Parents: 61c5cb3
Author: Matt Gilman matt.c.gil...@gmail.com
Authored: Tue Dec 9 15:33:21 2014 -0500
Committer: Matt Gilman matt.c.gil...@gmail.com
Committed: Tue Dec 9 15:33:21 2014 -0500

--
 .../src/main/webapp/js/nf/canvas/nf-canvas.js   | 29 ++--
 1 file changed, 14 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/63e80d3f/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
--
diff --git 
a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
 
b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
index 3b71088..e72b5c8 100644
--- 
a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
+++ 
b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
@@ -198,8 +198,6 @@ nf.Canvas = (function () {
 
 // create the canvas
 svg = d3.select('#canvas-container').append('svg')
-.attr('width', canvasContainer.width())
-.attr('height', canvasContainer.height())
 .on('contextmenu', function () {
 // reset the canvas click flag
 canvasClicked = false;
@@ -214,14 +212,6 @@ nf.Canvas = (function () {
 d3.event.preventDefault();
 });
 
-// listen for browser resize events to update the svg
-$(window).resize(function () {
-svg.attr({
-'width': canvasContainer.width(),
-'height': canvasContainer.height()
-});
-});
-
 // create the definitions element
 var defs = svg.append('defs');
 
@@ -470,13 +460,22 @@ nf.Canvas = (function () {
 bottom = footer.height();
 }
 
-var graph = $('#canvas-container');
-var top = parseInt(graph.css('top'), 10);
+// calculate size
+var top = parseInt(canvasContainer.css('top'), 10);
 var windowHeight = $(window).height();
-var graphHeight = (windowHeight - (bottom + top));
-graph.css('height', graphHeight + 'px');
-graph.css('bottom', bottom + 'px');
+var canvasHeight = (windowHeight - (bottom + top));
+
+// canvas/svg
+canvasContainer.css({
+'height': canvasHeight + 'px',
+'bottom': bottom + 'px'
+});
+svg.attr({
+'height': canvasContainer.height(),
+'width': canvasContainer.width()
+});
 
+// body
 $('#canvas-body').css({
 'height': windowHeight + 'px',
 'width': $(window).width() + 'px'



[04/25] incubator-nifi git commit: NIFI-146: - Using shift instead of ctrl to drive group selection. - Added support for metaKey for keyboard shortcuts.

2014-12-11 Thread markap14
NIFI-146:
- Using shift instead of ctrl to drive group selection.
- Added support for metaKey for keyboard shortcuts.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/61c5cb37
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/61c5cb37
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/61c5cb37

Branch: refs/heads/bootstrap
Commit: 61c5cb377370e7d5265cce405b42adeafecb1018
Parents: 457787c
Author: Matt Gilman matt.c.gil...@gmail.com
Authored: Tue Dec 9 15:18:52 2014 -0500
Committer: Matt Gilman matt.c.gil...@gmail.com
Committed: Tue Dec 9 15:18:52 2014 -0500

--
 .../src/main/webapp/js/nf/canvas/nf-canvas.js   | 66 ++--
 .../main/webapp/js/nf/canvas/nf-connectable.js  |  8 +--
 .../main/webapp/js/nf/canvas/nf-selectable.js   |  6 +-
 3 files changed, 40 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/61c5cb37/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
--
diff --git 
a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
 
b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
index 2aa274f..3b71088 100644
--- 
a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
+++ 
b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
@@ -332,41 +332,41 @@ nf.Canvas = (function () {
 
 // handle canvas events
 svg.on('mousedown.selection', function () {
-canvasClicked = true;
+canvasClicked = true;
 
-if (d3.event.button !== 0) {
-// prevent further propagation (to parents and others handlers 
-// on the same element to prevent zoom behavior)
-d3.event.stopImmediatePropagation();
-return;
-}
+if (d3.event.button !== 0) {
+// prevent further propagation (to parents and others 
handlers 
+// on the same element to prevent zoom behavior)
+d3.event.stopImmediatePropagation();
+return;
+}
 
-// show selection box if control is held down
-if (d3.event.ctrlKey) {
-var position = d3.mouse(canvas.node());
-canvas.append('rect')
-.attr('rx', 6)
-.attr('ry', 6)
-.attr('x', position[0])
-.attr('y', position[1])
-.attr('class', 'selection')
-.attr('width', 0)
-.attr('height', 0)
-.attr('stroke-width', function () {
-return 1 / nf.Canvas.View.scale();
-})
-.attr('stroke-dasharray', function () {
-return 4 / nf.Canvas.View.scale();
-})
-.datum(position);
-
-// prevent further propagation (to parents)
-d3.event.stopPropagation();
-}
-})
+// show selection box if shift is held down
+if (d3.event.shiftKey) {
+var position = d3.mouse(canvas.node());
+canvas.append('rect')
+.attr('rx', 6)
+.attr('ry', 6)
+.attr('x', position[0])
+.attr('y', position[1])
+.attr('class', 'selection')
+.attr('width', 0)
+.attr('height', 0)
+.attr('stroke-width', function () {
+return 1 / nf.Canvas.View.scale();
+})
+.attr('stroke-dasharray', function () {
+return 4 / nf.Canvas.View.scale();
+})
+.datum(position);
+
+// prevent further propagation (to parents)
+d3.event.stopPropagation();
+}
+})
 .on('mousemove.selection', function () {
-// update selection box if control is held down
-if (d3.event.ctrlKey) {
+// update selection box if shift is held down

[06/25] incubator-nifi git commit: NIFI-42: - Using displayName where appropriate. - Ensuring descriptor exists before attempting to use a default value.

2014-12-11 Thread markap14
NIFI-42:
- Using displayName where appropriate.
- Ensuring descriptor exists before attempting to use a default value.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/38614469
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/38614469
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/38614469

Branch: refs/heads/bootstrap
Commit: 386144695831197aef7f1448350be60efbdf1f2f
Parents: 63e80d3
Author: Matt Gilman matt.c.gil...@gmail.com
Authored: Tue Dec 9 15:58:32 2014 -0500
Committer: Matt Gilman matt.c.gil...@gmail.com
Committed: Tue Dec 9 15:58:32 2014 -0500

--
 .../js/nf/canvas/nf-processor-property-table.js | 10 +-
 .../src/main/webapp/js/nf/nf-processor-details.js   | 16 ++--
 2 files changed, 15 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/38614469/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js
--
diff --git 
a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js
 
b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js
index b5bfb79..d5ff1c4 100644
--- 
a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js
+++ 
b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js
@@ -475,11 +475,11 @@ nf.ProcessorPropertyTable = (function () {
 
 // use the display name if possible
 displayName = descriptor.displayName;
-}
-
-// determine the value
-if (nf.Common.isUndefined(value) || 
nf.Common.isNull(value)) {
-value = descriptor.defaultValue;
+
+// determine the value
+if (nf.Common.isUndefined(value) || 
nf.Common.isNull(value)) {
+value = descriptor.defaultValue;
+}
 }
 
 // add the row

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/38614469/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
--
diff --git 
a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
 
b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
index f27fc7a..8daff9a 100644
--- 
a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
+++ 
b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
@@ -462,6 +462,7 @@ nf.ProcessorDetails = (function () {
 
 // determine the property type
 var type = 'userDefined';
+var displayName = name;
 if (nf.Common.isDefinedAndNotNull(descriptor)) {
 if (descriptor.required === true) {
 type = 'required';
@@ -470,17 +471,20 @@ nf.ProcessorDetails = (function () {
 } else {
 type = 'optional';
 }
-}
-
-// determine the value
-if (nf.Common.isUndefined(value) || 
nf.Common.isNull(value)) {
-value = descriptor.defaultValue;
+
+// use the display name if possible
+displayName = descriptor.displayName;
+
+// determine the value
+if (nf.Common.isUndefined(value) || 
nf.Common.isNull(value)) {
+value = descriptor.defaultValue;
+}
 }
 
 // add the row
 propertyData.addItem({
 id: i++,
-property: name,
+property: displayName,
 value: value,
 type: type
 });



[jira] [Commented] (NIFI-72) Framework should automatically create attributes_modified and content_modified events if needed

2014-12-11 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14242920#comment-14242920
 ] 

ASF subversion and git services commented on NIFI-72:
-

Commit cbea1f193620f934d6186d167d0c0fe0723fad7c in incubator-nifi's branch 
refs/heads/bootstrap from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git;h=cbea1f1 ]

NIFI-72: Added unit tests and fixed bug that caused CONTENT_MODIFIED to be 
emitted for newly created FlowFiles


 Framework should automatically create attributes_modified and 
 content_modified events if needed
 ---

 Key: NIFI-72
 URL: https://issues.apache.org/jira/browse/NIFI-72
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Core Framework, Extensions
Reporter: Joseph Witt
Priority: Minor
 Fix For: 0.0.1


 Should probably also emit CREATE if FlowFile created without a parent and no 
 CREATE, FORK, JOIN, or RECEIVE was emitted.
 In general if we can reasonably set the event type and one wasn't already set 
 then the framework should do it automatically.



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


[25/25] incubator-nifi git commit: NIFI-145: Added PID detection for Linux

2014-12-11 Thread markap14
NIFI-145: Added PID detection for Linux


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/d517b3fd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/d517b3fd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/d517b3fd

Branch: refs/heads/bootstrap
Commit: d517b3fd0932676edddfa2cfbacb320b6142e882
Parents: 2bcd1e6
Author: Mark Payne marka...@hotmail.com
Authored: Thu Dec 11 13:40:56 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Thu Dec 11 13:40:56 2014 -0500

--
 .../resources/src/main/resources/bin/nifi.sh|   2 +-
 .../src/main/resources/conf/bootstrap.conf  |   8 +-
 .../apache/nifi/bootstrap/BootstrapCodec.java   |   1 +
 .../java/org/apache/nifi/bootstrap/RunNiFi.java | 439 ---
 4 files changed, 387 insertions(+), 63 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d517b3fd/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
--
diff --git 
a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
 
b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
index 60afa48..9dc7ef6 100644
--- 
a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
+++ 
b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
@@ -172,7 +172,7 @@ run() {
 echo Bootstrap Config File: $BOOTSTRAP_CONF
 echo
 
-exec $JAVA -cp $NIFI_HOME/lib/bootstrap/* -Xms12m -Xmx24m 
-Dorg.apache.nifi.bootstrap.config.file=$BOOTSTRAP_CONF 
org.apache.nifi.bootstrap.RunNiFi $1
+exec $JAVA -cp $NIFI_HOME/lib/bootstrap/* -Xms12m -Xmx24m 
-Dorg.apache.nifi.bootstrap.config.file=$BOOTSTRAP_CONF 
org.apache.nifi.bootstrap.RunNiFi $1 $2
 }
 
 main() {

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d517b3fd/nar-bundles/framework-bundle/framework/resources/src/main/resources/conf/bootstrap.conf
--
diff --git 
a/nar-bundles/framework-bundle/framework/resources/src/main/resources/conf/bootstrap.conf
 
b/nar-bundles/framework-bundle/framework/resources/src/main/resources/conf/bootstrap.conf
index c45d8f8..6b32b2b 100644
--- 
a/nar-bundles/framework-bundle/framework/resources/src/main/resources/conf/bootstrap.conf
+++ 
b/nar-bundles/framework-bundle/framework/resources/src/main/resources/conf/bootstrap.conf
@@ -13,4 +13,10 @@ java.arg.2=-Xms256m
 java.arg.3=-Xmx512m
 
 # Enable Remote Debugging
-#java.arg.2=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
\ No newline at end of file
+#java.arg.2=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
+
+# Java command to use when running NiFi
+java=java
+
+# Username to use when running NiFi. This value will be ignored on Windows.
+run.as=

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d517b3fd/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/BootstrapCodec.java
--
diff --git 
a/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/BootstrapCodec.java 
b/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/BootstrapCodec.java
index 8138c02..fb10930 100644
--- a/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/BootstrapCodec.java
+++ b/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/BootstrapCodec.java
@@ -27,6 +27,7 @@ import java.util.Arrays;
 
 import org.apache.nifi.bootstrap.exception.InvalidCommandException;
 
+
 public class BootstrapCodec {
private final RunNiFi runner;
private final BufferedReader reader;

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d517b3fd/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java
--
diff --git 
a/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java 
b/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java
index 1b82a3c..a5987bc 100644
--- a/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java
+++ b/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java
@@ -26,10 +26,11 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.OutputStream;
+import java.io.Reader;
+import java.lang.reflect.Field;
 import java.net.InetSocketAddress;
 import java.net.Socket;
 import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -39,6 +40,9 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.Condition;
 

[14/25] incubator-nifi git commit: NIFI-145: Fixed stack trace that occassionally occurs on shutdown

2014-12-11 Thread markap14
NIFI-145: Fixed stack trace that occassionally occurs on shutdown


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/f63cd9a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/f63cd9a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/f63cd9a1

Branch: refs/heads/bootstrap
Commit: f63cd9a15ee42715ff0b70873f30f3954242a957
Parents: 97f8ab0
Author: Mark Payne marka...@hotmail.com
Authored: Wed Dec 10 12:17:32 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Wed Dec 10 12:17:32 2014 -0500

--
 .../src/main/java/org/apache/nifi/bootstrap/RunNiFi.java   | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f63cd9a1/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java
--
diff --git 
a/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java 
b/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java
index af783a1..1b82a3c 100644
--- a/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java
+++ b/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java
@@ -397,7 +397,11 @@ public class RunNiFi {
} catch (final InterruptedException ie) 
{
}
} else {
-   
runtime.removeShutdownHook(shutdownHook);
+   try {
+   
runtime.removeShutdownHook(shutdownHook);
+   } catch (final IllegalStateException ise) {
+   // happens when already shutting down
+   }

if (autoRestartNiFi) {
System.out.println(Apache NiFi 
appears to have died. Restarting...);



[10/25] incubator-nifi git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop

2014-12-11 Thread markap14
Merge branch 'develop' of 
https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/5ebf3b51
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/5ebf3b51
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/5ebf3b51

Branch: refs/heads/bootstrap
Commit: 5ebf3b51cd7a51ed52ac38c37797b5268129d633
Parents: cb63c66 2735c6c
Author: Mark Payne marka...@hotmail.com
Authored: Wed Dec 10 11:08:10 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Wed Dec 10 11:08:10 2014 -0500

--
 .../resources/src/main/resources/bin/nifi.sh| 16 +++-
 .../web/controller/StandardSearchContext.java   | 18 +---
 .../accesscontrol/DfmAccessControlTest.java | 26 +-
 .../src/main/webapp/js/nf/canvas/nf-canvas.js   | 95 ++--
 .../main/webapp/js/nf/canvas/nf-connectable.js  |  8 +-
 .../main/webapp/js/nf/canvas/nf-draggable.js| 49 ++
 .../js/nf/canvas/nf-processor-property-table.js | 10 +--
 .../main/webapp/js/nf/canvas/nf-selectable.js   |  6 +-
 .../main/webapp/js/nf/nf-processor-details.js   | 16 ++--
 9 files changed, 142 insertions(+), 102 deletions(-)
--




[11/25] incubator-nifi git commit: Merge branch 'bootstrap' into develop

2014-12-11 Thread markap14
Merge branch 'bootstrap' into develop


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/cce36335
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/cce36335
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/cce36335

Branch: refs/heads/bootstrap
Commit: cce36335e1d22a6664d907c55e617d8807bcee90
Parents: 5ebf3b5 192d782
Author: Mark Payne marka...@hotmail.com
Authored: Wed Dec 10 11:08:55 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Wed Dec 10 11:08:55 2014 -0500

--
 assemblies/nifi/pom.xml |   5 +
 .../apache/nifi/controller/FlowController.java  |  15 +
 .../repository/FileSystemRepository.java|   4 +-
 .../WriteAheadFlowFileRepository.java   |   7 +-
 .../scheduling/StandardProcessScheduler.java|   3 +
 .../java/org/apache/nifi/engine/FlowEngine.java |  15 +
 .../src/main/resources/bin/nifi-status.bat  |  32 ++
 .../resources/src/main/resources/bin/nifi.sh| 193 +-
 .../src/main/resources/bin/run-nifi.bat |  32 ++
 .../src/main/resources/bin/start-nifi.bat   |  32 ++
 .../src/main/resources/bin/stop-nifi.bat|  32 ++
 .../src/main/resources/conf/bootstrap.conf  |  16 +
 .../java/org/apache/nifi/BootstrapListener.java | 234 
 .../src/main/java/org/apache/nifi/NiFi.java |  40 +-
 nifi-bootstrap/pom.xml  |  17 +-
 .../apache/nifi/bootstrap/BootstrapCodec.java   |  89 +
 .../org/apache/nifi/bootstrap/NiFiListener.java | 116 ++
 .../java/org/apache/nifi/bootstrap/RunNiFi.java | 370 +--
 .../org/apache/nifi/bootstrap/ShutdownHook.java |  69 +++-
 .../exception/InvalidCommandException.java  |  37 ++
 20 files changed, 1136 insertions(+), 222 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/cce36335/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
--
diff --cc 
nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
index 6fedfb7,81ae384..ad90d5b
--- 
a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
+++ 
b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
@@@ -21,40 -21,7 +21,12 @@@
  DIRNAME=`dirname $0`
  PROGNAME=`basename $0`
  
- #
- # Sourcing environment settings for NIFI similar to tomcats setenv
- #
- NIFI_SCRIPT=nifi.sh
- export NIFI_SCRIPT
- if [ -f $DIRNAME/setenv.sh ]; then
-   . $DIRNAME/setenv.sh
- fi
- 
- #
- # Check/Set up some easily accessible MIN/MAX params for JVM mem usage
- #
- if [ x$JAVA_MIN_MEM = x ]; then
- JAVA_MIN_MEM=512M
- export JAVA_MIN_MEM
- fi
- if [ x$JAVA_MAX_MEM = x ]; then
- JAVA_MAX_MEM=512M
- export JAVA_MAX_MEM
- fi
- if [ x$JAVA_PERMSIZE = x ]; then
- JAVA_PERMSIZE=128M
- export JAVA_PERMSIZE
- fi
- if [ x$JAVA_MAX_PERMSIZE = x ]; then
- JAVA_MAX_PERMSIZE=128M
- export JAVA_MAX_PERMSIZE
- fi
  
 +#
 +#Readlink is not available on all systems. Change variable to appropriate 
alternative as part of OS detection
 +#
 +
 +READLINK=readlink
  
  warn() {
  echo ${PROGNAME}: $*



[20/25] incubator-nifi git commit: updated build-order.sh to incorporate the boostrap stuff

2014-12-11 Thread markap14
updated build-order.sh to incorporate the boostrap stuff


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/8ed8d698
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/8ed8d698
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/8ed8d698

Branch: refs/heads/bootstrap
Commit: 8ed8d69899bbb97ebff0f4c74ff358bd03ee900c
Parents: d89ba73
Author: joewitt joew...@apache.org
Authored: Wed Dec 10 23:33:13 2014 -0500
Committer: joewitt joew...@apache.org
Committed: Wed Dec 10 23:33:13 2014 -0500

--
 misc/build-order.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8ed8d698/misc/build-order.sh
--
diff --git a/misc/build-order.sh b/misc/build-order.sh
index 855321a..e8f8e5e 100755
--- a/misc/build-order.sh
+++ b/misc/build-order.sh
@@ -5,7 +5,9 @@ cd misc/nar-maven-plugin  \
 mvn $MAVEN_FLAGS install  \
 cd ../../commons/nifi-parent  \
 mvn $MAVEN_FLAGS install  \
-cd ../../nifi-api  \
+cd ../../nifi-bootstrap  \
+mvn $MAVEN_FLAGS install  \
+cd ../nifi-api  \
 mvn $MAVEN_FLAGS install  \
 cd ../commons/  \
 cd nifi-stream-utils  \



[23/25] incubator-nifi git commit: NIFI-161: Removed references to deprecated methods

2014-12-11 Thread markap14
NIFI-161: Removed references to deprecated methods


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/74c79404
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/74c79404
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/74c79404

Branch: refs/heads/bootstrap
Commit: 74c79404873b27cc1eea78d74ff05b5492988ec6
Parents: cbea1f1
Author: Mark Payne marka...@hotmail.com
Authored: Thu Dec 11 09:44:38 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Thu Dec 11 09:44:38 2014 -0500

--
 .../nifi/remote/StandardRemoteProcessGroup.java | 100 ++-
 1 file changed, 52 insertions(+), 48 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/74c79404/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/remote/StandardRemoteProcessGroup.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/remote/StandardRemoteProcessGroup.java
 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/remote/StandardRemoteProcessGroup.java
index bb5efd7..d3fb41f 100644
--- 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/remote/StandardRemoteProcessGroup.java
+++ 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/remote/StandardRemoteProcessGroup.java
@@ -54,6 +54,7 @@ import java.util.regex.Pattern;
 import javax.net.ssl.SSLContext;
 import javax.security.cert.CertificateExpiredException;
 import javax.security.cert.CertificateNotYetValidException;
+import javax.ws.rs.core.Response;
 
 import org.apache.nifi.connectable.ConnectableType;
 import org.apache.nifi.connectable.Connection;
@@ -88,7 +89,6 @@ import org.apache.nifi.util.NiFiProperties;
 import org.apache.nifi.web.api.dto.ControllerDTO;
 import org.apache.nifi.web.api.dto.PortDTO;
 import org.apache.nifi.web.api.entity.ControllerEntity;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -110,6 +110,11 @@ public class StandardRemoteProcessGroup implements 
RemoteProcessGroup {
 public static final String ROOT_GROUP_STATUS_URI_PATH = 
/controller/process-groups/root/status;
 public static final long LISTENING_PORT_REFRESH_MILLIS = 
TimeUnit.MILLISECONDS.convert(10, TimeUnit.MINUTES);
 
+// status codes
+public static final int OK_STATUS_CODE = Status.OK.getStatusCode();
+public static final int UNAUTHORIZED_STATUS_CODE = 
Status.UNAUTHORIZED.getStatusCode();
+public static final int FORBIDDEN_STATUS_CODE = 
Status.FORBIDDEN.getStatusCode();
+
 private final String id;
 
 private final URI targetUri;
@@ -860,7 +865,8 @@ public class StandardRemoteProcessGroup implements 
RemoteProcessGroup {
 try {
 // perform the request
 final ClientResponse response = utils.get(uri, 
getCommunicationsTimeout(TimeUnit.MILLISECONDS));
-if (!Status.OK.equals(response.getClientResponseStatus())) {
+
+if 
(!Response.Status.Family.SUCCESSFUL.equals(response.getStatusInfo().getFamily()))
 {
 writeLock.lock();
 try {
 for (final IteratorStandardRemoteGroupPort iter = 
inputPorts.values().iterator(); iter.hasNext();) {
@@ -882,7 +888,7 @@ public class StandardRemoteProcessGroup implements 
RemoteProcessGroup {
 
 // consume the entity entirely
 response.getEntity(String.class);
-throw new CommunicationsException(Unable to communicate with 
Remote NiFi at URI  + uriVal + . Got HTTP Error Code  + 
response.getClientResponseStatus().getStatusCode() + :  + 
response.getClientResponseStatus().getReasonPhrase());
+throw new CommunicationsException(Unable to communicate with 
Remote NiFi at URI  + uriVal + . Got HTTP Error Code  + response.getStatus() 
+ :  + response.getStatusInfo().getReasonPhrase());
 }
 
 final ControllerEntity entity = 
response.getEntity(ControllerEntity.class);
@@ -1303,56 +1309,54 @@ public class StandardRemoteProcessGroup implements 
RemoteProcessGroup {
 try {
 final RemoteProcessGroupUtils utils = new 
RemoteProcessGroupUtils(isWebApiSecure() ? sslContext : null);
 final ClientResponse response = utils.get(new URI(apiUri + 
CONTROLLER_URI_PATH), getCommunicationsTimeout(TimeUnit.MILLISECONDS));
-switch (response.getClientResponseStatus()) {
-case OK:
-final ControllerEntity entity = 
response.getEntity(ControllerEntity.class);
-final ControllerDTO dto = entity.getController();
+
+  

[24/25] incubator-nifi git commit: NIFI-132: Log to Processor's logger

2014-12-11 Thread markap14
NIFI-132: Log to Processor's logger


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/2bcd1e65
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/2bcd1e65
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/2bcd1e65

Branch: refs/heads/bootstrap
Commit: 2bcd1e657a5a959fad6572b011924f07d995abe8
Parents: 74c7940
Author: Mark Payne marka...@hotmail.com
Authored: Thu Dec 11 09:45:24 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Thu Dec 11 09:45:24 2014 -0500

--
 .../nifi/processors/standard/EvaluateXPath.java | 31 ++--
 1 file changed, 28 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2bcd1e65/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateXPath.java
--
diff --git 
a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateXPath.java
 
b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateXPath.java
index 056f4fc..2f3f34b 100644
--- 
a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateXPath.java
+++ 
b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateXPath.java
@@ -36,6 +36,7 @@ import java.util.Set;
 import java.util.concurrent.atomic.AtomicReference;
 
 import javax.xml.namespace.QName;
+import javax.xml.transform.ErrorListener;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Source;
 import javax.xml.transform.Transformer;
@@ -50,6 +51,7 @@ import javax.xml.xpath.XPathFactoryConfigurationException;
 
 import net.sf.saxon.lib.NamespaceConstant;
 import net.sf.saxon.xpath.XPathEvaluator;
+
 import org.apache.nifi.components.PropertyDescriptor;
 import org.apache.nifi.components.ValidationContext;
 import org.apache.nifi.components.ValidationResult;
@@ -73,7 +75,6 @@ import org.apache.nifi.processor.exception.ProcessException;
 import org.apache.nifi.processor.io.InputStreamCallback;
 import org.apache.nifi.processor.io.OutputStreamCallback;
 import org.apache.nifi.util.ObjectHolder;
-
 import org.xml.sax.InputSource;
 
 @EventDriven
@@ -356,8 +357,7 @@ public class EvaluateXPath extends AbstractProcessor {
 session.getProvenanceReporter().modifyContent(flowFile);
 }
 } else {
-logger.error(Failed to write XPath result for {} due to {}; 
routing original to 'failure', new Object[]{
-flowFile, error.get()});
+logger.error(Failed to write XPath result for {} due to {}; 
routing original to 'failure', new Object[]{flowFile, error.get()});
 session.transfer(flowFile, REL_FAILURE);
 }
 }
@@ -377,7 +377,32 @@ public class EvaluateXPath extends AbstractProcessor {
 props.setProperty(OutputKeys.OMIT_XML_DECLARATION, no);
 transformer.setOutputProperties(props);
 
+final ProcessorLog logger = getLogger();
+
+final ObjectHolderTransformerException error = new 
ObjectHolder(null);
+transformer.setErrorListener(new ErrorListener() {
+@Override
+public void warning(final TransformerException exception) throws 
TransformerException {
+logger.warn(Encountered warning from XPath Engine: , new 
Object[] {exception.toString(), exception});
+}
+
+@Override
+public void error(final TransformerException exception) throws 
TransformerException {
+logger.error(Encountered error from XPath Engine: , new 
Object[] {exception.toString(), exception});
+error.set(exception);
+}
+
+@Override
+public void fatalError(final TransformerException exception) 
throws TransformerException {
+logger.error(Encountered warning from XPath Engine: , new 
Object[] {exception.toString(), exception});
+error.set(exception);
+}
+});
+
 transformer.transform(sourceNode, new StreamResult(out));
+if ( error.get() != null ) {
+throw error.get();
+}
 }
 
 private static class XPathValidator implements Validator {



[13/25] incubator-nifi git commit: NIFI-54: When incrementing active thread count, if the value exceeds max, do not run

2014-12-11 Thread markap14
NIFI-54: When incrementing active thread count, if the value exceeds max, do 
not run


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/97f8ab0c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/97f8ab0c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/97f8ab0c

Branch: refs/heads/bootstrap
Commit: 97f8ab0cc50f77a2ff3a4e9d575ec05c185e5b80
Parents: 8254b75
Author: Mark Payne marka...@hotmail.com
Authored: Wed Dec 10 11:57:33 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Wed Dec 10 11:57:33 2014 -0500

--
 .../scheduling/EventDrivenSchedulingAgent.java  | 24 ++--
 .../controller/scheduling/ScheduleState.java|  8 +++
 2 files changed, 26 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/97f8ab0c/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/scheduling/EventDrivenSchedulingAgent.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/scheduling/EventDrivenSchedulingAgent.java
 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/scheduling/EventDrivenSchedulingAgent.java
index 5b237ff..af801bb 100644
--- 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/scheduling/EventDrivenSchedulingAgent.java
+++ 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/scheduling/EventDrivenSchedulingAgent.java
@@ -263,7 +263,17 @@ public class EventDrivenSchedulingAgent implements 
SchedulingAgent {
 }
 
 private void trigger(final Connectable worker, final ScheduleState 
scheduleState, final ConnectableProcessContext processContext, final 
ProcessSessionFactory sessionFactory) {
-scheduleState.incrementActiveThreadCount();
+final int newThreadCount = 
scheduleState.incrementActiveThreadCount();
+if (newThreadCount  worker.getMaxConcurrentTasks()  
worker.getMaxConcurrentTasks()  0) {
+ // its possible that the worker queue could give us a worker 
node that is eligible to run based
+ // on the number of threads but another thread has already 
incremented the thread count, result in
+ // reaching the maximum number of threads. we won't know this 
until we atomically increment the thread count 
+ // on the Schedule State, so we check it here. in this case, 
we cannot trigger the Processor, as doing so would
+ // result in using more than the maximum number of defined 
threads
+ scheduleState.decrementActiveThreadCount();
+ return;
+}
+
 try {
 try (final AutoCloseable ncl = NarCloseable.withNarLoader()) {
 worker.onTrigger(processContext, sessionFactory);
@@ -293,7 +303,17 @@ public class EventDrivenSchedulingAgent implements 
SchedulingAgent {
 }
 
 private void trigger(final ProcessorNode worker, final ProcessContext 
context, final ScheduleState scheduleState, final StandardProcessContext 
processContext, final ProcessSessionFactory sessionFactory) {
-scheduleState.incrementActiveThreadCount();
+final int newThreadCount = 
scheduleState.incrementActiveThreadCount();
+if (newThreadCount  worker.getMaxConcurrentTasks()  
worker.getMaxConcurrentTasks()  0) {
+ // its possible that the worker queue could give us a worker 
node that is eligible to run based
+ // on the number of threads but another thread has already 
incremented the thread count, result in
+ // reaching the maximum number of threads. we won't know this 
until we atomically increment the thread count 
+ // on the Schedule State, so we check it here. in this case, 
we cannot trigger the Processor, as doing so would
+ // result in using more than the maximum number of defined 
threads
+ scheduleState.decrementActiveThreadCount();
+ return;
+}
+
 try {
 try (final AutoCloseable ncl = NarCloseable.withNarLoader()) {
 worker.onTrigger(processContext, sessionFactory);

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/97f8ab0c/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/scheduling/ScheduleState.java
--
diff --git 

[15/25] incubator-nifi git commit: NIFI-39: Implemented loadLibrary

2014-12-11 Thread markap14
NIFI-39: Implemented loadLibrary


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/f60a97b0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/f60a97b0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/f60a97b0

Branch: refs/heads/bootstrap
Commit: f60a97b0262fdd9d753130eb81b48e9326eda3dc
Parents: f63cd9a
Author: Mark Payne marka...@hotmail.com
Authored: Wed Dec 10 12:17:55 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Wed Dec 10 12:17:55 2014 -0500

--
 .../org/apache/nifi/nar/NarClassLoader.java | 22 
 1 file changed, 22 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f60a97b0/nar-bundles/framework-bundle/framework/nar/src/main/java/org/apache/nifi/nar/NarClassLoader.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/nar/src/main/java/org/apache/nifi/nar/NarClassLoader.java
 
b/nar-bundles/framework-bundle/framework/nar/src/main/java/org/apache/nifi/nar/NarClassLoader.java
index 5b0ca89..b3b7e7f 100644
--- 
a/nar-bundles/framework-bundle/framework/nar/src/main/java/org/apache/nifi/nar/NarClassLoader.java
+++ 
b/nar-bundles/framework-bundle/framework/nar/src/main/java/org/apache/nifi/nar/NarClassLoader.java
@@ -199,6 +199,28 @@ public class NarClassLoader extends URLClassLoader {
 }
 
 @Override
+protected String findLibrary(final String libname) {
+File dependencies = new File(narWorkingDirectory, 
META-INF/dependencies);
+if (!dependencies.isDirectory()) {
+LOGGER.warn(narWorkingDirectory +  does not contain 
META-INF/dependencies!);
+}
+
+final File nativeDir = new File(dependencies, native);
+final File soFile = new File(nativeDir, libname + .so);
+if ( soFile.exists() ) {
+return soFile.getAbsolutePath();
+} else {
+final File dllFile = new File(nativeDir, libname + .dll);
+if ( dllFile.exists() ) {
+return dllFile.getAbsolutePath();
+}
+}
+
+// not found in the nar. try system native dir
+return null;
+}
+
+@Override
 public String toString() {
 return NarClassLoader.class.getName() + [ + 
narWorkingDirectory.getPath() + ];
 }



[16/25] incubator-nifi git commit: NIFI-12: Remove Processors even if their @OnRemoved methods throw Exceptions

2014-12-11 Thread markap14
NIFI-12: Remove Processors even if their @OnRemoved methods throw Exceptions


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/cb2e855f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/cb2e855f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/cb2e855f

Branch: refs/heads/bootstrap
Commit: cb2e855fc7c42536887b055baadf93683d764a47
Parents: f60a97b
Author: Mark Payne marka...@hotmail.com
Authored: Wed Dec 10 12:49:31 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Wed Dec 10 12:49:31 2014 -0500

--
 .../nifi/groups/StandardProcessGroup.java   |  4 ++--
 .../nifi/processors/standard/MergeContent.java  | 22 +---
 2 files changed, 17 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/cb2e855f/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
index 8aafb58..1064536 100644
--- 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
+++ 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
@@ -46,6 +46,7 @@ import org.apache.nifi.controller.label.Label;
 import org.apache.nifi.controller.service.ControllerServiceProvider;
 import org.apache.nifi.logging.LogRepositoryFactory;
 import org.apache.nifi.nar.NarCloseable;
+import org.apache.nifi.processor.SimpleProcessLogger;
 import org.apache.nifi.processor.StandardProcessContext;
 import org.apache.nifi.processor.annotation.OnRemoved;
 import org.apache.nifi.processor.annotation.OnShutdown;
@@ -53,7 +54,6 @@ import org.apache.nifi.remote.RemoteGroupPort;
 import org.apache.nifi.remote.RootGroupPort;
 import org.apache.nifi.util.NiFiProperties;
 import org.apache.nifi.util.ReflectionUtils;
-
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -664,7 +664,7 @@ public final class StandardProcessGroup implements 
ProcessGroup {
 
 try (final NarCloseable x = NarCloseable.withNarLoader()) {
 final StandardProcessContext processContext = new 
StandardProcessContext(processor, controllerServiceProvider, encryptor);
-ReflectionUtils.invokeMethodsWithAnnotation(OnRemoved.class, 
processor.getProcessor(), processContext);
+
ReflectionUtils.quietlyInvokeMethodsWithAnnotation(OnRemoved.class, 
processor.getProcessor(), processContext);
 } catch (final Exception e) {
 throw new ProcessorLifeCycleException(Failed to invoke 
'OnRemoved' methods of  + processor, e);
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/cb2e855f/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java
--
diff --git 
a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java
 
b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java
index d443e00..9a932f0 100644
--- 
a/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java
+++ 
b/nar-bundles/standard-bundle/standard-processors/src/main/java/org/apache/nifi/processors/standard/MergeContent.java
@@ -76,7 +76,6 @@ import org.apache.nifi.util.FlowFilePackagerV1;
 import org.apache.nifi.util.FlowFilePackagerV2;
 import org.apache.nifi.util.FlowFilePackagerV3;
 import org.apache.nifi.util.ObjectHolder;
-
 import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
 import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
 
@@ -317,6 +316,7 @@ public class MergeContent extends 
AbstractSessionFactoryProcessor {
 return Files.readAllBytes(Paths.get(filename));
 }
 
+
 @Override
 public void onTrigger(final ProcessContext context, final 
ProcessSessionFactory sessionFactory) throws ProcessException {
 int binsAdded = binFlowFiles(context, sessionFactory);
@@ -331,6 +331,7 @@ public class MergeContent extends 
AbstractSessionFactoryProcessor {
 context.yield();
 }
 }
+
 
 private int migrateBins(final ProcessContext context) {
 int added = 0;
@@ -548,20 

[08/25] incubator-nifi git commit: NIFI-151 Fixed test issue which resulted from needing to cleanup after previous runs

2014-12-11 Thread markap14
NIFI-151 Fixed test issue which resulted from needing to cleanup after previous 
runs


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/51d177b2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/51d177b2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/51d177b2

Branch: refs/heads/bootstrap
Commit: 51d177b2426e4940134069c28d8d7f70c473a353
Parents: c55e851
Author: joewitt joew...@apache.org
Authored: Wed Dec 10 07:09:18 2014 -0500
Committer: joewitt joew...@apache.org
Committed: Wed Dec 10 07:09:18 2014 -0500

--
 .../accesscontrol/DfmAccessControlTest.java | 26 +++-
 1 file changed, 25 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/51d177b2/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/DfmAccessControlTest.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/DfmAccessControlTest.java
 
b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/DfmAccessControlTest.java
index 2946177..03b26ca 100644
--- 
a/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/DfmAccessControlTest.java
+++ 
b/nar-bundles/framework-bundle/framework/web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/DfmAccessControlTest.java
@@ -21,6 +21,10 @@ import com.sun.jersey.multipart.BodyPart;
 import com.sun.jersey.multipart.FormDataBodyPart;
 import com.sun.jersey.multipart.FormDataMultiPart;
 import java.io.File;
+import java.nio.file.DirectoryStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -81,6 +85,7 @@ public class DfmAccessControlTest {
 private static final String CLIENT_ID = dfm-client-id;
 private static final String CONTEXT_PATH = /nifi-api;
 private static final String FLOW_XML_PATH = 
target/test-classes/access-control/flow-dfm.xml;
+private static final String FLOW_TEMPLATES_PATH = 
target/test-classes/access-control/templates;
 
 private static NiFiTestServer SERVER;
 private static NiFiTestUser DFM_USER;
@@ -88,6 +93,20 @@ public class DfmAccessControlTest {
 
 @BeforeClass
 public static void setup() throws Exception {
+// look for the flow.xml and toss it
+File flow = new File(FLOW_XML_PATH);
+if (flow.exists()) {
+flow.delete();
+}
+// look for templates and toss them
+final Path templatePath = Paths.get(FLOW_TEMPLATES_PATH);
+if (Files.exists(templatePath)) {
+final DirectoryStreamPath dirStream = 
Files.newDirectoryStream(Paths.get(FLOW_TEMPLATES_PATH), *.template);
+for (final Path path : dirStream) {
+Files.delete(path);
+}
+}
+
 // configure the location of the nifi properties
 File nifiPropertiesFile = new 
File(src/test/resources/access-control/nifi.properties);
 System.setProperty(NiFiProperties.PROPERTIES_FILE_PATH, 
nifiPropertiesFile.getAbsolutePath());
@@ -1377,10 +1396,15 @@ public class DfmAccessControlTest {
 SERVER.shutdownServer();
 SERVER = null;
 
-// look for the flow.xml
+// look for the flow.xml and toss it
 File flow = new File(FLOW_XML_PATH);
 if (flow.exists()) {
 flow.delete();
 }
+// look for templates and toss them
+final DirectoryStreamPath dirStream = 
Files.newDirectoryStream(Paths.get(FLOW_TEMPLATES_PATH), *.template);
+for (final Path path : dirStream) {
+Files.delete(path);
+}
 }
 }



[19/25] incubator-nifi git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop

2014-12-11 Thread markap14
Merge branch 'develop' of 
https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/d89ba739
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/d89ba739
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/d89ba739

Branch: refs/heads/bootstrap
Commit: d89ba7392f6aa8eb972cee07dc7ed755c983586f
Parents: 82e42fa fe2a331
Author: Mark Payne marka...@hotmail.com
Authored: Wed Dec 10 14:40:18 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Wed Dec 10 14:40:18 2014 -0500

--
 .../nf/canvas/nf-processor-property-combo-editor.js   | 14 --
 .../js/nf/canvas/nf-processor-property-nfel-editor.js |  9 ++---
 .../js/nf/canvas/nf-processor-property-table.js   |  6 +++---
 .../js/nf/canvas/nf-processor-property-text-editor.js |  9 ++---
 .../src/main/webapp/js/nf/nf-processor-details.js |  2 +-
 5 files changed, 16 insertions(+), 24 deletions(-)
--




[17/25] incubator-nifi git commit: NIFI-159: - Allowing optional properties to be reset. - Used null to represent an unset value as previously it was considered undefined. When undefined, the property

2014-12-11 Thread markap14
NIFI-159:
- Allowing optional properties to be reset.
- Used null to represent an unset value as previously it was considered 
undefined. When undefined, the property was not being included in the 
serialized configuration.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/fe2a3318
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/fe2a3318
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/fe2a3318

Branch: refs/heads/bootstrap
Commit: fe2a331820ea75e88891a5888365be6eb281c783
Parents: cb2e855
Author: Matt Gilman matt.c.gil...@gmail.com
Authored: Wed Dec 10 14:27:11 2014 -0500
Committer: Matt Gilman matt.c.gil...@gmail.com
Committed: Wed Dec 10 14:27:11 2014 -0500

--
 .../nf/canvas/nf-processor-property-combo-editor.js   | 14 --
 .../js/nf/canvas/nf-processor-property-nfel-editor.js |  9 ++---
 .../js/nf/canvas/nf-processor-property-table.js   |  6 +++---
 .../js/nf/canvas/nf-processor-property-text-editor.js |  9 ++---
 .../src/main/webapp/js/nf/nf-processor-details.js |  2 +-
 5 files changed, 16 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/fe2a3318/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-combo-editor.js
--
diff --git 
a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-combo-editor.js
 
b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-combo-editor.js
index ceaa529..a7c488c 100644
--- 
a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-combo-editor.js
+++ 
b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-combo-editor.js
@@ -51,13 +51,15 @@ nf.ProcessorPropertyComboEditor = function (args) {
 optionClass: 'unset'
 });
 }
-$.each(allowableValues, function (i, allowableValue) {
-options.push({
-text: allowableValue.displayName,
-value: allowableValue.value,
-description: nf.Common.escapeHtml(allowableValue.description)
+if ($.isArray(allowableValues)) {
+$.each(allowableValues, function (i, allowableValue) {
+options.push({
+text: allowableValue.displayName,
+value: allowableValue.value,
+description: 
nf.Common.escapeHtml(allowableValue.description)
+});
 });
-});
+}
 
 // ensure the options there is at least one option
 if (options.length === 0) {

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/fe2a3318/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-nfel-editor.js
--
diff --git 
a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-nfel-editor.js
 
b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-nfel-editor.js
index f19a001..0dc945a 100644
--- 
a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-nfel-editor.js
+++ 
b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-nfel-editor.js
@@ -160,18 +160,13 @@ nf.ProcessorPropertyNfelEditor = function (args) {
 // otherwise if the property is required
 if 
(nf.ProcessorPropertyTable.isRequiredProperty(propertyDescriptor)) {
 if (nf.Common.isBlank(propertyDescriptor.defaultValue)) {
-// reset to the previous value if available
-if (nf.Common.isDefinedAndNotNull(previousValue)) {
-return previousValue;
-} else {
-return undefined;
-}
+return previousValue;
 } else {
 return propertyDescriptor.defaultValue;
 }
 } else {
 // if the property is not required, clear the value
-return undefined;
+return null;
 }
 }
 } else {


[22/25] incubator-nifi git commit: NIFI-72: Added unit tests and fixed bug that caused CONTENT_MODIFIED to be emitted for newly created FlowFiles

2014-12-11 Thread markap14
NIFI-72: Added unit tests and fixed bug that caused CONTENT_MODIFIED to be 
emitted for newly created FlowFiles


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/cbea1f19
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/cbea1f19
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/cbea1f19

Branch: refs/heads/bootstrap
Commit: cbea1f193620f934d6186d167d0c0fe0723fad7c
Parents: 6b0a5e8
Author: Mark Payne marka...@hotmail.com
Authored: Thu Dec 11 09:16:48 2014 -0500
Committer: Mark Payne marka...@hotmail.com
Committed: Thu Dec 11 09:16:48 2014 -0500

--
 .../repository/StandardProcessSession.java  |  3 +-
 .../repository/TestStandardProcessSession.java  | 68 
 2 files changed, 70 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/cbea1f19/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java
 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java
index 4ba45aa..11172a8 100644
--- 
a/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java
+++ 
b/nar-bundles/framework-bundle/framework/core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java
@@ -579,7 +579,8 @@ public final class StandardProcessSession implements 
ProcessSession, ProvenanceE
 continue;
 }
 
-if ( contentChanged ) {
+final boolean newFlowFile = repoRecord.getOriginal() == null;
+if ( contentChanged  !newFlowFile ) {
 recordsToSubmit.add(provenanceReporter.build(curFlowFile, 
ProvenanceEventType.CONTENT_MODIFIED).build());
 addEventType(eventTypesPerFlowFileId, flowFileId, 
ProvenanceEventType.CONTENT_MODIFIED);
 eventAdded = true;

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/cbea1f19/nar-bundles/framework-bundle/framework/core/src/test/java/org/apache/nifi/controller/repository/TestStandardProcessSession.java
--
diff --git 
a/nar-bundles/framework-bundle/framework/core/src/test/java/org/apache/nifi/controller/repository/TestStandardProcessSession.java
 
b/nar-bundles/framework-bundle/framework/core/src/test/java/org/apache/nifi/controller/repository/TestStandardProcessSession.java
index 3dbbcf3..060bbd9 100644
--- 
a/nar-bundles/framework-bundle/framework/core/src/test/java/org/apache/nifi/controller/repository/TestStandardProcessSession.java
+++ 
b/nar-bundles/framework-bundle/framework/core/src/test/java/org/apache/nifi/controller/repository/TestStandardProcessSession.java
@@ -846,6 +846,74 @@ public class TestStandardProcessSession {
 assertEquals(ProvenanceEventType.CREATE, event.getEventType());
 }
 
+@Test
+public void testContentModifiedNotEmittedForCreate() throws IOException {
+FlowFile newFlowFile = session.create();
+newFlowFile = session.write(newFlowFile, new OutputStreamCallback() {
+@Override
+public void process(OutputStream out) throws IOException {
+}
+});
+session.transfer(newFlowFile, new 
Relationship.Builder().name(A).build());
+session.commit();
+
+final ListProvenanceEventRecord events = 
provenanceRepo.getEvents(0L, 1);
+assertFalse(events.isEmpty());
+assertEquals(1, events.size());
+
+final ProvenanceEventRecord event = events.get(0);
+assertEquals(ProvenanceEventType.CREATE, event.getEventType());
+}
+
+@Test
+public void testContentModifiedEmittedAndNotAttributesModified() throws 
IOException {
+final FlowFileRecord flowFile = new StandardFlowFileRecord.Builder()
+.id(1L)
+.addAttribute(uuid, ----)
+.build();
+this.flowFileQueue.put(flowFile);
+
+FlowFile existingFlowFile = session.get();
+existingFlowFile = session.write(existingFlowFile, new 
OutputStreamCallback() {
+@Override
+public void process(OutputStream out) throws IOException {
+}
+});
+existingFlowFile = session.putAttribute(existingFlowFile, attr, a);
+session.transfer(existingFlowFile, new 
Relationship.Builder().name(A).build());
+session.commit();
+

[jira] [Commented] (NIFI-161) StandardRemoteProcessGroup using deprecated methods now that the Jersey Client library has been updated

2014-12-11 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14242921#comment-14242921
 ] 

ASF subversion and git services commented on NIFI-161:
--

Commit 74c79404873b27cc1eea78d74ff05b5492988ec6 in incubator-nifi's branch 
refs/heads/bootstrap from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-nifi.git;h=74c7940 ]

NIFI-161: Removed references to deprecated methods


 StandardRemoteProcessGroup using deprecated methods now that the Jersey 
 Client library has been updated
 ---

 Key: NIFI-161
 URL: https://issues.apache.org/jira/browse/NIFI-161
 Project: Apache NiFi
  Issue Type: Bug
  Components: Core Framework
Affects Versions: 0.0.1
Reporter: Mark Payne
Assignee: Mark Payne
Priority: Minor
 Fix For: 0.0.1






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


[jira] [Updated] (NIFI-163) HDFS version in NIFI Apache

2014-12-11 Thread John Lozada (JIRA)

 [ 
https://issues.apache.org/jira/browse/NIFI-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John Lozada updated NIFI-163:
-
Issue Type: Task  (was: Bug)

 HDFS version in NIFI Apache
 ---

 Key: NIFI-163
 URL: https://issues.apache.org/jira/browse/NIFI-163
 Project: Apache NiFi
  Issue Type: Task
  Components: Configuration
Reporter: John Lozada
Priority: Minor

 what is the current version of hadoop HDFS supported in this nifi version? 
 2.5.x? What is the process of using 2.4.x version?



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


svn commit: r1644809 - /incubator/nifi/site/trunk/content/development/quickstart.md

2014-12-11 Thread joewitt
Author: joewitt
Date: Fri Dec 12 01:50:12 2014
New Revision: 1644809

URL: http://svn.apache.org/r1644809
Log:
CMS commit to nifi by joewitt

Modified:
incubator/nifi/site/trunk/content/development/quickstart.md

Modified: incubator/nifi/site/trunk/content/development/quickstart.md
URL: 
http://svn.apache.org/viewvc/incubator/nifi/site/trunk/content/development/quickstart.md?rev=1644809r1=1644808r2=1644809view=diff
==
--- incubator/nifi/site/trunk/content/development/quickstart.md (original)
+++ incubator/nifi/site/trunk/content/development/quickstart.md Fri Dec 12 
01:50:12 2014
@@ -46,7 +46,7 @@ to 8080 is a good start, but on systems
 `mvn assembly:assembly` will create a tar.gz file in the target directory in 
`assemblies/nifi`. This tar.gz should
 contain the full application. Decompressing the tar.gz should make a directory 
for you containing several other
 directories. `conf` contains application configuration, `logs` will contain 
log files, `bin` contains a fairly
-bare-bones script for launching the application, `nifi.sh`. On linux (and 
possibly macos) running `bin/nifi.sh start` 
+bare-bones script for launching the application, `nifi.sh`. On linux (and 
possibly OS X) running `bin/nifi.sh start` 
 should start the application in the foreground after trying to detect a Java 
installation.  There are scripts to help with
 startup on windows as well.  The entire concept of how the application will 
integrate to a given OS and run as an
 enduring service is something we're working hard on and would appreciate ideas 
for.  The user experience needs to