[GitHub] nifi pull request: NIFI-1748 removed un-used test data

2016-04-11 Thread asfgit
Github user asfgit closed the pull request at:

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


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


[GitHub] nifi pull request: NIFI-1748 removed un-used test data

2016-04-11 Thread jskora
Github user jskora commented on the pull request:

https://github.com/apache/nifi/pull/344#issuecomment-208593602
  
Reviewing.


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


[GitHub] nifi pull request: NIFI-1748 removed un-used test data

2016-04-11 Thread olegz
Github user olegz commented on a diff in the pull request:

https://github.com/apache/nifi/pull/344#discussion_r59292437
  
--- Diff: 
nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/test/java/org/apache/nifi/processors/kafka/KafkaPublisherTest.java
 ---
@@ -124,33 +112,9 @@ public void validateSuccessfulSendAsDelimited() throws 
Exception {
 }
 
 @Test
-public void validateSuccessfulSendAsDelimited2() throws Exception {
--- End diff --

No, that was actually an addition when we tried to use Scanner from java 
that would parse using regex, so need to test for special character, but since 
that approach never seen the light of day that test was obsolete from the get 
go.


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


[GitHub] nifi pull request: NIFI-1748 removed un-used test data

2016-04-11 Thread jskora
Github user jskora commented on a diff in the pull request:

https://github.com/apache/nifi/pull/344#discussion_r59292187
  
--- Diff: 
nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/test/java/org/apache/nifi/processors/kafka/KafkaPublisherTest.java
 ---
@@ -124,33 +112,9 @@ public void validateSuccessfulSendAsDelimited() throws 
Exception {
 }
 
 @Test
-public void validateSuccessfulSendAsDelimited2() throws Exception {
--- End diff --

I see this test is just like the previous test, but is anything lost by not 
testing with a different delimiter?


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


InvokeHTTP is a Final Class

2016-04-11 Thread Devin Fisher
I was looking at using InvokeHTTP as the base for a class that would
interact with our API.  I wanted to to have the processors make some
assumptions that are true with our API but not HTTP in general (Mostly our
method of Authentication). This class looked well suited for this (the
class is well decomposed with methods that deal with different aspects of
HTTP Protocol). But the InvokeHTTP is a final class which prevents me from
using it this manner.  I have looked over the StandardProcessors and this
is not only one that is a final class. So I was wondering if there is a
reason for this. And if not if it could maybe be changed.

I'd be happy to make the change. I have been meaning to figurate out how
contributions are made in the Nifi community. This might be good chance to
figure that out.

Devin


Re: Controller service reference another service

2016-04-11 Thread Vincent Russell
Yes.  Thank you.

On Mon, Apr 11, 2016 at 11:11 AM, Mark Payne  wrote:

> D'oh! Sorry. You don't have a ProcessContext for Controller Services.
> Controller Services' lifecycles are a bit different than
> Processors and Reporting Tasks. For a Controller Service, you would
> want to use the @OnEnabled annotation and then use the provided
> ConfigurationContext:
>
>
>
> private volatile SSLContextService sslContextService;
>
> @OnEnabled
> public void obtainControllerService(ConfigurationContext context) {
> sslContextService =
> context.getProperty(SSL_CONTEXT_SERVICE).asControllerService(SSLContextService.class);
> }
>
>
> Then you should be able to reference the sslContextService member variable
> from whatever method that you need.
>
> Does this make sense.
>
> Thanks
> -Mark
>
>
> > On Apr 11, 2016, at 10:53 AM, Vincent Russell 
> wrote:
> >
> > Thank you for the response.
> >
> > Where can I make the SSLContextService sslContextService = context
> > .getProperty(SSL_CONTEXT_SERVICE).asControllerService(SSLContextService.
> > class); call?
> >
> > Where do I have access to the context within a ControllerService?
> >
> > Thanks,
> >
> > On Mon, Apr 11, 2016 at 10:11 AM, Mark Payne 
> wrote:
> >
> >> Vincent,
> >>
> >> I moved users@nifi to the BCC and instead am redirecting this to the
> >> dev@nifi mailing list,
> >> as this is developer question moreso than a user question.
> >>
> >> Certainly, you can reference one controller service from another.
> >> Generally, controller services
> >> are referenced by using a PropertyDescriptor that identifies the
> >> controller service. For example:
> >>
> >>public static final PropertyDescriptor SSL_CONTEXT_SERVICE = new
> >> PropertyDescriptor.Builder()
> >>.name("SSL Context Service")
> >>.description("The Controller Service to use in order to
> >> obtain an SSL Context")
> >>.required(false)
> >>.identifiesControllerService(SSLContextService.class)
> >>.build();
> >>
> >> This allows the user to choose the appropriate Controller Service. Node
> >> the 'identifiesControllerService' call.
> >> The service itself is then obtained by calling 'asControllerService' on
> a
> >> PropertyValue object:
> >>
> >> SSLContextService sslContextService = context.getProperty(
> >> SSL_CONTEXT_SERVICE).asControllerService(SSLContextService.class);
> >>
> >> Does this give you what you need?
> >>
> >> Thanks
> >> -Mark
> >>
> >>
> >> On Apr 11, 2016, at 10:04 AM, Vincent Russell <
> vincent.russ...@gmail.com>
> >> wrote:
> >>
> >> Is it possible to user one controller service inside of another service?
> >> Can it be brought in from the ControllerServiceInitializationContext?
> >>
> >> If so, how is this done?
> >>
> >> Thank you,
> >> Vincent
> >>
> >>
> >>
>
>


[GitHub] nifi pull request: NIFI-1654 Creating an initial appveyor.yml file...

2016-04-11 Thread apiri
GitHub user apiri opened a pull request:

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

NIFI-1654 Creating an initial appveyor.yml file.

Working PR to verify successful integration of Appveyor

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

$ git pull https://github.com/apiri/incubator-nifi NIFI-1654

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

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


commit 4ab65f7b35c4a42b8ea7ca8001ac8b68841eabf3
Author: Aldrin Piri 
Date:   2016-03-25T14:54:50Z

NIFI-1654 Creating an initial appveyor.yml file.




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


Re: Export a process group

2016-04-11 Thread Pierre Villard
Hi Harish,

Select the process group you want to export as a template. Once encircled
in yellow, click on the "Create template" button and give it a name.
That's it, you may now drag the template into the canvas using the
"Template" button or export it as a XML file using the "Templates" button
(top-right corner).

HTH
Pierre


2016-04-11 16:45 GMT+02:00 Harish Hurchurn :

> Hi,
>
> We are currently building a major data flow system using Apache NiFi, in
> fact we have been using NiFi in POC projects for quite some time, and
> proceeding to start to use NiFi to build out the data flow logic.
>
> My query is with regards to exporting flow files. Specially, if I have a
> number of process groups and I would like to select and export a process
> group, is this possible? In my testing I haven’t been able to do this, and
> it could well be that I am doing something wrong. Alternatively is this
> something which is on the backlog for a future release, if so, do you have
> an idea as to which release it will be?
>
> Best regards
> Harish
>


Re: Export a process group

2016-04-11 Thread Simon Ball
Hi Harish,

There’s an issue of terms here. You wouldn’t be exporting a Flowfile so to 
speak (that is a unit of data flowing through nifi). It sounds like you’re 
looking to export sections of the flow configuration. In that case, the way to 
do that is to make the process groups you want to export into a template, then 
use the the template manager to export them to a local XML file that can be 
imported elsewhere.

See also https://github.com/aperepel/nifi-api-deploy for a useful utility to 
help automate some of this particularly for use moving deployments between nifi 
instances.

Simon


On 11 Apr 2016, at 15:45, Harish Hurchurn 
> wrote:

Hi,

We are currently building a major data flow system using Apache NiFi, in fact 
we have been using NiFi in POC projects for quite some time, and proceeding to 
start to use NiFi to build out the data flow logic.

My query is with regards to exporting flow files. Specially, if I have a number 
of process groups and I would like to select and export a process group, is 
this possible? In my testing I haven’t been able to do this, and it could well 
be that I am doing something wrong. Alternatively is this something which is on 
the backlog for a future release, if so, do you have an idea as to which 
release it will be?

Best regards
Harish



Export a process group

2016-04-11 Thread Harish Hurchurn
Hi,

We are currently building a major data flow system using Apache NiFi, in fact 
we have been using NiFi in POC projects for quite some time, and proceeding to 
start to use NiFi to build out the data flow logic.

My query is with regards to exporting flow files. Specially, if I have a number 
of process groups and I would like to select and export a process group, is 
this possible? In my testing I haven’t been able to do this, and it could well 
be that I am doing something wrong. Alternatively is this something which is on 
the backlog for a future release, if so, do you have an idea as to which 
release it will be?

Best regards
Harish


signature.asc
Description: Message signed with OpenPGP using GPGMail


[GitHub] nifi pull request: NIFI-1668 modified TestProcessorLifecycle to en...

2016-04-11 Thread pvillard31
Github user pvillard31 commented on the pull request:

https://github.com/apache/nifi/pull/324#issuecomment-208369542
  
@olegz Tests on master are OK but not when testing this PR.
Windows 10 / Maven 3.3.9 : Java 1.0.8_74

```
---
 T E S T S
---
Running TestSuite
Tests run: 182, Failures: 29, Errors: 0, Skipped: 1, Time elapsed: 135.132 
sec <<< FAILURE! - in TestSuite
validateSuccessfullAndOrderlyShutdown on 
validateSuccessfullAndOrderlyShutdown(org.apache.nifi.controller.scheduling.TestProcessorLifecycle)(org.apache.nifi.controller.scheduling.T
estProcessorLifecycle)  Time elapsed: 5.267 sec  <<< FAILURE!
java.io.IOException: Unable to delete file: .\target\test-repo\wali.lock
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2279)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
at 
org.apache.nifi.controller.scheduling.TestProcessorLifecycle.after(TestProcessorLifecycle.java:90)

validateStopCallsAreMeaninglessIfProcessorNotStarted on 
validateStopCallsAreMeaninglessIfProcessorNotStarted(org.apache.nifi.controller.scheduling.TestProcessorLifecycle)(org.apach
e.nifi.controller.scheduling.TestProcessorLifecycle)  Time elapsed: 0.001 
sec  <<< FAILURE!
java.lang.RuntimeException: java.nio.channels.OverlappingFileLockException
at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255)
at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152)
at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1063)
at java.nio.channels.FileChannel.lock(FileChannel.java:1053)
at 
org.wali.MinimalLockingWriteAheadLog.(MinimalLockingWriteAheadLog.java:179)
at 
org.wali.MinimalLockingWriteAheadLog.(MinimalLockingWriteAheadLog.java:108)
at 
org.apache.nifi.controller.repository.WriteAheadFlowFileRepository.initialize(WriteAheadFlowFileRepository.java:139)
at 
org.apache.nifi.controller.FlowController.createFlowFileRepository(FlowController.java:547)
at 
org.apache.nifi.controller.FlowController.(FlowController.java:411)
at 
org.apache.nifi.controller.FlowController.createStandaloneInstance(FlowController.java:360)
at 
org.apache.nifi.controller.scheduling.TestProcessorLifecycle.buildFlowControllerForTest(TestProcessorLifecycle.java:607)
at 
org.apache.nifi.controller.scheduling.TestProcessorLifecycle.before(TestProcessorLifecycle.java:85)

validateStopCallsAreMeaninglessIfProcessorNotStarted on 
validateStopCallsAreMeaninglessIfProcessorNotStarted(org.apache.nifi.controller.scheduling.TestProcessorLifecycle)(org.apach
e.nifi.controller.scheduling.TestProcessorLifecycle)  Time elapsed: 0.001 
sec  <<< FAILURE!
java.io.IOException: Unable to delete file: .\target\test-repo\wali.lock
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2279)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
at 
org.apache.nifi.controller.scheduling.TestProcessorLifecycle.after(TestProcessorLifecycle.java:90)

validateLifecycleOperationOrderWithConcurrentCallsToStartStop on 
validateLifecycleOperationOrderWithConcurrentCallsToStartStop(org.apache.nifi.controller.scheduling.TestProcessorLi
fecycle)(org.apache.nifi.controller.scheduling.TestProcessorLifecycle)  
Time elapsed: 0.001 sec  <<< FAILURE!
java.lang.RuntimeException: java.nio.channels.OverlappingFileLockException
at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255)
at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152)
at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1063)
at java.nio.channels.FileChannel.lock(FileChannel.java:1053)
at 
org.wali.MinimalLockingWriteAheadLog.(MinimalLockingWriteAheadLog.java:179)
at 
org.wali.MinimalLockingWriteAheadLog.(MinimalLockingWriteAheadLog.java:108)
at 
org.apache.nifi.controller.repository.WriteAheadFlowFileRepository.initialize(WriteAheadFlowFileRepository.java:139)
at 
org.apache.nifi.controller.FlowController.createFlowFileRepository(FlowController.java:547)
at 
org.apache.nifi.controller.FlowController.(FlowController.java:411)
at 
org.apache.nifi.controller.FlowController.createStandaloneInstance(FlowController.java:360)
at 
org.apache.nifi.controller.scheduling.TestProcessorLifecycle.buildFlowControllerForTest(TestProcessorLifecycle.java:607)
at 
org.apache.nifi.controller.scheduling.TestProcessorLifecycle.before(TestProcessorLifecycle.java:85)

validateLifecycleOperationOrderWithConcurrentCallsToStartStop on 

Re: Controller service reference another service

2016-04-11 Thread Mark Payne
Vincent,

I moved users@nifi to the BCC and instead am redirecting this to the dev@nifi 
mailing list,
as this is developer question moreso than a user question.

Certainly, you can reference one controller service from another. Generally, 
controller services
are referenced by using a PropertyDescriptor that identifies the controller 
service. For example:

public static final PropertyDescriptor SSL_CONTEXT_SERVICE = new 
PropertyDescriptor.Builder()
.name("SSL Context Service")
.description("The Controller Service to use in order to obtain an 
SSL Context")
.required(false)
.identifiesControllerService(SSLContextService.class)
.build();

This allows the user to choose the appropriate Controller Service. Node the 
'identifiesControllerService' call.
The service itself is then obtained by calling 'asControllerService' on a 
PropertyValue object:

SSLContextService sslContextService = 
context.getProperty(SSL_CONTEXT_SERVICE).asControllerService(SSLContextService.class);

Does this give you what you need?

Thanks
-Mark


> On Apr 11, 2016, at 10:04 AM, Vincent Russell  
> wrote:
> 
> Is it possible to user one controller service inside of another service?  Can 
> it be brought in from the ControllerServiceInitializationContext? 
> 
> If so, how is this done?
> 
> Thank you,
> Vincent