Member since
06-19-2017
62
Posts
1
Kudos Received
7
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 4874 | 03-17-2022 10:37 AM | |
| 3078 | 12-10-2021 04:25 AM | |
| 3350 | 08-18-2021 02:20 PM | |
| 8543 | 07-16-2021 08:41 AM | |
| 1854 | 07-13-2021 07:03 AM |
06-11-2021
03:16 AM
Hi , Thanks for the reply . As i mentioned that i have run the insert ino tableA select * from tableB (Assume Delta calculation query). Yes , we have managed table in hive and hive version is 3.0 where ACID are enabled by default .We have created the Hive managed table through HUE and executed the delta query via NiFi PutHQL processor and we got the error intermittently .
... View more
05-17-2021
04:16 AM
Hi , Thanks for the information . We have added this single property set hive.txn.stats.enabled=false and still we were getting the issue intermittenly from Nifi. My Solution architect found the cause for the issue after investigating Hive github code I believe. So we added to these two property below set hive.txn.stats.enabled=false set hive.stats.autogather=false The error disappeared and never come again .I would like to understand how to relate the hive github with those properties or how do have to troubleshoot this kind of strange issue .
... View more
04-22-2021
01:58 AM
Hi All, We are getting the below error intermittently for some tables and we have hive 3.1 . I am passing a sample query like insert into table test as select * from some table in Nifi PutHiveSQL processor . Hive target table is managed table and stored as avro format Error : PutHive3QL[id=d1652e76-54f7-30cf-8dc8-b1934cee3c26] Failed to update Hive for StandardFlowFileRecord[uuid=7447e7f0-4d1e-40fa-9965-5c98f7d11341,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1618924236521-4, container=default, section=4], offset=154416, length=3631],offset=0,name=20210421_test_branch_info,size=3631] due to java.sql.SQLException: Error while compiling statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.StatsTask. MetaException(message:Cannot change stats state for a transactional table ra_test.test_branch_info without providing the transactional write state for verification (new write ID -1, valid write IDs null; current state {"BASIC_STATS":"true","COLUMN_STATS":{}; new state {"BASIC_STATS":"true","COLUMN_STATS":{}); it is possible that retrying the operation will succeed, so routing to retry: java.sql.SQLException: Error while compiling statement: FAILED: Execution Error, Option tried : if we rerun the query for the same table through Nifi PutHiveSQL , then Nifi processor executes the query fine . sometimes it fails in the first run. Hive version : 3.0 and Nifi 1.11.4 Please assist what option to be checked in Hive side on this error. Thanks
... View more
Labels:
- Labels:
-
Apache Hive
-
Apache NiFi
02-11-2021
03:29 AM
@MattWho In continuation of above logic and i implemented and it is working fine . I have three nodes nifi cluster where a,b,c .Here a node is primary node always . If a goes out of space , we will unzip the file from another node and distributes to b,c nodes and we push the file to HDFS folder and we capture success and failure message( in Updateattribute processor) as mentioned in the posts above . After that in mergerecord process , the queue is waiting for sometime and merging happens after 10mins around . I have a dependency of the merging processor as i have to share the status of flowfile to another API which is requesting for it. How we can speed up the MergeRecord processor here . If all three nodes have good amount of memory and the flowfiles pushed to HDFS and status updates (through UpdateProcessorattribute) and merging happens very quickly as expected in single node. But we have nodes(b,c) and 'a' primary node is out due to space issue in device .The processor unpack the .zip file then distribute to nodes tp put into HDFS .As we capture each success/failure status of PutHDFS (using updateattribute processor) and mergerecord is taking sometime to merge the status . Is this because of other two nodes processing it slowly or some other reason for that. I have attached screenshot of the partial flow .
... View more
01-25-2021
04:20 AM
Hi All, I am trying to build JSON string using Ifelse condition in ReplaText processor but i am getting error as invalid Invalid Expression . Working Ifelse condition : ${status:contains('0'):ifElse('Success','Failed')} This below string is not working and it is throwing invalid expression . Please assist on this . ${status:contains('0'):ifElse('{ "filename":"${overall_filename}", "status":"${status}", "message":"${overall_message}" }', '{ "filename":"${overall_filename}", "status":"${exc_status}", "message":"${overall_message}" }' ) } Thanks
... View more
Labels:
- Labels:
-
Apache NiFi
01-07-2021
04:23 AM
Hi Faerballert Thanks for helping . I am able to get entire content into attribute . I have one doubt that i have attribute name called "JSONValue" so that extracted value should be in this name but the flowfile content saves into the attribute "JSONValue.0 " as supposed to create value in JSONValue attribute . Please see screen-print for the same . I had to enable "Include Capture Group 0" as True otherwise the Regex not accepting and expecting value 0 to40 other than false.
... View more
01-06-2021
08:55 AM
Hi All, I have nifi flow fthat fetches one json file and using the extractText processor, i want to store entire flowfile content(assume small json file) into one flowfile attribute. But (.*) is not extracting whole json and instead extracting only { . Please help with Java regular expression to extract full json afnd also share if any Java regular expression documentation which i can refer for Nifi extracttext processor. I having json file which contains format like { "filename1":"insert into filename1", "filename2":"insert into filename2", "filename3":"insert into filename3" } I will retrieve the filenames in generic way/dynamic using JsonPath(${filename}) in updateattribute . Please assist to extract whole json content into one flow file attribute . Thanks @Nifi@NifiDev
... View more
Labels:
- Labels:
-
Apache NiFi
01-06-2021
08:18 AM
@MattWho This is Amazing and solution working well.
... View more
01-04-2021
03:29 AM
Hi ,
@MattWho
Thanks a lot for clarifying and provide solution for Merging contents . I have implemented as per your guidelines and the merge content working fine But i am unable to update overall status of file if it is error and message as well. Please find my status flow in detail.
1.Your flow starts with a single zip file? --- I get meta file which contains .zip file to be fetched . for exmaple whosale.meta file which contain .zip file having 3 or 4 csv files .
2. You unzip that file to produce numerous output FlowFiles? --- Yes , I unzip the file .
3. You use load balanced connections to distribute all the produced FlowFiles across all nodes in your cluster? --- Yes , i do enable round robin load balancing for the flow files which was unzip in step 2 and push the flowfiles into HDFS .
4. Then you modify content of FlowFile using convertAttribitesToJson processor (Destination=flowfile-content)? Looks like you route the "success" relationship twice from this processor which means you have cloned your FlowFiles. Why? --- Initially i was trying convert attributes into JSON flowfile. I have to capature success and failure status of the processor .So i have avoided not clone the success relationship twice.
6. Where do the "failure" FlowFiles get introduced in to this dataflow? --- If i encounter "failure" in process of pushing files to HDFS like permission denied or folder not available . Then i will add attribute with some custom messages and send to merge content . And i have also dirceting success status with some custom message of the final process success status in attribute to replacetext followed with Mergecontent .
Status flow
HDFSError attribute :
HDFS Successattribute :
After merge content i do use Replacetext processor as suggested to add overall status of the file but somehow the status (error) and message is not captured .
ReplaceTextProc to construct over all status :
The final file will contain like below
Ingest_flow.zip : Success : test1.csv : Success : File artikelgroep_info.csv pused to PreRAW Zone test2.csv : Success : File demo.csv pused to PreRAW Zone test3.csv : Success : File work11.csv pused to PreRAW Zone
i could not populate over all message AND if any file error then i could not capture status " Failed" and with error in overall status of the .zip file .Could you please help on this
Thanks
... View more
12-26-2020
09:40 PM
Hi All, I am building Nifi flow which fetch the filename.zip from shared server and unpack the .zip file then distributes the files across nifi cluster and finally put the files in HDFS. By doing this process , i am collecting success or failure status of each processors using custom message in Updateattribute processor . Refer the sample attached screen-print for updateattribute processor . Next i am planning to update overall status(success or error) of .zip file along with each file processed status ,like combining all information into one file and push the file to shared server to know about the status. I tried to use Mergecontent processor but i am unable to update the .zip file status and also noticed that if there is a delay in processing How to build the flowfile like below Filename.zip:staus:error_message Filename1.status:sucess_message Filename2:status:success_message Filename3:status:error_message Going forward i may also update the status message in JSON @Nifi @NifiDev
... View more
Labels:
- Labels:
-
Apache NiFi
- « Previous
- Next »