Member since
07-30-2019
2743
Posts
1359
Kudos Received
796
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
124 | 11-02-2023 10:20 AM | |
252 | 11-02-2023 09:54 AM | |
272 | 11-01-2023 06:17 AM | |
203 | 10-31-2023 06:30 AM | |
110 | 10-30-2023 10:52 AM |
11-07-2023
09:40 AM
@lafi_oussama If I am understanding correctly, this sounds like expected behavior. You are writing a NiFi Expression Language (NEL) statement to an attribute via your python script so it is not being evaluated by the NEL process. I am not clear on why you are using a python script here anyway. As i understand your use case: 1. NiFi is ingesting files with various filenames. 2. Depending on the filename, you want to add an attr1 attribute to the FlowFile with a specific path value 3. If the filename does not match and value, you want to add an attr1 attribute to FlowFile with value "notfind". This use case can easily be handled by a single UpdateAttribute processor through the use of the "Advanced" functionality without needing to develop and manage a python script. The "Advanced" functionality works like an If/Then/Else. Would look something like this: Outside the "Advanced" UI is the Else. Any dynamic attributes add here are added to FlowFile only if the same attribute was NOT added by a rule in the "Advanced" section. So here you set attr1 = "notfind". Inside the "Advanced" section you create one or more rules. Each rule has a Conditon (If) and an Action (then) sections. If the condition NEL resolves to "true" then actions are applied to FlowFile. So you set up a rule for each flowfile filename type. If none of teh rules match then the default attr = notfind is set. If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
11-06-2023
11:08 AM
@lafi_oussama I am not clear in your ask here. I assume you are using the above NiFi Expression language (NEL) statement in an Update Attribute processor? Assuming the NiFi FlowFile has a filename=blah-OD_NCE-2023.gz ${filename:find('OD_NCE.*.gz') <-- resolves to true
:ifElse("/isod/brt_fin_fd_OD_NCE_pipe_sep","notfind")} <-- since above is "true", the if else function would return "/isod/brt_fin_fd_OD_NCE_pipe_sep" and that woud be assigned to the "attr1" attribute on the outbound FlowFile. If your filename does not match your java regular expression "OD_NCE.*.gz" (result in false) would result in attr1 = notfind So I am not clear on what you are asking for: I want to have the value of expression not the string Can you provide an example of what you want to be assigned to FlowFile Attribute "attr1" and what you are actually getting? This info is also not clear to me: I read this expression from file and after this I convert the content to attributes How are you reading expression from file? What exactly are you reading? Why are you converting FlowFile content to FlowFile attributes? FlowFile Attributes reside within the NiFi's JVM heap. So you'll want to avoid this unless absolutely necessary and when you so, only extract the minimum needed. If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
11-06-2023
07:47 AM
@SowmyaP The issue is related to the size of source FlowFile content. It is not related to the volume of FlowFiles being processed, but rather directly related to the individual FlowFile's contemt size. So only when FlowFile Excel content is larger than 10 MB will you encounter https://issues.apache.org/jira/browse/NIFI-10792. This issue does not exist in Apache NiFi 1.15.3 and earlier. Apache NiFi versions between 1.16 and 1.20 are impacted by this issue. The above issue was addressed in Apache NiFi 1.21.0 and newer. The processor was refactored in above Jira to resolve the 10 MB size restraint. You'll need to upgrade to Apache NiFi 1.21 or newer to resolve this issue. If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
11-06-2023
06:09 AM
@zIfo The default Single-User-Authorizer (Authorization) and Single-user-provider (authentication) are not intended for production use. These were added as of Apache NiFi 1.14 to facilitate a secure out-of-the-box NiFi startup for evaluation and testing. They provide very basic authentication and authorization. Single user with complete and full access to everything. So by using this default provider you have no ability to support multiple users with very granular levels of authorization. The Token on the NiFi server side should expire after 8 hours. The JWT token stored in the browser may be around longer. You did not share the version of Apache NiFi you have installed, but perhaps the following explains what you are experiencing : https://issues.apache.org/jira/browse/NIFI-9049 But to support NiFi Clusters and NiFi multi-tenant authentication and authorization, you should move to a production ready authentication provider (LDAP commonly used) and authorizer (Managed authorizer commonly used). If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
11-03-2023
06:24 AM
@SowmyaP You appear to be hitting the following Apache NiFi ConvertExcelToCSVProcessor issue: https://issues.apache.org/jira/browse/NIFI-10792 The fix for above issue exists in the following releases: Apache NiFi 1.21.0 or newer. CFM 2.1.5 SP1 release or newer (https://docs.cloudera.com/cfm/2.1.5/release-notes/topics/cfm-fixed-issues.html) CFM 2.1.6 or newer Upgrading to a newer release should resolve your issue. If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
11-02-2023
10:20 AM
@noncitizen Your issue here is that the "Solr Location" property has limted NiFi Expression Language support as documented here: https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-solr-nar/1.23.2/org.apache.nifi.processors.solr.PutSolrContentStream/index.html You'll notice that it states: Supports Expression Language: true (will be evaluated using variable registry only) In order to support NiFi Expression use of FlowFile Attributes, the wording would reflect: Supports Expression Language: true (will be evaluated using flow file attributes and variable registry Processor Properties that limit NiFi Expression Language (NEL) usability to Variable Registry only, is usually the result of client library being used requiring that the value is available at time processor is started. Both Parameters and Variable Registry will have values available at processor start. NEL can be used to manipulate the Variable Registry value through NEL functions at start or processor. If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
11-02-2023
09:54 AM
@jai1gupta What makes you think your NiFi is not secured over https? You did not share your nifi.properties web properties. If you have set the following properties: nifi.web.https.host=<hostname>
nifi.web.https.port=<port> and have configured the NiFi keystore and truststore properties (which you did share), the your NiFi would have started at logged url being available over HTTPS://<hostname>:<port>/nifi My guess is your issue probably extends from the use of "localhost" instead of an actual resolvable hostname. If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
11-02-2023
09:50 AM
@samrathal Apache NiFi has hardcoded return size to 100: https://github.com/apache/nifi/blob/main/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardConnectionDAO.java#L361 I am sure this was originally done for performance and NiFi JVM heap usage reasons. The first 100 returned should be the oldest 100 in queue (keeping in mind that a connection will also show count of FlowFiles pending processing by downstream processor and count of those currently allocated to a downstream component process. The listing only returns those pending FlowFiles and not those already owned by downstream component).What is the use case for needing to list more? Ideally what is found in a queue should be changing rapidly, so expectation is that each listing request would be different. Listing a queue does not stop NiFi processing. The intent is not for NiFi to ever hold FlowFiles in any connection. So using API to poll connection for FlowFile listings seems odd to me. What is returned by that listing could be inaccurate milliseconds later. Also be careful with your API requests. When a listing is performed through the browser three different request are made. 1. First listing-request is made and replicated to all nodes to get result sets. 2. Return from step 1 request gives the ID for the generated listing request being held in heap memory. That ID is used to fetch the results in that specific listing ID 3. A DELETE request is made to remove the listing with that ID from NiFi. *** When using API, If steps 1 and 2 are all that are being executed, the various listing request(s) will stay in heap memory. If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
11-01-2023
06:17 AM
@Knowledgeknow Does your NiFi Keystore meet the following requirements? MUST contain only one PriavteKey Entry PrivateKey Entry must include ExtenedKeyUsage(EKU) for both clientAuth and serverAuth. PrivateKey Entry DistinquishedName (DN) does not contain wildcards PrivateKey Entry contains one of more SubjectAlternativeName (SAN) entries that includes the hostname and IP for the NiFi server on which it will be used. 2. Sounds like you have configured nifi.properties: nifi.remote.input.host=0.0.0.0 While this will work for a http setup, it will cause issue with the TLS handshake. Instead this should set the hostname of the NiFi server and the hostname must be a SAN entry. If you are trying to have your NIFi bind to multiple Network Interface Cards (NICs) then you should use the "nifi.web.https.network.interface*" properties in web properties section of the nifi.properties file. If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more
10-31-2023
06:30 AM
@plapla The DistributedMapCacheClientService is used to connect to the DistributedMapCacheServer. You have not shared how you have the DistributedMapCacheServer controller service configured. The DistributedMapCacheServer configuration determines whether the DistributedMapCacheClientService needs tobe configured with a StandardRestrictedSSLContext Service. Essentially if you configure a StandardRestrictedSSLContext service on the DistributedMapCacheServer, then it must also be configured on the DistributedMapCacheClientService. If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped. Thank you, Matt
... View more