GitHub user pvillard31 opened a pull request:
https://github.com/apache/nifi-registry/pull/110
NIFIREG-160 - WIP - Hook provider
To test it quickly, you can do the following changes:
./conf/providers.xml
````xml
<providers>
<flowPersistenceProvider>
<class>org.apache.nifi.registry.provider.flow.FileSystemFlowPersistenceProvider</class>
<property name="Flow Storage Directory">./flow_storage</property>
</flowPersistenceProvider>
<flowHookProvider>
<class>org.apache.nifi.registry.provider.hook.ScriptFlowHookProvider</class>
<property name="Script Path">/tmp/test.sh</property>
<property name="Working Directory"></property>
</flowHookProvider>
</providers>
````
/tmp/test.sh
````bash
#!/bin/bash
echo $@ >> /tmp/registryHook.log
````
We can see this kind of ouput:
````
CREATE_BUCKET a50f3aac-a3b6-47ed-b0b0-eb7a1c0cb8b5
CREATE_VERSION 7091404e-1295-4d03-9053-06f2ecb83f91
707b31c8-6741-4525-9816-bd188f1f96eb 2 a comment anonymous
DELETE_BUCKET a50f3aac-a3b6-47ed-b0b0-eb7a1c0cb8b5
CREATE_BUCKET 95c7d15a-2ac8-494e-841a-c168e19c1c35
CREATE_BUCKET 2326a164-7ab3-45a3-af66-4adbf2cd4f32
DELETE_BUCKET 95c7d15a-2ac8-494e-841a-c168e19c1c35
DELETE_BUCKET 2326a164-7ab3-45a3-af66-4adbf2cd4f32
````
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/pvillard31/nifi-registry hook
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/nifi-registry/pull/110.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 #110
----
commit 4d7d8d21f211d646def86271a9b69c2633f9adf9
Author: Pierre Villard <pierre.villard.fr@...>
Date: 2018-04-06T14:58:33Z
NIFIREG-160 - WIP - Hook provider
----
---