[jira] [Commented] (NIFI-906) Docs do not display well on mobile/smaller res devices

2016-06-29 Thread Matt Gilman (JIRA)

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

Matt Gilman commented on NIFI-906:
--

[~ijokarumawak] Thanks for jumping into this!

Your correct, the website is built using Foundation. The ‘NiFi Docs’ on the 
website are generated by NiFi during startup and has to be manually deployed to 
the website after a release. I think you’re on the right track that we just 
want to use some modern CSS to get the behavior we want. I don’t think we want 
to start bundling Foundation (or some other framework) in the NiFi assembly 
just to get responsive documentation. Some simple CSS should give us want we 
want.

> Docs do not display well on mobile/smaller res devices
> --
>
> Key: NIFI-906
> URL: https://issues.apache.org/jira/browse/NIFI-906
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Documentation & Website
> Environment: Mobile, Small res devices
>Reporter: Joseph Witt
>
> Tweet from @cyroxx
> @apachenifi Unfortunately, the docs (http://nifi.apache.org/docs.html ) are 
> not mobile-friendly, makes it hard to read about this interesting project
> https://twitter.com/cyroxx/status/637305973938483200



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


[jira] [Comment Edited] (NIFI-906) Docs do not display well on mobile/smaller res devices

2016-06-29 Thread Koji Kawamura (JIRA)

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

Koji Kawamura edited comment on NIFI-906 at 6/29/16 11:21 PM:
--

I took a look at the documentation page (https://nifi.apache.org/docs.html). It 
already uses foundation.js to provide responsive pages, however it doesn't work 
on the documentation page, other pages looks fine.

I think there're two issues:

# NiFi Documentation is embedded as iframe. The iframe hides top-bar menu and 
footer with narrower screen like mobile.
# The embedded NiFi Documentation is not responsive.

h3. Possible solution for #1

When I modified css as follows, the top-bar menu and footer was shown 
correctly. I couldn't find the css file in nifi project available on Github, 
though. I assume it's managed somewhere else.

{code}
/*
Iframe
*/
/* line 177, ../../../src/scss/app.scss */
div.external-guide {
  position: absolute; // Change this to relative.
  left: 0;
  bottom: 0;
  right: 0;
  top: 2.8125rem; // Remove this.
  z-index: 1; // Remove this.
  background-color: #fff;
}
{code}

h3. Possible solution for #2

Since current web pages are using, I think we can start with foundation.js to 
use in NiFi Documentation pages, or flexbox. Once we made the left component 
listing pane responsive, it should be easier to see with small displays. I'm 
going to test with flexbox first.


was (Author: ijokarumawak):
I took a look at the documentation page (https://nifi.apache.org/docs.html). It 
already uses foundation.js to provide responsive pages, however it doesn't work 
on the documentation page, other pages looks fine.

I think there're two issues:

# NiFi Documentation is embedded as iframe. The iframe hides top-bar menu and 
footer with narrower screen like mobile.
# The embedded NiFi Documentation is not responsive.

h3. Possible solution for #1

When I modified css as follows, the top-bar menu and footer was shown 
correctly. I couldn't find the css file in nifi project available on Github, 
though. I assume it's managed somewhere else.

{code}
/*
Iframe
*/
/* line 177, ../../../src/scss/app.scss */
div.external-guide {
  position: absolute; // Change this to relative.
  left: 0;
  bottom: 0;
  right: 0;
  top: 2.8125rem; // Remove this.
  z-index: 1; // Remove this.
  background-color: #fff;
}
{code}

h3. Possible solution for #2

Since current web pages are using, I think we can start with foundation.js to 
use in NiFi Documentation pages. Once we can make the left component listing 
pane responsive, it should be easier with small displays. Thoughts?

> Docs do not display well on mobile/smaller res devices
> --
>
> Key: NIFI-906
> URL: https://issues.apache.org/jira/browse/NIFI-906
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Documentation & Website
> Environment: Mobile, Small res devices
>Reporter: Joseph Witt
>
> Tweet from @cyroxx
> @apachenifi Unfortunately, the docs (http://nifi.apache.org/docs.html ) are 
> not mobile-friendly, makes it hard to read about this interesting project
> https://twitter.com/cyroxx/status/637305973938483200



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


[jira] [Commented] (NIFI-2115) Enhanced About Box Version Information

2016-06-29 Thread James Wing (JIRA)

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

James Wing commented on NIFI-2115:
--

[~rmoran], I agree that changes to the About dialog should be modest.  It may 
not be obvious from the screenshot in the PR, but initial impact to the About 
dialog in my code so far is just "..." following the version, which expands the 
detail info on click.

I had not considered the System Diagnostics dialog, but that may be a good 
idea.  We would have plenty of real estate on a new tab there.  The downside is 
that it is tucked away a bit, and the version in the about dialog will appear 
to be complete.  Maybe we could link from About to the System Diagnostics for 
detail?

Cluster versions are still not clear to me.  The version information appears to 
be particular to whichever API endpoint you happen to be talking to.  I think 
you are correct that we would need to enumerate the nodes and their respective 
versions.

> Enhanced About Box Version Information
> --
>
> Key: NIFI-2115
> URL: https://issues.apache.org/jira/browse/NIFI-2115
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Tools and Build
>Affects Versions: 1.0.0
>Reporter: James Wing
>Assignee: James Wing
>Priority: Minor
>
> The UI's About dialog and underlying API provide the version of NiFi, like 
> "0.7.0-SNAPSHOT".  For many bug reports and troubleshooting requests, this is 
> not very precise, especially around rapidly changing code or 
> platform-dependent behavior.  It would help if NiFi captured and displayed 
> additional information:  
> * NiFi build commit hash
> * NiFi build branch
> * NiFi build date/time
> * Java Version
> * Java Vendor (Oracle, OpenJDK)
> * OS
> Then a simple copy/paste from the about box would provide very specific 
> information about a particular NiFi installation and which code it was 
> derived from.



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


[jira] [Resolved] (NIFI-1502) FetchEventViewer - NiFi should be able to consume Even Viewer (Windows Logs)

2016-06-29 Thread Joseph Percivall (JIRA)

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

Joseph Percivall resolved NIFI-1502.

Resolution: Fixed

> FetchEventViewer - NiFi should be able to consume Even Viewer (Windows Logs)
> 
>
> Key: NIFI-1502
> URL: https://issues.apache.org/jira/browse/NIFI-1502
> Project: Apache NiFi
>  Issue Type: Bug
>Reporter: Andre
>
> While a lot of the use cases using NiFi orbit the IoT, Unix Cloud type 
> workloads, I suspect NiFi would be a great fit for data collections of 
> business critical platforms running Windows.
> A good example of this type of workload would be ATMs running Windows 7 and 
> even run Windows XP, or collection of Event Log error events on Windows 
> platforms (including Azure).



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


[jira] [Commented] (NIFI-2081) Modify scrollable content

2016-06-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-2081:
--

GitHub user scottyaslan opened a pull request:

https://github.com/apache/nifi/pull/594

[NIFI-2081] Responsive dialog content, tab content, and scrollable st…

…yles

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

$ git pull https://github.com/scottyaslan/nifi responsiveDevBranch

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

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


commit a227ee1e5639a7be7f57e0182c2d0c3d160c1511
Author: Scott Aslan 
Date:   2016-06-29T20:32:11Z

[NIFI-2081] Responsive dialog content, tab content, and scrollable styles




> Modify scrollable content
> -
>
> Key: NIFI-2081
> URL: https://issues.apache.org/jira/browse/NIFI-2081
> Project: Apache NiFi
>  Issue Type: Sub-task
>  Components: Core UI
>Reporter: Rob Moran
> Attachments: scrolling-content-with-tabs_nifi-2081.png, 
> scrolling-content_nifi-2081.png
>
>
> See attached samples.
> Specifically thinking about dialogs – both with and without the presence of 
> tabs.



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


[jira] [Resolved] (NIFI-1976) JNA-Based Event Log Subscription Processor

2016-06-29 Thread Joseph Percivall (JIRA)

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

Joseph Percivall resolved NIFI-1976.

Resolution: Fixed

> JNA-Based Event Log Subscription Processor
> --
>
> Key: NIFI-1976
> URL: https://issues.apache.org/jira/browse/NIFI-1976
> Project: Apache NiFi
>  Issue Type: Sub-task
>Reporter: Bryan Rosander
>
> Using JNA, we should be able to leverage existing Windows APIs to natively 
> consume events as they happen.  Will look into subscribing to events 
> (https://msdn.microsoft.com/en-us/library/windows/desktop/aa385771(v=vs.85).aspx)
>  in order to reduce latency.



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


[jira] [Commented] (NIFI-1976) JNA-Based Event Log Subscription Processor

2016-06-29 Thread ASF subversion and git services (JIRA)

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

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

Commit 65d895827b3ca979c41daa781f1cd0d04e24c65a in nifi's branch 
refs/heads/master from [~bryanrosan...@gmail.com]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=65d8958 ]

NIFI-1976 - Windows Event Log native processor

This closes #525

Signed-off-by: jpercivall 


> JNA-Based Event Log Subscription Processor
> --
>
> Key: NIFI-1976
> URL: https://issues.apache.org/jira/browse/NIFI-1976
> Project: Apache NiFi
>  Issue Type: Sub-task
>Reporter: Bryan Rosander
>
> Using JNA, we should be able to leverage existing Windows APIs to natively 
> consume events as they happen.  Will look into subscribing to events 
> (https://msdn.microsoft.com/en-us/library/windows/desktop/aa385771(v=vs.85).aspx)
>  in order to reduce latency.



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


[jira] [Commented] (NIFI-1976) JNA-Based Event Log Subscription Processor

2016-06-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-1976:
--

Github user asfgit closed the pull request at:

https://github.com/apache/nifi/pull/525


> JNA-Based Event Log Subscription Processor
> --
>
> Key: NIFI-1976
> URL: https://issues.apache.org/jira/browse/NIFI-1976
> Project: Apache NiFi
>  Issue Type: Sub-task
>Reporter: Bryan Rosander
>
> Using JNA, we should be able to leverage existing Windows APIs to natively 
> consume events as they happen.  Will look into subscribing to events 
> (https://msdn.microsoft.com/en-us/library/windows/desktop/aa385771(v=vs.85).aspx)
>  in order to reduce latency.



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


[1/2] nifi git commit: NIFI-1976 - Windows Event Log native processor

2016-06-29 Thread jpercivall
Repository: nifi
Updated Branches:
  refs/heads/master d6391652e -> 65d895827


http://git-wip-us.apache.org/repos/asf/nifi/blob/65d89582/nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-processors/src/test/java/org/apache/nifi/processors/windows/event/log/jna/ErrorLookupTest.java
--
diff --git 
a/nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-processors/src/test/java/org/apache/nifi/processors/windows/event/log/jna/ErrorLookupTest.java
 
b/nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-processors/src/test/java/org/apache/nifi/processors/windows/event/log/jna/ErrorLookupTest.java
new file mode 100644
index 000..ef4a91f
--- /dev/null
+++ 
b/nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-processors/src/test/java/org/apache/nifi/processors/windows/event/log/jna/ErrorLookupTest.java
@@ -0,0 +1,54 @@
+/*
+ * 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.processors.windows.event.log.jna;
+
+import com.sun.jna.platform.win32.Kernel32;
+import com.sun.jna.platform.win32.WinError;
+import org.apache.nifi.processors.windows.event.log.JNAJUnitRunner;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.when;
+
+@RunWith(JNAJUnitRunner.class)
+public class ErrorLookupTest {
+@Mock
+Kernel32 kernel32;
+
+private ErrorLookup errorLookup;
+
+@Before
+public void setup() {
+errorLookup = new ErrorLookup(kernel32);
+}
+
+@Test
+public void testErrorLookupExists() {
+
when(kernel32.GetLastError()).thenReturn(WinError.ERROR_INSUFFICIENT_BUFFER);
+assertEquals("ERROR_INSUFFICIENT_BUFFER(" + 
WinError.ERROR_INSUFFICIENT_BUFFER + ")", errorLookup.getLastError());
+}
+
+@Test
+public void testErrorLookupDoesntExist() {
+when(kernel32.GetLastError()).thenReturn(Integer.MAX_VALUE);
+assertEquals(Integer.toString(Integer.MAX_VALUE), 
errorLookup.getLastError());
+}
+}

http://git-wip-us.apache.org/repos/asf/nifi/blob/65d89582/nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-processors/src/test/java/org/apache/nifi/processors/windows/event/log/jna/EventSubscribeXmlRenderingCallbackTest.java
--
diff --git 
a/nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-processors/src/test/java/org/apache/nifi/processors/windows/event/log/jna/EventSubscribeXmlRenderingCallbackTest.java
 
b/nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-processors/src/test/java/org/apache/nifi/processors/windows/event/log/jna/EventSubscribeXmlRenderingCallbackTest.java
new file mode 100644
index 000..3ec7331
--- /dev/null
+++ 
b/nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-processors/src/test/java/org/apache/nifi/processors/windows/event/log/jna/EventSubscribeXmlRenderingCallbackTest.java
@@ -0,0 +1,135 @@
+/*
+ * 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.processors.windows.event.log.jna;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.platform.win32.Kernel32;
+import com.sun.jna.platform.win32.WinNT;
+import org.apache.nifi.logging.ComponentLog;
+import org.apache.

[2/2] nifi git commit: NIFI-1976 - Windows Event Log native processor

2016-06-29 Thread jpercivall
NIFI-1976 - Windows Event Log native processor

This closes #525

Signed-off-by: jpercivall 


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

Branch: refs/heads/master
Commit: 65d895827b3ca979c41daa781f1cd0d04e24c65a
Parents: d639165
Author: Bryan Rosander 
Authored: Tue Jun 7 08:57:24 2016 -0400
Committer: jpercivall 
Committed: Wed Jun 29 17:48:39 2016 -0400

--
 nifi-assembly/NOTICE|   5 +
 nifi-assembly/pom.xml   |   5 +
 .../nifi-windows-event-log-nar/pom.xml  |  40 +++
 .../src/main/resources/META-INF/LICENSE | 202 
 .../src/main/resources/META-INF/NOTICE  |  23 ++
 .../nifi-windows-event-log-processors/pom.xml   |  66 
 .../event/log/AlreadySubscribedException.java   |  24 ++
 .../event/log/ConsumeWindowsEventLog.java   | 318 +++
 .../windows/event/log/jna/ErrorLookup.java  |  51 +++
 .../jna/EventSubscribeXmlRenderingCallback.java | 108 +++
 .../windows/event/log/jna/WEvtApi.java  |  70 
 .../org.apache.nifi.processor.Processor |  15 +
 .../additionalDetails.html  |  74 +
 .../log/ConsumeWindowsEventLogFailTest.java |  39 +++
 .../event/log/ConsumeWindowsEventLogTest.java   | 268 
 .../windows/event/log/JNAFailJUnitRunner.java   |  42 +++
 .../windows/event/log/JNAJUnitRunner.java   |  51 +++
 .../event/log/JNAOverridingJUnitRunner.java |  99 ++
 .../windows/event/log/jna/ErrorLookupTest.java  |  54 
 .../EventSubscribeXmlRenderingCallbackTest.java | 135 
 .../nifi-windows-event-log-bundle/pom.xml   |  44 +++
 nifi-nar-bundles/pom.xml|   1 +
 pom.xml |   6 +
 23 files changed, 1740 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/65d89582/nifi-assembly/NOTICE
--
diff --git a/nifi-assembly/NOTICE b/nifi-assembly/NOTICE
index 8320bab..0c2a4a5 100644
--- a/nifi-assembly/NOTICE
+++ b/nifi-assembly/NOTICE
@@ -771,6 +771,11 @@ The following binary components are provided under the 
Apache Software License v
 
 Licensed under the Apache License, Version 2.0
 
+(ASLv2) Java Native Access
+  The following NOTICE information applies:
+ Java Native Access
+ Copyright 2015 Java Native Access
+
 (ASLv2) HTrace Core
   The following NOTICE information applies:
 In addition, this product includes software dependencies. See

http://git-wip-us.apache.org/repos/asf/nifi/blob/65d89582/nifi-assembly/pom.xml
--
diff --git a/nifi-assembly/pom.xml b/nifi-assembly/pom.xml
index 6a75018..b7ef7d7 100644
--- a/nifi-assembly/pom.xml
+++ b/nifi-assembly/pom.xml
@@ -347,6 +347,11 @@ language governing permissions and limitations under the 
License. -->
 nifi-slack-nar
 nar
 
+
+org.apache.nifi
+nifi-windows-event-log-nar
+nar
+
 
 
 

http://git-wip-us.apache.org/repos/asf/nifi/blob/65d89582/nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-nar/pom.xml
--
diff --git 
a/nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-nar/pom.xml
 
b/nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-nar/pom.xml
new file mode 100644
index 000..60ed53d
--- /dev/null
+++ 
b/nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-nar/pom.xml
@@ -0,0 +1,40 @@
+
+
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+4.0.0
+
+nifi-windows-event-log-bundle
+org.apache.nifi
+1.0.0-SNAPSHOT
+
+
+org.apache.nifi
+nifi-windows-event-log-nar
+nar
+
+true
+true
+
+
+
+
+org.apache.nifi
+nifi-standard-services-api-nar
+nar
+
+
+org.apache.nifi
+nifi-windows-event-log-processors
+
+
+
+

http://git-wip-us.apache.org/repos/asf/nifi/blob/65d89582/nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-nar/src/main/resources/META-INF/LICENSE
--
diff --git 
a/nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-nar/s

[jira] [Commented] (NIFI-2115) Enhanced About Box Version Information

2016-06-29 Thread James Wing (JIRA)

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

James Wing commented on NIFI-2115:
--

[~mosermw], I agree, I will try to figure out a more graceful and invisible 
scheme for when build number and branch are not available.

> Enhanced About Box Version Information
> --
>
> Key: NIFI-2115
> URL: https://issues.apache.org/jira/browse/NIFI-2115
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Tools and Build
>Affects Versions: 1.0.0
>Reporter: James Wing
>Assignee: James Wing
>Priority: Minor
>
> The UI's About dialog and underlying API provide the version of NiFi, like 
> "0.7.0-SNAPSHOT".  For many bug reports and troubleshooting requests, this is 
> not very precise, especially around rapidly changing code or 
> platform-dependent behavior.  It would help if NiFi captured and displayed 
> additional information:  
> * NiFi build commit hash
> * NiFi build branch
> * NiFi build date/time
> * Java Version
> * Java Vendor (Oracle, OpenJDK)
> * OS
> Then a simple copy/paste from the about box would provide very specific 
> information about a particular NiFi installation and which code it was 
> derived from.



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


[jira] [Commented] (NIFI-1976) JNA-Based Event Log Subscription Processor

2016-06-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-1976:
--

Github user JPercivall commented on the issue:

https://github.com/apache/nifi/pull/525
  
+1

Did a contrib check build, reviewed the code and any comments were 
addressed. To test I ran three ConsumeWindowsEventLog processors following 
multiple Windows channels and did a query to limit one of them. I verified the 
results by looking at the built in Event Viewer program. Thanks @brosander for 
the contribution! I will rebase and merge it into master.


> JNA-Based Event Log Subscription Processor
> --
>
> Key: NIFI-1976
> URL: https://issues.apache.org/jira/browse/NIFI-1976
> Project: Apache NiFi
>  Issue Type: Sub-task
>Reporter: Bryan Rosander
>
> Using JNA, we should be able to leverage existing Windows APIs to natively 
> consume events as they happen.  Will look into subscribing to events 
> (https://msdn.microsoft.com/en-us/library/windows/desktop/aa385771(v=vs.85).aspx)
>  in order to reduce latency.



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


[jira] [Assigned] (NIFI-1966) Address Issue of Nodes Disagreeing About Flow Contents on Startup

2016-06-29 Thread Mark Payne (JIRA)

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

Mark Payne reassigned NIFI-1966:


Assignee: Mark Payne

> Address Issue of Nodes Disagreeing About Flow Contents on Startup
> -
>
> Key: NIFI-1966
> URL: https://issues.apache.org/jira/browse/NIFI-1966
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Reporter: Matt Gilman
>Assignee: Mark Payne
>Priority: Blocker
> Fix For: 1.0.0
>
>
> During startup a coordinator is selected at random to act as the manager of 
> data flow and distributing it to other nodes. This works fine unless that 
> selected coordinator happens to have a uninheritable data flow. When this 
> occurs, the other nodes either are
> - Able to connect to Coordinator and then unable to join due to an 
> uninheritable flow exception due to being presented with a bad data flow. In 
> this case, the node shut down.
> - Unable to connect to the Coordinator due to lack of quorem and never 
> present with the bad data flow. In this case, the node ran its local flow.



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


[jira] [Created] (NIFI-2151) Property edit dialog when resized very small results in OK button covering resize widget

2016-06-29 Thread Jeff Storck (JIRA)
Jeff Storck created NIFI-2151:
-

 Summary: Property edit dialog when resized very small results in 
OK button covering resize widget
 Key: NIFI-2151
 URL: https://issues.apache.org/jira/browse/NIFI-2151
 Project: Apache NiFi
  Issue Type: Sub-task
  Components: Core UI
Affects Versions: 1.0.0
Reporter: Jeff Storck
Priority: Minor


In the property editing dialog, if it is resized very small, the layout of the 
OK and cancel buttons get misaligned, and the OK button ends up covering the 
resize widget.  If there's no text in the box, a very small part of the widget 
is still clickable and usable.  Once there's text in the box, the user is 
unable to click on the resize widget. 



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


[jira] [Updated] (NIFI-1966) Address Issue of Nodes Disagreeing About Flow Contents on Startup

2016-06-29 Thread Mark Payne (JIRA)

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

Mark Payne updated NIFI-1966:
-
Summary: Address Issue of Nodes Disagreeing About Flow Contents on Startup  
(was: Cluster - Coordinator Determination Issues)

> Address Issue of Nodes Disagreeing About Flow Contents on Startup
> -
>
> Key: NIFI-1966
> URL: https://issues.apache.org/jira/browse/NIFI-1966
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Reporter: Matt Gilman
>Priority: Blocker
> Fix For: 1.0.0
>
>
> During startup a coordinator is selected at random to act as the manager of 
> data flow and distributing it to other nodes. This works fine unless that 
> selected coordinator happens to have a uninheritable data flow. When this 
> occurs, the other nodes either are
> - Able to connect to Coordinator and then unable to join due to an 
> uninheritable flow exception due to being presented with a bad data flow. In 
> this case, the node shut down.
> - Unable to connect to the Coordinator due to lack of quorem and never 
> present with the bad data flow. In this case, the node ran its local flow.



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


[jira] [Commented] (NIFI-1976) JNA-Based Event Log Subscription Processor

2016-06-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-1976:
--

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

https://github.com/apache/nifi/pull/525#discussion_r69012840
  
--- Diff: 
nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-processors/src/main/java/org/apache/nifi/processors/windows/event/log/ConsumeWindowsEventLog.java
 ---
@@ -0,0 +1,282 @@
+/*
+ * 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.processors.windows.event.log;
+
+import com.sun.jna.platform.win32.Kernel32;
+import com.sun.jna.platform.win32.Kernel32Util;
+import com.sun.jna.platform.win32.WinNT;
+import org.apache.commons.io.Charsets;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.TriggerSerially;
+import org.apache.nifi.annotation.behavior.WritesAttribute;
+import org.apache.nifi.annotation.behavior.WritesAttributes;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.annotation.lifecycle.OnStopped;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.components.ValidationContext;
+import org.apache.nifi.components.ValidationResult;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.AbstractSessionFactoryProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessSessionFactory;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.processors.windows.event.log.jna.ErrorLookup;
+import 
org.apache.nifi.processors.windows.event.log.jna.EventSubscribeXmlRenderingCallback;
+import org.apache.nifi.processors.windows.event.log.jna.WEvtApi;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+
+
+@InputRequirement(InputRequirement.Requirement.INPUT_FORBIDDEN)
+@Tags({"ingest", "event", "windows"})
+@TriggerSerially
+@CapabilityDescription("Registers a Windows Event Log Subscribe Callback 
to receive FlowFiles from Events on Windows.  These can be filtered via channel 
and XPath.")
+@WritesAttributes({
+@WritesAttribute(attribute = "mime.type", description = "Will set 
a MIME type value of application/xml.")
+})
+public class ConsumeWindowsEventLog extends 
AbstractSessionFactoryProcessor {
+public static final String DEFAULT_CHANNEL = "System";
+public static final String DEFAULT_XPATH = "*";
+public static final int DEFAULT_MAX_BUFFER = 1024 * 1024;
+public static final int DEFAULT_MAX_QUEUE_SIZE = 1024;
+
+public static final PropertyDescriptor CHANNEL = new 
PropertyDescriptor.Builder()
+.name("channel")
+.displayName("Channel")
+.required(true)
+.defaultValue(DEFAULT_CHANNEL)
+.description("The Windows Event Log Channel to listen to.")
+.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+.build();
+
+public static final PropertyDescriptor QUERY = new 
PropertyDescriptor.Builder()
+.name("query")
+.displayName("XPath Query")
+.required(tru

[jira] [Commented] (NIFI-2150) Templates contain a great deal of unused information

2016-06-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-2150:
--

GitHub user markap14 opened a pull request:

https://github.com/apache/nifi/pull/593

NIFI-2150: Cleanse more values from templates that are not necessary.…

… Additionally, updated javadocs in ProcessorConfigDTO to provide further 
explanation of the getAutoTerminatedRelationships() method, since this was 
confusing

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

$ git pull https://github.com/markap14/nifi NIFI-2150

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

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






> Templates contain a great deal of unused information
> 
>
> Key: NIFI-2150
> URL: https://issues.apache.org/jira/browse/NIFI-2150
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core Framework
>Reporter: Mark Payne
>Assignee: Mark Payne
> Fix For: 1.0.0
>
>
> Templates currently contain a great deal of unused information, such as the 
> description of each property, the allowable values, the default values, etc. 
> These values are ignored when the template is instantiated, because the 
> Processor class itself drives these values. As a result, these should be 
> cleansed from templates.



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


[jira] [Resolved] (NIFI-1952) Create REST endpoints for user/group/policy management

2016-06-29 Thread Jeff Storck (JIRA)

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

Jeff Storck resolved NIFI-1952.
---
Resolution: Fixed

Closing issue, PRs 582 and 589 have been merged to master.

> Create REST endpoints for user/group/policy management
> --
>
> Key: NIFI-1952
> URL: https://issues.apache.org/jira/browse/NIFI-1952
> Project: Apache NiFi
>  Issue Type: Sub-task
>  Components: Core Framework
>Affects Versions: 1.0.0
>Reporter: Jeff Storck
>Assignee: Jeff Storck
> Fix For: 1.0.0
>
>
> REST endpoints are needed to provide CRUD capability for mutable authorizers 
> (extensions of AbstractPolicyBasedAuthorizer) to manage users, groups, and 
> policies.



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


[jira] [Created] (NIFI-2150) Templates contain a great deal of unused information

2016-06-29 Thread Mark Payne (JIRA)
Mark Payne created NIFI-2150:


 Summary: Templates contain a great deal of unused information
 Key: NIFI-2150
 URL: https://issues.apache.org/jira/browse/NIFI-2150
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Core Framework
Reporter: Mark Payne
Assignee: Mark Payne
 Fix For: 1.0.0


Templates currently contain a great deal of unused information, such as the 
description of each property, the allowable values, the default values, etc. 
These values are ignored when the template is instantiated, because the 
Processor class itself drives these values. As a result, these should be 
cleansed from templates.



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


[jira] [Created] (NIFI-2149) When saving flow, NiFi should allow the flow to automatically be backed up

2016-06-29 Thread Mark Payne (JIRA)
Mark Payne created NIFI-2149:


 Summary: When saving flow, NiFi should allow the flow to 
automatically be backed up
 Key: NIFI-2149
 URL: https://issues.apache.org/jira/browse/NIFI-2149
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Configuration, Core Framework, Documentation & Website
Reporter: Mark Payne
 Fix For: 1.0.0


Each time that a user updates the NiFi flow, the new flow is written to the 
flow.xml.gz on each node. When this occurs, we should provide the option of 
also writing the flow.xml.gz to an 'archive' folder, using a filename based on 
the current time. We should also ensure that we keep old flows for X 
(configurable) amount of time and only use a max of some configurable amount of 
disk space.

StandardXMLFlowConfigurationDAO (in nifi-framework-core) already has a method 
for `save(FlowController controller, boolean archive)` but 'false' is always 
passed as the 'archive' field. We should instead pass in `true` if configured 
to archive.

Additionally, we should change the archive filename so that it is based on a 
user-readable date/time, such as flow-2016-06-29-11-10-50am.xml.gz, for 
instance, for a flow that was saved at 11:10:50 AM on June 29, 2016. This 
allows an admin to easily revert a flow back to how it was at some point in 
history.

Changes required to implement this include: 

1. Update nifi.properties to include new properties (with the suggested 
defaults that may need to be adjusted):
- nifi.flow.configuration.archive.enabled=true
- nifi.flow.configuration.archive.max.time=30 days
- nifi.flow.configuration.archive.max.storage=500 MB

There already is a property named `nifi.flow.configuration.archive.dir` that 
should be used to specify where to save the archived flow. This is used 
currently only when the user clicks the 'archive' button in the UI.

2. Update StandardFlowService.saveFlowChanges(TimeUnit delayUnit, long delay) 
so that it passes a value of `true` for the 'archive' flag when calling the 
overridden saveFlowChanges method in the case that the 
`nifi.flow.configuration.archive.enabled` property is set to true (default).

3. Update StandardXMLFlowConfigurationDAO.createArchiveFile() to use a more 
user-friendly filename, as described above.

4. Update StandardXMLFlowConfigurationDAO.save() so that the `if (archive) {` 
branch first cleans up old/expired flows so that the `archive` directory is 
smaller than the configured max storage space and so that any archived flow 
that is older than the configured `nifi.flow.configuration.archive.max.time` 
property is removed.

5. Update Admin Guide to explain the new properties




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


[jira] [Created] (NIFI-2148) Time zone not correct on canvas

2016-06-29 Thread Jeff Storck (JIRA)
Jeff Storck created NIFI-2148:
-

 Summary: Time zone not correct on canvas
 Key: NIFI-2148
 URL: https://issues.apache.org/jira/browse/NIFI-2148
 Project: Apache NiFi
  Issue Type: Bug
  Components: Core Framework
Affects Versions: 1.0.0
Reporter: Jeff Storck
Priority: Minor


When running in a cluster, the time zone shown on the canvas for the time of 
the last refresh is incorrect, resulting in the time being off by an hour.  
Currently, it's showing EST for me, when times shown in other parts of the UI 
(such as the cluster dialog) shows EDT.



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


[jira] [Commented] (NIFI-2123) Authorize Individual Provenance Events

2016-06-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-2123:
--

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

https://github.com/apache/nifi/pull/592#discussion_r69003620
  
--- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/controller/ControllerFacade.java
 ---
@@ -1145,54 +1141,8 @@ public DownloadableContent getContent(final Long 
eventId, final String uri, fina
 // calculate the dn chain
 final List dnChain = 
ProxiedEntitiesUtils.buildProxiedEntitiesChain(user);
 dnChain.forEach(identity -> {
-final String rootGroupId = flowController.getRootGroupId();
-final ProcessGroup rootGroup = 
flowController.getGroup(rootGroupId);
-
-final Resource eventResource;
-if (rootGroupId.equals(event.getComponentId())) {
-eventResource = 
ResourceFactory.getComponentProvenanceResource(ResourceType.ProcessGroup, 
rootGroup.getIdentifier(), rootGroup.getName());
-} else {
-final Connectable connectable = 
rootGroup.findConnectable(event.getComponentId());
-
-if (connectable == null) {
-throw new AccessDeniedException("The component 
that generated this event is no longer part of the data flow. Unable to 
determine access policy.");
-}
-
-switch (connectable.getConnectableType()) {
-case PROCESSOR:
-eventResource = 
ResourceFactory.getComponentProvenanceResource(ResourceType.Processor, 
connectable.getIdentifier(), connectable.getName());
-break;
-case INPUT_PORT:
-case REMOTE_INPUT_PORT:
-eventResource = 
ResourceFactory.getComponentProvenanceResource(ResourceType.InputPort, 
connectable.getIdentifier(), connectable.getName());
-break;
-case OUTPUT_PORT:
-case REMOTE_OUTPUT_PORT:
-eventResource = 
ResourceFactory.getComponentProvenanceResource(ResourceType.OutputPort, 
connectable.getIdentifier(), connectable.getName());
-break;
-case FUNNEL:
-eventResource = 
ResourceFactory.getComponentProvenanceResource(ResourceType.Funnel, 
connectable.getIdentifier(), connectable.getName());
-break;
-default:
-throw new 
WebApplicationException(Response.serverError().entity("An unexpected type of 
component generated this event.").build());
-}
-}
-
-// build the request
-final AuthorizationRequest request = new 
AuthorizationRequest.Builder()
-.identity(identity)
-.anonymous(user.isAnonymous()) // allow current 
user to drive anonymous flag as anonymous users are never chained... supports 
single user case
-.accessAttempt(false)
-.action(RequestAction.READ)
-.resource(eventResource)
-.eventAttributes(attributes)
-.build();
-
-// perform the authorization
-final AuthorizationResult result = 
authorizer.authorize(request);
-if (!Result.Approved.equals(result.getResult())) {
-throw new 
AccessDeniedException(result.getExplanation());
-}
+final Authorizable eventAuthorizable = 
flowController.createProvenanceAuthorizable(event.getComponentId());
+eventAuthorizable.authorize(authorizer, 
RequestAction.READ, user);
--- End diff --

This needs to authorize each link in the chain, not just the current user.


> Authorize Individual Provenance Events
> --
>
> Key: NIFI-2123
> URL: https://issues.apache.org/jira/browse/NIFI-2123
> Project: Apache NiFi
>  Issue Type: Task
>  Components: Core Framework
>Reporter: Mark Payne
>Assignee: Mark Payne
>Priority: Blocker
> Fix For: 1.0.0
>
>
> As part of the new authorization paradigm, we need to authorize each 
> provenance event individually. We do this by findin

[jira] [Commented] (NIFI-2123) Authorize Individual Provenance Events

2016-06-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-2123:
--

Github user mcgilman commented on the issue:

https://github.com/apache/nifi/pull/592
  
Reviewing...


> Authorize Individual Provenance Events
> --
>
> Key: NIFI-2123
> URL: https://issues.apache.org/jira/browse/NIFI-2123
> Project: Apache NiFi
>  Issue Type: Task
>  Components: Core Framework
>Reporter: Mark Payne
>Assignee: Mark Payne
>Priority: Blocker
> Fix For: 1.0.0
>
>
> As part of the new authorization paradigm, we need to authorize each 
> provenance event individually. We do this by finding the component that the 
> event belongs to and then authorizing using that component's authorizations. 
> If the component no longer exists, no user will have authorization to the 
> event.



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


[jira] [Commented] (NIFI-2115) Enhanced About Box Version Information

2016-06-29 Thread Michael Moser (JIRA)

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

Michael Moser commented on NIFI-2115:
-

It would be awesome if one could copy this information so that it can be pasted 
into an email.  It's more efficient than having to send a screen shot.

> Enhanced About Box Version Information
> --
>
> Key: NIFI-2115
> URL: https://issues.apache.org/jira/browse/NIFI-2115
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Tools and Build
>Affects Versions: 1.0.0
>Reporter: James Wing
>Assignee: James Wing
>Priority: Minor
>
> The UI's About dialog and underlying API provide the version of NiFi, like 
> "0.7.0-SNAPSHOT".  For many bug reports and troubleshooting requests, this is 
> not very precise, especially around rapidly changing code or 
> platform-dependent behavior.  It would help if NiFi captured and displayed 
> additional information:  
> * NiFi build commit hash
> * NiFi build branch
> * NiFi build date/time
> * Java Version
> * Java Vendor (Oracle, OpenJDK)
> * OS
> Then a simple copy/paste from the about box would provide very specific 
> information about a particular NiFi installation and which code it was 
> derived from.



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


[jira] [Updated] (NIFI-2147) NiFi Settings: Warning/Invalid roll-over text is cut-off

2016-06-29 Thread Andrew Lim (JIRA)

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

Andrew Lim updated NIFI-2147:
-
Attachment: NIFI-2147_ReportingTasks.png
NIFI-2147_ControllerServices.png

> NiFi Settings:  Warning/Invalid roll-over text is cut-off
> -
>
> Key: NIFI-2147
> URL: https://issues.apache.org/jira/browse/NIFI-2147
> Project: Apache NiFi
>  Issue Type: Sub-task
>  Components: Core UI
>Affects Versions: 1.0.0
> Environment: Mac OS X, Chrome
>Reporter: Andrew Lim
>Priority: Minor
>  Labels: UI
> Fix For: 1.0.0
>
> Attachments: NIFI-2147_ControllerServices.png, 
> NIFI-2147_ReportingTasks.png
>
>
> As shown in the attached screenshots, the user is not able to see the 
> complete text of why the controller service or reporting task is invalid.  
> Looks like the text is centered on the warning icon, but should be left 
> justified.



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


[jira] [Created] (NIFI-2147) NiFi Settings: Warning/Invalid roll-over text is cut-off

2016-06-29 Thread Andrew Lim (JIRA)
Andrew Lim created NIFI-2147:


 Summary: NiFi Settings:  Warning/Invalid roll-over text is cut-off
 Key: NIFI-2147
 URL: https://issues.apache.org/jira/browse/NIFI-2147
 Project: Apache NiFi
  Issue Type: Sub-task
  Components: Core UI
Affects Versions: 1.0.0
 Environment: Mac OS X, Chrome
Reporter: Andrew Lim
Priority: Minor
 Fix For: 1.0.0


As shown in the attached screenshots, the user is not able to see the complete 
text of why the controller service or reporting task is invalid.  Looks like 
the text is centered on the warning icon, but should be left justified.



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


[jira] [Commented] (NIFI-1976) JNA-Based Event Log Subscription Processor

2016-06-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-1976:
--

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

https://github.com/apache/nifi/pull/525#discussion_r68990802
  
--- Diff: 
nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-processors/src/main/java/org/apache/nifi/processors/windows/event/log/ConsumeWindowsEventLog.java
 ---
@@ -0,0 +1,282 @@
+/*
+ * 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.processors.windows.event.log;
+
+import com.sun.jna.platform.win32.Kernel32;
+import com.sun.jna.platform.win32.Kernel32Util;
+import com.sun.jna.platform.win32.WinNT;
+import org.apache.commons.io.Charsets;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.TriggerSerially;
+import org.apache.nifi.annotation.behavior.WritesAttribute;
+import org.apache.nifi.annotation.behavior.WritesAttributes;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.annotation.lifecycle.OnStopped;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.components.ValidationContext;
+import org.apache.nifi.components.ValidationResult;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.AbstractSessionFactoryProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessSessionFactory;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.processors.windows.event.log.jna.ErrorLookup;
+import 
org.apache.nifi.processors.windows.event.log.jna.EventSubscribeXmlRenderingCallback;
+import org.apache.nifi.processors.windows.event.log.jna.WEvtApi;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+
+
+@InputRequirement(InputRequirement.Requirement.INPUT_FORBIDDEN)
+@Tags({"ingest", "event", "windows"})
+@TriggerSerially
+@CapabilityDescription("Registers a Windows Event Log Subscribe Callback 
to receive FlowFiles from Events on Windows.  These can be filtered via channel 
and XPath.")
+@WritesAttributes({
+@WritesAttribute(attribute = "mime.type", description = "Will set 
a MIME type value of application/xml.")
+})
+public class ConsumeWindowsEventLog extends 
AbstractSessionFactoryProcessor {
+public static final String DEFAULT_CHANNEL = "System";
+public static final String DEFAULT_XPATH = "*";
+public static final int DEFAULT_MAX_BUFFER = 1024 * 1024;
+public static final int DEFAULT_MAX_QUEUE_SIZE = 1024;
+
+public static final PropertyDescriptor CHANNEL = new 
PropertyDescriptor.Builder()
+.name("channel")
+.displayName("Channel")
+.required(true)
+.defaultValue(DEFAULT_CHANNEL)
+.description("The Windows Event Log Channel to listen to.")
+.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+.build();
+
+public static final PropertyDescriptor QUERY = new 
PropertyDescriptor.Builder()
+.name("query")
+.displayName("XPath Query")
+.required(tru

[jira] [Updated] (NIFI-2144) "View Details" icon is incorrect (should be circle with "i" not just "i")

2016-06-29 Thread Andrew Lim (JIRA)

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

Andrew Lim updated NIFI-2144:
-
Attachment: NIFI-2144_ControllerServices.png

> "View Details" icon is incorrect (should be circle with "i" not just "i")
> -
>
> Key: NIFI-2144
> URL: https://issues.apache.org/jira/browse/NIFI-2144
> Project: Apache NiFi
>  Issue Type: Sub-task
>  Components: Core UI
>Affects Versions: 1.0.0
> Environment: Mac OS X, Chrome
>Reporter: Andrew Lim
>Priority: Minor
> Fix For: 1.0.0
>
> Attachments: NIFI-2144_Connections.png, 
> NIFI-2144_ControllerServices.png, NIFI-2144_Processors.png
>
>
> The icon for "View Details" should be fa-info-circle throughout the 
> application (per Rob).
> In the Summary window:  this icon is correct on the Processors tab, but not 
> on the Connections tab.
> In the NiFi Settings window:  icon is correct on the Reporting Tasks tab, but 
> not on the Controller Services tab.
> Screenshots attached.



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


[jira] [Updated] (NIFI-2144) "View Details" icon is incorrect (should be circle with "i" not just "i")

2016-06-29 Thread Andrew Lim (JIRA)

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

Andrew Lim updated NIFI-2144:
-
Description: 
The icon for "View Details" should be fa-info-circle throughout the application 
(per Rob).

In the Summary window:  this icon is correct on the Processors tab, but not on 
the Connections tab.

In the NiFi Settings window:  icon is correct on the Reporting Tasks tab, but 
not on the Controller Services tab.

Screenshots attached.

  was:
The icon for "View Details" should be fa-info-circle throughout the application 
(per Rob).

In the Summary window:  this icon is correct on the Processors tab, but not on 
the Connections tab.

Screenshots attached.


> "View Details" icon is incorrect (should be circle with "i" not just "i")
> -
>
> Key: NIFI-2144
> URL: https://issues.apache.org/jira/browse/NIFI-2144
> Project: Apache NiFi
>  Issue Type: Sub-task
>  Components: Core UI
>Affects Versions: 1.0.0
> Environment: Mac OS X, Chrome
>Reporter: Andrew Lim
>Priority: Minor
> Fix For: 1.0.0
>
> Attachments: NIFI-2144_Connections.png, 
> NIFI-2144_ControllerServices.png, NIFI-2144_Processors.png
>
>
> The icon for "View Details" should be fa-info-circle throughout the 
> application (per Rob).
> In the Summary window:  this icon is correct on the Processors tab, but not 
> on the Connections tab.
> In the NiFi Settings window:  icon is correct on the Reporting Tasks tab, but 
> not on the Controller Services tab.
> Screenshots attached.



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


[jira] [Updated] (NIFI-2144) "View Details" icon is incorrect (should be circle with "i" not just "i")

2016-06-29 Thread Andrew Lim (JIRA)

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

Andrew Lim updated NIFI-2144:
-
Summary: "View Details" icon is incorrect (should be circle with "i" not 
just "i")  (was: "View Details" icon is incorrect)

> "View Details" icon is incorrect (should be circle with "i" not just "i")
> -
>
> Key: NIFI-2144
> URL: https://issues.apache.org/jira/browse/NIFI-2144
> Project: Apache NiFi
>  Issue Type: Sub-task
>  Components: Core UI
>Affects Versions: 1.0.0
> Environment: Mac OS X, Chrome
>Reporter: Andrew Lim
>Priority: Minor
> Fix For: 1.0.0
>
> Attachments: NIFI-2144_Connections.png, NIFI-2144_Processors.png
>
>
> The icon for "View Details" should be fa-info-circle throughout the 
> application (per Rob).
> In the Summary window:  this icon is correct on the Processors tab, but not 
> on the Connections tab.
> Screenshots attached.



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


[jira] [Updated] (NIFI-2144) "View Details" icon is incorrect

2016-06-29 Thread Andrew Lim (JIRA)

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

Andrew Lim updated NIFI-2144:
-
Summary: "View Details" icon is incorrect  (was: Summary:  "View Details" 
icon is incorrect on Connections tab)

> "View Details" icon is incorrect
> 
>
> Key: NIFI-2144
> URL: https://issues.apache.org/jira/browse/NIFI-2144
> Project: Apache NiFi
>  Issue Type: Sub-task
>  Components: Core UI
>Affects Versions: 1.0.0
> Environment: Mac OS X, Chrome
>Reporter: Andrew Lim
>Priority: Minor
> Fix For: 1.0.0
>
> Attachments: NIFI-2144_Connections.png, NIFI-2144_Processors.png
>
>
> The icon for "View Details" should be fa-info-circle throughout the 
> application (per Rob).
> In the Summary window:  this icon is correct on the Processors tab, but not 
> on the Connections tab.
> Screenshots attached.



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


[jira] [Updated] (NIFI-2144) Summary: "View Details" icon is incorrect on Connections tab

2016-06-29 Thread Andrew Lim (JIRA)

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

Andrew Lim updated NIFI-2144:
-
Description: 
The icon for "View Details" should be fa-info-circle throughout the application 
(per Rob).

In the Summary window:  this icon is correct on the Processors tab, but not on 
the Connections tab.

Screenshots attached.

  was:
The icon for "View Details" should be fa-info-circle (per Rob).

In the Summary window:  this icon is correct on the Processors tab, but not on 
the Connections tab.

Screenshots attached.


> Summary:  "View Details" icon is incorrect on Connections tab
> -
>
> Key: NIFI-2144
> URL: https://issues.apache.org/jira/browse/NIFI-2144
> Project: Apache NiFi
>  Issue Type: Sub-task
>  Components: Core UI
>Affects Versions: 1.0.0
> Environment: Mac OS X, Chrome
>Reporter: Andrew Lim
>Priority: Minor
> Fix For: 1.0.0
>
> Attachments: NIFI-2144_Connections.png, NIFI-2144_Processors.png
>
>
> The icon for "View Details" should be fa-info-circle throughout the 
> application (per Rob).
> In the Summary window:  this icon is correct on the Processors tab, but not 
> on the Connections tab.
> Screenshots attached.



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


[jira] [Updated] (NIFI-2144) Summary: "View Details" icon is incorrect on Connections tab

2016-06-29 Thread Andrew Lim (JIRA)

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

Andrew Lim updated NIFI-2144:
-
Description: 
The icon for "View Details" should be fa-info-circle (per Rob).

In the Summary window:  this icon is correct on the Processors tab, but not on 
the Connections tab.

Screenshots attached.

  was:
In the NiFI Summary window, the icon for "View Details" is not consistent.

On the Processors tab, the icon is a circle with an "i".

On the Connections tab, the icon is just an "i".

Screenshots attached.


> Summary:  "View Details" icon is incorrect on Connections tab
> -
>
> Key: NIFI-2144
> URL: https://issues.apache.org/jira/browse/NIFI-2144
> Project: Apache NiFi
>  Issue Type: Sub-task
>  Components: Core UI
>Affects Versions: 1.0.0
> Environment: Mac OS X, Chrome
>Reporter: Andrew Lim
>Priority: Minor
> Fix For: 1.0.0
>
> Attachments: NIFI-2144_Connections.png, NIFI-2144_Processors.png
>
>
> The icon for "View Details" should be fa-info-circle (per Rob).
> In the Summary window:  this icon is correct on the Processors tab, but not 
> on the Connections tab.
> Screenshots attached.



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


[jira] [Commented] (NIFI-1976) JNA-Based Event Log Subscription Processor

2016-06-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-1976:
--

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

https://github.com/apache/nifi/pull/525#discussion_r68989065
  
--- Diff: 
nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-processors/src/main/java/org/apache/nifi/processors/windows/event/log/ConsumeWindowsEventLog.java
 ---
@@ -0,0 +1,282 @@
+/*
+ * 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.processors.windows.event.log;
+
+import com.sun.jna.platform.win32.Kernel32;
+import com.sun.jna.platform.win32.Kernel32Util;
+import com.sun.jna.platform.win32.WinNT;
+import org.apache.commons.io.Charsets;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.TriggerSerially;
+import org.apache.nifi.annotation.behavior.WritesAttribute;
+import org.apache.nifi.annotation.behavior.WritesAttributes;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.annotation.lifecycle.OnStopped;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.components.ValidationContext;
+import org.apache.nifi.components.ValidationResult;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.AbstractSessionFactoryProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessSessionFactory;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.processors.windows.event.log.jna.ErrorLookup;
+import 
org.apache.nifi.processors.windows.event.log.jna.EventSubscribeXmlRenderingCallback;
+import org.apache.nifi.processors.windows.event.log.jna.WEvtApi;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+
+
+@InputRequirement(InputRequirement.Requirement.INPUT_FORBIDDEN)
+@Tags({"ingest", "event", "windows"})
+@TriggerSerially
+@CapabilityDescription("Registers a Windows Event Log Subscribe Callback 
to receive FlowFiles from Events on Windows.  These can be filtered via channel 
and XPath.")
+@WritesAttributes({
+@WritesAttribute(attribute = "mime.type", description = "Will set 
a MIME type value of application/xml.")
+})
+public class ConsumeWindowsEventLog extends 
AbstractSessionFactoryProcessor {
+public static final String DEFAULT_CHANNEL = "System";
+public static final String DEFAULT_XPATH = "*";
+public static final int DEFAULT_MAX_BUFFER = 1024 * 1024;
+public static final int DEFAULT_MAX_QUEUE_SIZE = 1024;
+
+public static final PropertyDescriptor CHANNEL = new 
PropertyDescriptor.Builder()
+.name("channel")
+.displayName("Channel")
+.required(true)
+.defaultValue(DEFAULT_CHANNEL)
+.description("The Windows Event Log Channel to listen to.")
+.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+.build();
+
+public static final PropertyDescriptor QUERY = new 
PropertyDescriptor.Builder()
+.name("query")
+.displayName("XPath Query")
+.required(true)
 

[jira] [Created] (NIFI-2146) When saving flow, NiFi should allow the flow to automatically be backed up

2016-06-29 Thread Mark Payne (JIRA)
Mark Payne created NIFI-2146:


 Summary: When saving flow, NiFi should allow the flow to 
automatically be backed up
 Key: NIFI-2146
 URL: https://issues.apache.org/jira/browse/NIFI-2146
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Configuration, Core Framework, Documentation & Website
Reporter: Mark Payne
 Fix For: 1.0.0


Each time that a user updates the NiFi flow, the new flow is written to the 
flow.xml.gz on each node. When this occurs, we should provide the option of 
also writing the flow.xml.gz to an 'archive' folder, using a filename based on 
the current time. We should also ensure that we keep old flows for X 
(configurable) amount of time and only use a max of some configurable amount of 
disk space.

StandardXMLFlowConfigurationDAO (in nifi-framework-core) already has a method 
for `save(FlowController controller, boolean archive)` but 'false' is always 
passed as the 'archive' field. We should instead pass in `true` if configured 
to archive.

Additionally, we should change the archive filename so that it is based on a 
user-readable date/time, such as flow-2016-06-29-11-10-50am.xml.gz, for 
instance, for a flow that was saved at 11:10:50 AM on June 29, 2016. This 
allows an admin to easily revert a flow back to how it was at some point in 
history.

Changes required to implement this include: 

1. Update nifi.properties to include new properties (with the suggested 
defaults that may need to be adjusted):
- nifi.flow.configuration.archive.enabled=true
- nifi.flow.configuration.archive.max.time=30 days
- nifi.flow.configuration.archive.max.storage=500 MB

There already is a property named `nifi.flow.configuration.archive.dir` that 
should be used to specify where to save the archived flow. This is used 
currently only when the user clicks the 'archive' button in the UI.

2. Update StandardFlowService.saveFlowChanges(TimeUnit delayUnit, long delay) 
so that it passes a value of `true` for the 'archive' flag when calling the 
overridden saveFlowChanges method in the case that the 
`nifi.flow.configuration.archive.enabled` property is set to true (default).

3. Update StandardXMLFlowConfigurationDAO.createArchiveFile() to use a more 
user-friendly filename, as described above.

4. Update StandardXMLFlowConfigurationDAO.save() so that the `if (archive) {` 
branch first cleans up old/expired flows so that the `archive` directory is 
smaller than the configured max storage space and so that any archived flow 
that is older than the configured `nifi.flow.configuration.archive.max.time` 
property is removed.

5. Update Admin Guide to explain the new properties




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


[1/3] nifi git commit: NIFI-1663: Add ConvertAvroToORC processor

2016-06-29 Thread markap14
Repository: nifi
Updated Branches:
  refs/heads/master f43f47694 -> d6391652e


http://git-wip-us.apache.org/repos/asf/nifi/blob/d6391652/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/util/orc/OrcUtils.java
--
diff --git 
a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/util/orc/OrcUtils.java
 
b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/util/orc/OrcUtils.java
new file mode 100644
index 000..e3f6db5
--- /dev/null
+++ 
b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/util/orc/OrcUtils.java
@@ -0,0 +1,408 @@
+/*
+ * 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.util.orc;
+
+import org.apache.avro.Schema;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.mutable.MutableInt;
+import org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector;
+import org.apache.hadoop.hive.ql.exec.vector.ColumnVector;
+import org.apache.hadoop.hive.ql.exec.vector.DoubleColumnVector;
+import org.apache.hadoop.hive.ql.exec.vector.ListColumnVector;
+import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector;
+import org.apache.hadoop.hive.ql.exec.vector.MapColumnVector;
+import org.apache.hadoop.hive.ql.exec.vector.UnionColumnVector;
+import org.apache.orc.TypeDescription;
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * Utility methods for ORC support (conversion from Avro, conversion to Hive 
types, e.g.
+ */
+public class OrcUtils {
+
+public static void putToRowBatch(ColumnVector col, MutableInt 
vectorOffset, int rowNumber, Schema fieldSchema, Object o) {
+Schema.Type fieldType = fieldSchema.getType();
+
+if (fieldType == null) {
+throw new IllegalArgumentException("Field type is null");
+}
+
+if (o == null) {
+col.isNull[rowNumber] = true;
+} else {
+
+switch (fieldType) {
+case INT:
+((LongColumnVector) col).vector[rowNumber] = (int) o;
+break;
+case LONG:
+((LongColumnVector) col).vector[rowNumber] = (long) o;
+break;
+case BOOLEAN:
+((LongColumnVector) col).vector[rowNumber] = ((boolean) o) 
? 1 : 0;
+break;
+case BYTES:
+ByteBuffer byteBuffer = ((ByteBuffer) o);
+int size = byteBuffer.remaining();
+byte[] buf = new byte[size];
+byteBuffer.get(buf, 0, size);
+((BytesColumnVector) col).setVal(rowNumber, buf);
+break;
+case DOUBLE:
+((DoubleColumnVector) col).vector[rowNumber] = (double) o;
+break;
+case FLOAT:
+((DoubleColumnVector) col).vector[rowNumber] = (float) o;
+break;
+case STRING:
+case ENUM:
+((BytesColumnVector) col).setVal(rowNumber, 
o.toString().getBytes());
+break;
+case UNION:
+// If the union only has one non-null type in it, it was 
flattened in the ORC schema
+if (col instanceof UnionColumnVector) {
+UnionColumnVector union = ((UnionColumnVector) col);
+Schema.Type avroType = 
OrcUtils.getAvroSchemaTypeOfObject(o);
+// Find the index in the union with the matching Avro 
type
+int unionIndex = -1;
+List types = fieldSchema.getTypes();
+final int numFields = types.size();
+for (int i = 0; i < numFields && unionIndex == -1; 
i++) {
+if (avroType.equals(types.get(i).getType())) {
+unionIndex = i;
+}
+ 

[3/3] nifi git commit: NIFI-1663: Add ConvertAvroToORC processor

2016-06-29 Thread markap14
NIFI-1663: Add ConvertAvroToORC processor

 - Code review changes
 - This closes #477.


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

Branch: refs/heads/master
Commit: d6391652e06548427ff0e66021cb9a69e0551bdb
Parents: f43f476
Author: Matt Burgess 
Authored: Wed Jun 15 09:12:57 2016 -0400
Committer: Mark Payne 
Committed: Wed Jun 29 12:18:27 2016 -0400

--
 .../src/main/resources/META-INF/NOTICE  |   12 +
 .../nifi-hive-processors/pom.xml|   10 +
 .../nifi/dbcp/hive/HiveConnectionPool.java  |   50 +-
 .../nifi/processors/hive/ConvertAvroToORC.java  |  309 ++
 .../apache/nifi/util/hive/HiveJdbcCommon.java   |   47 +-
 .../apache/nifi/util/orc/OrcFlowFileWriter.java | 2944 ++
 .../java/org/apache/nifi/util/orc/OrcUtils.java |  408 +++
 .../org.apache.nifi.processor.Processor |1 +
 .../processors/hive/TestConvertAvroToORC.java   |  260 ++
 .../org/apache/nifi/util/orc/TestOrcUtils.java  |  555 
 10 files changed, 4549 insertions(+), 47 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/d6391652/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-nar/src/main/resources/META-INF/NOTICE
--
diff --git 
a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-nar/src/main/resources/META-INF/NOTICE
 
b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-nar/src/main/resources/META-INF/NOTICE
index 35422bb..34209f4 100644
--- 
a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-nar/src/main/resources/META-INF/NOTICE
+++ 
b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-nar/src/main/resources/META-INF/NOTICE
@@ -84,6 +84,18 @@ The following binary components are provided under the 
Apache Software License v
   This project includes software copyrighted by Dell SecureWorks and
   licensed under the Apache License, Version 2.0.
 
+  (ASLv2) Apache ORC
+The following NOTICE information applies:
+  Apache ORC
+  Copyright 2013-2015 The Apache Software Foundation
+
+  This product includes software developed by The Apache Software
+  Foundation (http://www.apache.org/).
+
+  This product includes software developed by Hewlett-Packard:
+  (c) Copyright [2014-2015] Hewlett-Packard Development Company, L.P
+
+
   (ASLv2) Jackson JSON processor
 The following NOTICE information applies:
   # Jackson JSON processor

http://git-wip-us.apache.org/repos/asf/nifi/blob/d6391652/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/pom.xml
--
diff --git a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/pom.xml 
b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/pom.xml
index 3a06924..e00cbd0 100644
--- a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/pom.xml
+++ b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/pom.xml
@@ -27,6 +27,7 @@
 
 
 2.0.0
+1.1.1
 
 
 
@@ -45,6 +46,10 @@
 ${hive.version}
 
 
+org.apache.hive
+hive-orc
+
+
 org.apache.hadoop
 hadoop-common
 
@@ -131,6 +136,11 @@
 
 
 
+org.apache.orc
+orc-core
+${orc.version}
+
+
 org.apache.hadoop
 hadoop-common
 provided

http://git-wip-us.apache.org/repos/asf/nifi/blob/d6391652/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/dbcp/hive/HiveConnectionPool.java
--
diff --git 
a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/dbcp/hive/HiveConnectionPool.java
 
b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/dbcp/hive/HiveConnectionPool.java
index 07f1469..9c4065d 100644
--- 
a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/dbcp/hive/HiveConnectionPool.java
+++ 
b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/dbcp/hive/HiveConnectionPool.java
@@ -17,10 +17,7 @@
 package org.apache.nifi.dbcp.hive;
 
 import org.apache.commons.dbcp.BasicDataSource;
-import org.apache.commons.lang3.StringUtils;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hive.jdbc.HiveDriver;
 import org.apache.nifi.ann

[2/3] nifi git commit: NIFI-1663: Add ConvertAvroToORC processor

2016-06-29 Thread markap14
http://git-wip-us.apache.org/repos/asf/nifi/blob/d6391652/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/util/orc/OrcFlowFileWriter.java
--
diff --git 
a/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/util/orc/OrcFlowFileWriter.java
 
b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/util/orc/OrcFlowFileWriter.java
new file mode 100644
index 000..7055fcb
--- /dev/null
+++ 
b/nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/util/orc/OrcFlowFileWriter.java
@@ -0,0 +1,2944 @@
+/*
+ * 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.util.orc;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.ByteBuffer;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.EnumSet;
+import java.util.List;
+import java.util.Map;
+import java.util.TimeZone;
+import java.util.TreeMap;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hive.ql.util.JavaDataModel;
+import org.apache.nifi.stream.io.ByteCountingOutputStream;
+import org.apache.orc.BinaryColumnStatistics;
+import org.apache.orc.BloomFilterIO;
+import org.apache.orc.CompressionCodec;
+import org.apache.orc.CompressionKind;
+import org.apache.orc.OrcConf;
+import org.apache.orc.OrcFile;
+import org.apache.orc.OrcProto;
+import org.apache.orc.OrcUtils;
+import org.apache.orc.StringColumnStatistics;
+import org.apache.orc.StripeInformation;
+import org.apache.orc.TypeDescription;
+import org.apache.orc.Writer;
+import org.apache.orc.impl.BitFieldWriter;
+import org.apache.orc.impl.ColumnStatisticsImpl;
+import org.apache.orc.impl.DynamicIntArray;
+import org.apache.orc.impl.IntegerWriter;
+import org.apache.orc.impl.MemoryManager;
+import org.apache.orc.impl.OutStream;
+import org.apache.orc.impl.PositionRecorder;
+import org.apache.orc.impl.PositionedOutputStream;
+import org.apache.orc.impl.RunLengthByteWriter;
+import org.apache.orc.impl.RunLengthIntegerWriter;
+import org.apache.orc.impl.RunLengthIntegerWriterV2;
+import org.apache.orc.impl.SerializationUtils;
+import org.apache.orc.impl.SnappyCodec;
+import org.apache.orc.impl.StreamName;
+import org.apache.orc.impl.StringRedBlackTree;
+import org.apache.orc.impl.ZlibCodec;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.hadoop.hive.common.type.HiveDecimal;
+import org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector;
+import org.apache.hadoop.hive.ql.exec.vector.ColumnVector;
+import org.apache.hadoop.hive.ql.exec.vector.DecimalColumnVector;
+import org.apache.hadoop.hive.ql.exec.vector.DoubleColumnVector;
+import org.apache.hadoop.hive.ql.exec.vector.ListColumnVector;
+import org.apache.hadoop.hive.ql.exec.vector.LongColumnVector;
+import org.apache.hadoop.hive.ql.exec.vector.MapColumnVector;
+import org.apache.hadoop.hive.ql.exec.vector.StructColumnVector;
+import org.apache.hadoop.hive.ql.exec.vector.TimestampColumnVector;
+import org.apache.hadoop.hive.ql.exec.vector.UnionColumnVector;
+import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
+import org.apache.hadoop.io.Text;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.collect.Lists;
+import com.google.common.primitives.Longs;
+import com.google.protobuf.ByteString;
+import com.google.protobuf.CodedOutputStream;
+
+/**
+ * An ORC file writer. The file is divided into stripes, which is the natural
+ * unit of work when reading. Each stripe is buffered in memory until the
+ * memory reaches the stripe size and then it is written out broken down by
+ * columns. Each column is written by a TreeWriter that is specific to that
+ * type of column. TreeWriters may have children TreeWriters that handle the
+ * sub-types. Each of the TreeWriters writes the column's data as a set of
+ * streams.
+ * 
+ * This class is unsynchronized like most Stream objects, so from the creation
+ * of an OrcFile and all a

[jira] [Issue Comment Deleted] (NIFI-2115) Enhanced About Box Version Information

2016-06-29 Thread Rob Moran (JIRA)

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

Rob Moran updated NIFI-2115:

Comment: was deleted

(was: ​I can work on putting together some ideas, but want to share a few 
thoughts to start. Please let me know what you all think.

Things we could do soon(ish):

* Keep the About dialog simple on the surface. Provide other version/build 
related details like commit hash, branch, date/time, etc. as an aside that is 
less prominent but still easy to get at.
* Add system level information like Java version, vendor, OS, etc. in what is 
currently the System Diagnostics dialog (accessible from Summary). Probably 
makes sense to include version/build info here as well so it is in one place 
when someone needs it to report an issue, troubleshoot, etc.
* When operating in a clustered environment, I think it would make sense to 
provide that same system level info per node from the Cluster Manager.

Would be cool if (i.e., probably not so soon-ish):

* From any error, relevant bulletin, notification, etc. in the UI, provide a 
mechanism for the user contact "help" (email to mailing list) or report a bug 
(file a jira) and automatically include the relevant facts one would need.
* We implement a "dashboard" in the UI that one could _easily_ access all the 
information discussed here from a central location – basically a combination of 
summary, bulletins, diagnostics, stats, etc.)

> Enhanced About Box Version Information
> --
>
> Key: NIFI-2115
> URL: https://issues.apache.org/jira/browse/NIFI-2115
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Tools and Build
>Affects Versions: 1.0.0
>Reporter: James Wing
>Assignee: James Wing
>Priority: Minor
>
> The UI's About dialog and underlying API provide the version of NiFi, like 
> "0.7.0-SNAPSHOT".  For many bug reports and troubleshooting requests, this is 
> not very precise, especially around rapidly changing code or 
> platform-dependent behavior.  It would help if NiFi captured and displayed 
> additional information:  
> * NiFi build commit hash
> * NiFi build branch
> * NiFi build date/time
> * Java Version
> * Java Vendor (Oracle, OpenJDK)
> * OS
> Then a simple copy/paste from the about box would provide very specific 
> information about a particular NiFi installation and which code it was 
> derived from.



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


[jira] [Commented] (NIFI-1976) JNA-Based Event Log Subscription Processor

2016-06-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-1976:
--

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

https://github.com/apache/nifi/pull/525#discussion_r68970048
  
--- Diff: 
nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-processors/src/main/java/org/apache/nifi/processors/windows/event/log/ConsumeWindowsEventLog.java
 ---
@@ -0,0 +1,282 @@
+/*
+ * 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.processors.windows.event.log;
+
+import com.sun.jna.platform.win32.Kernel32;
+import com.sun.jna.platform.win32.Kernel32Util;
+import com.sun.jna.platform.win32.WinNT;
+import org.apache.commons.io.Charsets;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.TriggerSerially;
+import org.apache.nifi.annotation.behavior.WritesAttribute;
+import org.apache.nifi.annotation.behavior.WritesAttributes;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.annotation.lifecycle.OnStopped;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.components.ValidationContext;
+import org.apache.nifi.components.ValidationResult;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.AbstractSessionFactoryProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessSessionFactory;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.processors.windows.event.log.jna.ErrorLookup;
+import 
org.apache.nifi.processors.windows.event.log.jna.EventSubscribeXmlRenderingCallback;
+import org.apache.nifi.processors.windows.event.log.jna.WEvtApi;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+
+
+@InputRequirement(InputRequirement.Requirement.INPUT_FORBIDDEN)
+@Tags({"ingest", "event", "windows"})
+@TriggerSerially
+@CapabilityDescription("Registers a Windows Event Log Subscribe Callback 
to receive FlowFiles from Events on Windows.  These can be filtered via channel 
and XPath.")
+@WritesAttributes({
+@WritesAttribute(attribute = "mime.type", description = "Will set 
a MIME type value of application/xml.")
+})
+public class ConsumeWindowsEventLog extends 
AbstractSessionFactoryProcessor {
+public static final String DEFAULT_CHANNEL = "System";
+public static final String DEFAULT_XPATH = "*";
+public static final int DEFAULT_MAX_BUFFER = 1024 * 1024;
+public static final int DEFAULT_MAX_QUEUE_SIZE = 1024;
+
+public static final PropertyDescriptor CHANNEL = new 
PropertyDescriptor.Builder()
+.name("channel")
+.displayName("Channel")
+.required(true)
+.defaultValue(DEFAULT_CHANNEL)
+.description("The Windows Event Log Channel to listen to.")
+.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+.build();
+
+public static final PropertyDescriptor QUERY = new 
PropertyDescriptor.Builder()
+.name("query")
+.displayName("XPath Query")
+.required(true)
 

[jira] [Updated] (NIFI-2144) Summary: "View Details" icon is incorrect on Connections tab

2016-06-29 Thread Andrew Lim (JIRA)

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

Andrew Lim updated NIFI-2144:
-
Summary: Summary:  "View Details" icon is incorrect on Connections tab  
(was: Summary:  "View Details" icon is different between Processors and 
Connections tabs)

> Summary:  "View Details" icon is incorrect on Connections tab
> -
>
> Key: NIFI-2144
> URL: https://issues.apache.org/jira/browse/NIFI-2144
> Project: Apache NiFi
>  Issue Type: Sub-task
>  Components: Core UI
>Affects Versions: 1.0.0
> Environment: Mac OS X, Chrome
>Reporter: Andrew Lim
>Priority: Minor
> Fix For: 1.0.0
>
> Attachments: NIFI-2144_Connections.png, NIFI-2144_Processors.png
>
>
> In the NiFI Summary window, the icon for "View Details" is not consistent.
> On the Processors tab, the icon is a circle with an "i".
> On the Connections tab, the icon is just an "i".
> Screenshots attached.



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


[jira] [Commented] (NIFI-2115) Enhanced About Box Version Information

2016-06-29 Thread Rob Moran (JIRA)

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

Rob Moran commented on NIFI-2115:
-

​I can work on putting together some ideas, but want to share a few thoughts to 
start. Please let me know what you all think.

Things we could do soon(ish):

* Keep the About dialog simple on the surface. Provide other version/build 
related details like commit hash, branch, date/time, etc. as an aside that is 
less prominent but still easy to get at.
* Add system level information like Java version, vendor, OS, etc. in what is 
currently the System Diagnostics dialog (accessible from Summary). Probably 
makes sense to include version/build info here as well so it is in one place 
when someone needs it to report an issue, troubleshoot, etc.
* When operating in a clustered environment, I think it would make sense to 
provide that same system level info per node from the Cluster Manager.

Would be cool if (i.e., probably not so soon-ish):

* From any error, relevant bulletin, notification, etc. in the UI, provide a 
mechanism for the user contact "help" (email to mailing list) or report a bug 
(file a jira) and automatically include the relevant facts one would need.
* We implement a "dashboard" in the UI that one could _easily_ access all the 
information discussed here from a central location – basically a combination of 
summary, bulletins, diagnostics, stats, etc.

> Enhanced About Box Version Information
> --
>
> Key: NIFI-2115
> URL: https://issues.apache.org/jira/browse/NIFI-2115
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Tools and Build
>Affects Versions: 1.0.0
>Reporter: James Wing
>Assignee: James Wing
>Priority: Minor
>
> The UI's About dialog and underlying API provide the version of NiFi, like 
> "0.7.0-SNAPSHOT".  For many bug reports and troubleshooting requests, this is 
> not very precise, especially around rapidly changing code or 
> platform-dependent behavior.  It would help if NiFi captured and displayed 
> additional information:  
> * NiFi build commit hash
> * NiFi build branch
> * NiFi build date/time
> * Java Version
> * Java Vendor (Oracle, OpenJDK)
> * OS
> Then a simple copy/paste from the about box would provide very specific 
> information about a particular NiFi installation and which code it was 
> derived from.



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


[jira] [Created] (NIFI-2145) When saving flow, NiFi should allow the flow to automatically be backed up

2016-06-29 Thread Mark Payne (JIRA)
Mark Payne created NIFI-2145:


 Summary: When saving flow, NiFi should allow the flow to 
automatically be backed up
 Key: NIFI-2145
 URL: https://issues.apache.org/jira/browse/NIFI-2145
 Project: Apache NiFi
  Issue Type: Improvement
  Components: Configuration, Core Framework
Reporter: Mark Payne
 Fix For: 1.0.0


Each time that a user updates the NiFi flow, the new flow is written to the 
flow.xml.gz on each node. When this occurs, we should provide the option of 
also writing the flow.xml.gz to an 'archive' folder, using a filename based on 
the current time. We should also ensure that we keep old flows for X 
(configurable) amount of time and only use a max of some configurable amount of 
disk space.

StandardXMLFlowConfigurationDAO (in nifi-framework-core) already has a method 
for `save(FlowController controller, boolean archive)` but 'false' is always 
passed as the 'archive' field. We should instead pass in `true` if configured 
to archive. Additionally, we should change the archive filename so that it is 
based on a user-readable date/time, such as flow-2016-06-29-11-10-50am.xml.gz, 
for instance, for a flow that was saved at 11:10:50 AM on June 29, 2016. This 
allows an admin to easily revert a flow back to how it was at some point in 
history.

Changes required to implement this include:

1. Update nifi.properties to include new properties (with the suggested 
defaults that may need to be adjusted):
- nifi.flow.configuration.archive.enabled=true
- nifi.flow.configuration.archive.max.time=30 days
- nifi.flow.configuration.archive.max.storage=500 MB

There already is a property named `nifi.flow.configuration.archive.dir` that 
should be used to specify where to save the archived flow. This is used 
currently only when the user clicks the 'archive' button in the UI.

2. Update StandardFlowService.saveFlowChanges(TimeUnit delayUnit, long delay) 
so that it passes a value of `true` for the 'archive' flag when calling the 
overridden saveFlowChanges method in the case that the 
`nifi.flow.configuration.archive.enabled` property is set to true (default).

3. Update StandardXMLFlowConfigurationDAO.createArchiveFile() to use a more 
user-friendly filename, as described above.

4. Update StandardXMLFlowConfigurationDAO.save() so that the `if (archive) {` 
branch first cleans up old/expired flows so that the `archive` directory is 
smaller than the configured max storage space and so that any archived flow 
that is older than the configured `nifi.flow.configuration.archive.max.time` 
property is removed.




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


[jira] [Commented] (NIFI-2115) Enhanced About Box Version Information

2016-06-29 Thread Rob Moran (JIRA)

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

Rob Moran commented on NIFI-2115:
-

​I can work on putting together some ideas, but want to share a few thoughts to 
start. Please let me know what you all think.

Things we could do soon(ish):

* Keep the About dialog simple on the surface. Provide other version/build 
related details like commit hash, branch, date/time, etc. as an aside that is 
less prominent but still easy to get at.
* Add system level information like Java version, vendor, OS, etc. in what is 
currently the System Diagnostics dialog (accessible from Summary). Probably 
makes sense to include version/build info here as well so it is in one place 
when someone needs it to report an issue, troubleshoot, etc.
* When operating in a clustered environment, I think it would make sense to 
provide that same system level info per node from the Cluster Manager.

Would be cool if (i.e., probably not so soon-ish):

* From any error, relevant bulletin, notification, etc. in the UI, provide a 
mechanism for the user contact "help" (email to mailing list) or report a bug 
(file a jira) and automatically include the relevant facts one would need.
* We implement a "dashboard" in the UI that one could _easily_ access all the 
information discussed here from a central location – basically a combination of 
summary, bulletins, diagnostics, stats, etc.

> Enhanced About Box Version Information
> --
>
> Key: NIFI-2115
> URL: https://issues.apache.org/jira/browse/NIFI-2115
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Core UI, Tools and Build
>Affects Versions: 1.0.0
>Reporter: James Wing
>Assignee: James Wing
>Priority: Minor
>
> The UI's About dialog and underlying API provide the version of NiFi, like 
> "0.7.0-SNAPSHOT".  For many bug reports and troubleshooting requests, this is 
> not very precise, especially around rapidly changing code or 
> platform-dependent behavior.  It would help if NiFi captured and displayed 
> additional information:  
> * NiFi build commit hash
> * NiFi build branch
> * NiFi build date/time
> * Java Version
> * Java Vendor (Oracle, OpenJDK)
> * OS
> Then a simple copy/paste from the about box would provide very specific 
> information about a particular NiFi installation and which code it was 
> derived from.



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


[jira] [Commented] (NIFI-2123) Authorize Individual Provenance Events

2016-06-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-2123:
--

GitHub user markap14 opened a pull request:

https://github.com/apache/nifi/pull/592

NIFI-2123: Add authorization of provenance events

Also refactored core classes so that Authorizable is located within nifi-api

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

$ git pull https://github.com/markap14/nifi NIFI-2123

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

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


commit 8ceda4953094daf6dd92fbc9cf18f40b1b6855da
Author: Mark Payne 
Date:   2016-06-28T18:53:35Z

NIFI-2123: Add authorization of provenance events; refactor core classes so 
that Authorizable is located within nifi-api




> Authorize Individual Provenance Events
> --
>
> Key: NIFI-2123
> URL: https://issues.apache.org/jira/browse/NIFI-2123
> Project: Apache NiFi
>  Issue Type: Task
>  Components: Core Framework
>Reporter: Mark Payne
>Assignee: Mark Payne
>Priority: Blocker
> Fix For: 1.0.0
>
>
> As part of the new authorization paradigm, we need to authorize each 
> provenance event individually. We do this by finding the component that the 
> event belongs to and then authorizing using that component's authorizations. 
> If the component no longer exists, no user will have authorization to the 
> event.



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


[jira] [Updated] (NIFI-2144) Summary: "View Details" icon is different between Processors and Connections tabs

2016-06-29 Thread Andrew Lim (JIRA)

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

Andrew Lim updated NIFI-2144:
-
Attachment: NIFI-2144_Processors.png
NIFI-2144_Connections.png

> Summary:  "View Details" icon is different between Processors and Connections 
> tabs
> --
>
> Key: NIFI-2144
> URL: https://issues.apache.org/jira/browse/NIFI-2144
> Project: Apache NiFi
>  Issue Type: Sub-task
>  Components: Core UI
>Affects Versions: 1.0.0
> Environment: Mac OS X, Chrome
>Reporter: Andrew Lim
>Priority: Minor
> Fix For: 1.0.0
>
> Attachments: NIFI-2144_Connections.png, NIFI-2144_Processors.png
>
>
> In the NiFI Summary window, the icon for "View Details" is not consistent.
> On the Processors tab, the icon is a circle with an "i".
> On the Connections tab, the icon is just an "i".
> Screenshots attached.



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


[jira] [Created] (NIFI-2144) Summary: "View Details" icon is different between Processors and Connections tabs

2016-06-29 Thread Andrew Lim (JIRA)
Andrew Lim created NIFI-2144:


 Summary: Summary:  "View Details" icon is different between 
Processors and Connections tabs
 Key: NIFI-2144
 URL: https://issues.apache.org/jira/browse/NIFI-2144
 Project: Apache NiFi
  Issue Type: Sub-task
  Components: Core UI
Affects Versions: 1.0.0
 Environment: Mac OS X, Chrome
Reporter: Andrew Lim
Priority: Minor
 Fix For: 1.0.0


In the NiFI Summary window, the icon for "View Details" is not consistent.

On the Processors tab, the icon is a circle with an "i".

On the Connections tab, the icon is just an "i".

Screenshots attached.



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


[jira] [Commented] (NIFI-1976) JNA-Based Event Log Subscription Processor

2016-06-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-1976:
--

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

https://github.com/apache/nifi/pull/525#discussion_r68948186
  
--- Diff: 
nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-processors/src/main/java/org/apache/nifi/processors/windows/event/log/ConsumeWindowsEventLog.java
 ---
@@ -0,0 +1,282 @@
+/*
+ * 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.processors.windows.event.log;
+
+import com.sun.jna.platform.win32.Kernel32;
+import com.sun.jna.platform.win32.Kernel32Util;
+import com.sun.jna.platform.win32.WinNT;
+import org.apache.commons.io.Charsets;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.TriggerSerially;
+import org.apache.nifi.annotation.behavior.WritesAttribute;
+import org.apache.nifi.annotation.behavior.WritesAttributes;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.annotation.lifecycle.OnStopped;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.components.ValidationContext;
+import org.apache.nifi.components.ValidationResult;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.AbstractSessionFactoryProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessSessionFactory;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.processors.windows.event.log.jna.ErrorLookup;
+import 
org.apache.nifi.processors.windows.event.log.jna.EventSubscribeXmlRenderingCallback;
+import org.apache.nifi.processors.windows.event.log.jna.WEvtApi;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+
+
+@InputRequirement(InputRequirement.Requirement.INPUT_FORBIDDEN)
+@Tags({"ingest", "event", "windows"})
+@TriggerSerially
+@CapabilityDescription("Registers a Windows Event Log Subscribe Callback 
to receive FlowFiles from Events on Windows.  These can be filtered via channel 
and XPath.")
+@WritesAttributes({
+@WritesAttribute(attribute = "mime.type", description = "Will set 
a MIME type value of application/xml.")
+})
+public class ConsumeWindowsEventLog extends 
AbstractSessionFactoryProcessor {
+public static final String DEFAULT_CHANNEL = "System";
+public static final String DEFAULT_XPATH = "*";
+public static final int DEFAULT_MAX_BUFFER = 1024 * 1024;
+public static final int DEFAULT_MAX_QUEUE_SIZE = 1024;
+
+public static final PropertyDescriptor CHANNEL = new 
PropertyDescriptor.Builder()
+.name("channel")
+.displayName("Channel")
+.required(true)
+.defaultValue(DEFAULT_CHANNEL)
+.description("The Windows Event Log Channel to listen to.")
+.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+.build();
+
+public static final PropertyDescriptor QUERY = new 
PropertyDescriptor.Builder()
+.name("query")
+.displayName("XPath Query")
+.required(tru

[jira] [Commented] (NIFI-906) Docs do not display well on mobile/smaller res devices

2016-06-29 Thread Koji Kawamura (JIRA)

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

Koji Kawamura commented on NIFI-906:


I took a look at the documentation page (https://nifi.apache.org/docs.html). It 
already uses foundation.js to provide responsive pages, however it doesn't work 
on the documentation page, other pages looks fine.

I think there're two issues:

# NiFi Documentation is embedded as iframe. The iframe hides top-bar menu and 
footer with narrower screen like mobile.
# The embedded NiFi Documentation is not responsive.

h3. Possible solution for #1

When I modified css as follows, the top-bar menu and footer was shown 
correctly. I couldn't find the css file in nifi project available on Github, 
though. I assume it's managed somewhere else.

{code}
/*
Iframe
*/
/* line 177, ../../../src/scss/app.scss */
div.external-guide {
  position: absolute; // Change this to relative.
  left: 0;
  bottom: 0;
  right: 0;
  top: 2.8125rem; // Remove this.
  z-index: 1; // Remove this.
  background-color: #fff;
}
{code}

h3. Possible solution for #2

Since current web pages are using, I think we can start with foundation.js to 
use in NiFi Documentation pages. Once we can make the left component listing 
pane responsive, it should be easier with small displays. Thoughts?

> Docs do not display well on mobile/smaller res devices
> --
>
> Key: NIFI-906
> URL: https://issues.apache.org/jira/browse/NIFI-906
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Documentation & Website
> Environment: Mobile, Small res devices
>Reporter: Joseph Witt
>
> Tweet from @cyroxx
> @apachenifi Unfortunately, the docs (http://nifi.apache.org/docs.html ) are 
> not mobile-friendly, makes it hard to read about this interesting project
> https://twitter.com/cyroxx/status/637305973938483200



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


[jira] [Commented] (NIFI-1976) JNA-Based Event Log Subscription Processor

2016-06-29 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on NIFI-1976:
--

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

https://github.com/apache/nifi/pull/525#discussion_r68943688
  
--- Diff: 
nifi-nar-bundles/nifi-windows-event-log-bundle/nifi-windows-event-log-processors/src/main/java/org/apache/nifi/processors/windows/event/log/ConsumeWindowsEventLog.java
 ---
@@ -0,0 +1,282 @@
+/*
+ * 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.processors.windows.event.log;
+
+import com.sun.jna.platform.win32.Kernel32;
+import com.sun.jna.platform.win32.Kernel32Util;
+import com.sun.jna.platform.win32.WinNT;
+import org.apache.commons.io.Charsets;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.behavior.TriggerSerially;
+import org.apache.nifi.annotation.behavior.WritesAttribute;
+import org.apache.nifi.annotation.behavior.WritesAttributes;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.annotation.lifecycle.OnStopped;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.components.ValidationContext;
+import org.apache.nifi.components.ValidationResult;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.processor.AbstractSessionFactoryProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessSessionFactory;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.processors.windows.event.log.jna.ErrorLookup;
+import 
org.apache.nifi.processors.windows.event.log.jna.EventSubscribeXmlRenderingCallback;
+import org.apache.nifi.processors.windows.event.log.jna.WEvtApi;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+
+
+@InputRequirement(InputRequirement.Requirement.INPUT_FORBIDDEN)
+@Tags({"ingest", "event", "windows"})
+@TriggerSerially
+@CapabilityDescription("Registers a Windows Event Log Subscribe Callback 
to receive FlowFiles from Events on Windows.  These can be filtered via channel 
and XPath.")
+@WritesAttributes({
+@WritesAttribute(attribute = "mime.type", description = "Will set 
a MIME type value of application/xml.")
+})
+public class ConsumeWindowsEventLog extends 
AbstractSessionFactoryProcessor {
+public static final String DEFAULT_CHANNEL = "System";
+public static final String DEFAULT_XPATH = "*";
+public static final int DEFAULT_MAX_BUFFER = 1024 * 1024;
+public static final int DEFAULT_MAX_QUEUE_SIZE = 1024;
+
+public static final PropertyDescriptor CHANNEL = new 
PropertyDescriptor.Builder()
+.name("channel")
+.displayName("Channel")
+.required(true)
+.defaultValue(DEFAULT_CHANNEL)
+.description("The Windows Event Log Channel to listen to.")
+.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+.build();
+
+public static final PropertyDescriptor QUERY = new 
PropertyDescriptor.Builder()
+.name("query")
+.displayName("XPath Query")
+.required(tr

[jira] [Created] (NIFI-2143) Provenance "Filter By" drop-down truncates selected value

2016-06-29 Thread Mark Payne (JIRA)
Mark Payne created NIFI-2143:


 Summary: Provenance "Filter By" drop-down truncates selected value
 Key: NIFI-2143
 URL: https://issues.apache.org/jira/browse/NIFI-2143
 Project: Apache NiFi
  Issue Type: Bug
  Components: Core UI
Reporter: Mark Payne
Priority: Minor
 Fix For: 1.0.0


When I open the Provenance page, on the left-hand side where I have the option 
to filter the results, the selected value is "by component n..." instead of "by 
component name". When I click the drop-down, I do see the full "by component 
name" but it is truncated when selected.

Also, I would recommend we change "by type" to "by event type" in order to 
disambiguate between "by component type" and "by type".



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