Member since
09-29-2015
871
Posts
723
Kudos Received
255
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 4272 | 12-03-2018 02:26 PM | |
| 3220 | 10-16-2018 01:37 PM | |
| 4334 | 10-03-2018 06:34 PM | |
| 3188 | 09-05-2018 07:44 PM | |
| 2436 | 09-05-2018 07:31 PM |
05-10-2017
12:42 PM
@Raj B
Yes that is work around when using versions before 1.1.x, just keep in mind if you ever blow away the work directory you have to make that change again.
... View more
05-09-2017
09:20 PM
1 Kudo
Causedby: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory This class is a Phoenix class, when you install Phoenix it sets this class name somewhere in hbase-site.xml and then when NiFi creates the HBase client, the HBase client is reading hbase-site.xml and trying to instantiate this class which doesn't exist in the HBase client. In Apache NiFi 1.1.x there is a property on the HBase client service for specifying the location of the phoenix-client.jar. Setting that should solve this.
... View more
05-09-2017
09:16 PM
1 Kudo
First, its important to understand how consuming from Kafka works in NiFi. The ConsumeKafka section of this post was my attempt to explain it: http://bryanbende.com/development/2016/09/15/apache-nifi-and-apache-kafka The Kafka client automatically assigns partitions to consumers, and 1 partition can only be consumed by 1 consumer. The # of consumers = The # of NiFi nodes X the # of concurrent tasks on ConsumeKafka So if you have a single NiFi node with 1 concurrent task, then the consumer group has 1 consumer.
The error means that a consumer pulled some data and went to commit offsets to Kafka, but Kafka hasn't heard from the consumer in longer than the configured session timeout, so Kafka is saying sorry you can't do that because the partition was already reassigned to another consumer, or is possible unassigned if there are no consumers alive. The most common case of this happening in NiFi was when back-pressure occurred between ConsumeKafka and the next processor... back-pressure causes the preceeding processor to not execute until the back-pressure threshold is reduced. So if ConsumeKafka wasn't allowed to run for a couple of minutes, then the back-pressure is cleared and it runs again, you then get this error. The was addressed in a ticket for the upcoming Apache NiFi 1.2.0 release: https://issues.apache.org/jira/browse/NIFI-3189
... View more
05-04-2017
04:44 PM
Well the options are... 1) ExtractText with regex 2) ExtractText to get whole content into attribute then use EL 3) A Groovy/Jyton/etc script that ExecuteScript can call to parse your data 4) Custom Java processor that knows how to parse your data format
... View more
05-04-2017
04:36 PM
1 Kudo
You can only perform EL on flow file attributes, not on the content of a flow file. So you would first have to use ExtractText to extract the whole content of the flow file into an attribute (assuming that example message is the content of a flow file). This should only be done if you are certain the size of the messages is reasonable and can fit in memory. Once you have a flow file attribute you can apply any of the EL functions described here: https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html
... View more
05-04-2017
04:30 PM
1 Kudo
There is an expression language guide here: https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html For your example you should be able to create an UpdateAttribute processor and add a new property like: myfilename = ${filename:substringAfterLast('/')}
... View more
05-04-2017
03:25 PM
2 Kudos
Have you tried installing the hadoop client on the same machine as NiFi and then sending a similar file to HDFS from the command line? In most cases the issue here is the network or disk.
... View more
05-01-2017
01:03 PM
1 Kudo
The documentation of the user defined properties for QueryDatabaseTable says: Initial Max Value
Attribute Expression Language Specifies
an initial max value for max value columns. Properties should be added
in the format `initial.maxvalue.{max_value_column}`. So these are meant to be used to specify the initial value of a max value column. To add attributes to the flow files for down stream processing you can use an UpdateAttribute processor right after QueryDatabaseTable.
... View more
04-27-2017
09:13 PM
1 Kudo
MergeContent in Defragment mode would work if you were only merging back one split, so if you have SplitAvro -> ConvertAvroToJson -> ExecuteScript -> MergeContent I think it would work. Once you have multiple SplitAvro processors then each one is writing over the fragment attributes with the most recent split information so MergeContent can only merge back together the most recent Splits. What are you doing in your ExecuteScript processor to find the problematic record? Just curious to understand that part to see if there is a different way to do the same thing.
... View more
04-27-2017
09:04 PM
2 Kudos
@Gu Gur Since your processor has INPUT_FORBIDDEN, you can never have flow files coming in to your processor, so you should remove the beginning of onTrigger where you have: FlowFile flowFile = aSession.get();
if(flowFile ==null){
return;
} That will always return and exit your onTrigger because there are no flow files. Instead you will want to create a new flow file like: FlowFile flowFile = session.create();
... View more