apache-nifi

Nifi: how to write Custom processor

烈酒焚心 提交于 2020-01-11 04:07:08
问题 I want to write nifi processor which can read xml file from hdfs directory and then extracting it's data into flowfile attributes , also if there is case when two nifi processor can get this file and read data or write something into it how can i do file lock so that at a time only one processor can use it? Can you reccomend me any article, code examples or some related materials which can help me. i'haven't write any custom processor yet. 回答1: I'm not sure why you need to write a custom

Nifi ExecuteGroovyScript - class already loaded in another classloader

吃可爱长大的小学妹 提交于 2020-01-06 10:15:20
问题 I get a flowfile with ExecuteGroovyScript processor with some custom code in it. and it work well : but if I stop it and change the code in i get this error: java.lang.UnsatisfiedLinkError: Native Library /data/nifi_flow/dec-enr/pseudo/lib/libpseudojni.so already loaded in another classloader: java.lang.UnsatisfiedLinkError: Native Library /data/nifi_flow/dec-enr/pseudo/lib/libpseudojni.so already loaded in another classloader java.lang.UnsatisfiedLinkError: Native Library /data/nifi_flow/dec

Apache Nifi - Not able to start Ni-Fi Instance

ε祈祈猫儿з 提交于 2020-01-06 08:08:26
问题 Whenever I execute run-nifi command, I am not able to start my nifi instance as I am getting the java.lang.RuntimeException: java.io.EOFException Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowController': FactoryBean threw exception on object creation; nested exception

Reload authorizers.xml file at runtime

前提是你 提交于 2020-01-06 06:35:16
问题 I want to reload initial admin identity configuration at runtime. Is there any option to achieve this. Consider the case, If i have configured NiFi in secure mode using Kerberos and doesn't provided "Initial Admin". So i cannot login into NiFi with any user. I want to update the admin configuration in authorizers.xml after NiFi started and reload the file in runtime. How can i achieve this? Give me a solution or idea to make it succeeded. 回答1: You cannot reload the Initial Admin Identity

How can I list database tables in a set of databases using the new DBCPConnectionPoolLookup in NiFi?

柔情痞子 提交于 2020-01-06 04:21:26
问题 As of NiFi 1.7.1, the new DBCPConnectionPoolLookup enables dynamic selection of database connections: set an attribute database.name on a FlowFile and when a consuming processor accesses a configured DBCPConnectionPoolLookup controller service, the content of that attribute will be used to get a connection through this lookup's configured properties, which contain a mapping of potential values to DBCPConnectionPool controller service. I'd like to list the tables in each database that I've

Batch processing flowfiles in apache nifi

感情迁移 提交于 2020-01-05 11:52:09
问题 I have written custom nifi processor which tries to batch process input flow files. However, it seems it is not behaving as expected. Here is what happening: I copy paste some files on server. FethFromServerProcessor fetches those files from server and puts it in queue1 . MyCustomProcessor reads files in batch from queue1 . I have batchSize property defined on MyCustomProcessor and inside its onTrigger() method, I am getting all flow files from queue1 in current batch by doing following:

Batch processing flowfiles in apache nifi

安稳与你 提交于 2020-01-05 11:52:06
问题 I have written custom nifi processor which tries to batch process input flow files. However, it seems it is not behaving as expected. Here is what happening: I copy paste some files on server. FethFromServerProcessor fetches those files from server and puts it in queue1 . MyCustomProcessor reads files in batch from queue1 . I have batchSize property defined on MyCustomProcessor and inside its onTrigger() method, I am getting all flow files from queue1 in current batch by doing following:

NiFi: Unable to add external library to ExecuteScript Processor for Python

对着背影说爱祢 提交于 2020-01-04 15:11:27
问题 I want to use Python DB client for Impala in my NiFi jython ExecuteScript Processor. I've installed required module with pip install impyla and specify path to it in Module Directory field in ExecuteScript Processor. After that I run script and got an error javax.script.ScriptException: ImportError: No module named _bitarray With pip show bitarray I found this module location and add it to the Module Directory field (use comma as a separator) and restart NiFi just in case. But it didn't help.

NiFi: Unable to add external library to ExecuteScript Processor for Python

半世苍凉 提交于 2020-01-04 15:10:35
问题 I want to use Python DB client for Impala in my NiFi jython ExecuteScript Processor. I've installed required module with pip install impyla and specify path to it in Module Directory field in ExecuteScript Processor. After that I run script and got an error javax.script.ScriptException: ImportError: No module named _bitarray With pip show bitarray I found this module location and add it to the Module Directory field (use comma as a separator) and restart NiFi just in case. But it didn't help.

NiFi: ReplaceTextWithMapping processor

怎甘沉沦 提交于 2020-01-04 09:38:03
问题 I have the following insert statements: insert into temp1 values (test1, test2) insert into temp2 values (test3) Expected results: insert into temp1 values (100, 200) insert into temp2 values (300) Essentially, I wanted to replace the first query literals test1 , test2 with value 100 , 200 respectively and for the second query replace test3 with value 300 . Can someone help with the mapping file for the above use case? I tried with the following, but it doesn't have any effect. Search Value