Member since
02-24-2025
10
Posts
0
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
1007 | 04-24-2025 09:39 PM |
04-28-2025
10:40 PM
@joseomjr your code could not work at my end. ChatGPT help me with below code and it is working at my end. import java.util.zip.ZipInputStream
import java.util.zip.ZipEntry
import java.io.ByteArrayOutputStream
def flowFile = session.get()
if (!flowFile) return
try {
session.read(flowFile, { inputStream ->
ZipInputStream zipIn = new ZipInputStream(inputStream)
ZipEntry entry = zipIn.nextEntry
while (entry != null) {
if (!entry.isDirectory()) {
ByteArrayOutputStream baos = new ByteArrayOutputStream()
byte[] buffer = new byte[8192]
int len
while ((len = zipIn.read(buffer)) > 0) {
baos.write(buffer, 0, len)
}
def contentBytes = baos.toByteArray()
def newFlowFile = session.create(flowFile)
newFlowFile = session.write(newFlowFile, { outStream ->
outStream.write(contentBytes)
} as OutputStreamCallback)
newFlowFile = session.putAttribute(newFlowFile, 'filename', entry.getName())
session.transfer(newFlowFile, REL_SUCCESS)
}
zipIn.closeEntry()
entry = zipIn.nextEntry
}
} as InputStreamCallback)
session.remove(flowFile)
} catch (Exception e) {
log.error("Failed to unzip FlowFile due to: ${e.message}", e)
session.transfer(flowFile, REL_FAILURE)
} I hope there is no security concern with this code!
... View more
04-24-2025
09:39 PM
@hott In my case having different process groups help me to set different triggers, manage queue more efficiently (by storing flow file temporally to save RAM or backpressure ). This is required in my case to compete set of process fully before it start next set of process.
... View more
04-24-2025
09:33 PM
Hello Bern, I could not able to see log file. Thanks.
... View more
04-24-2025
07:42 PM
Thank you @MattWho . I try third option first but it was not working at my side. Nifi shuts down saying no keystore file found. but second option works well for me. Thanks, I have also found below article where it explain how to change certificate https://www.linkedin.com/pulse/configuring-ssltls-authentication-apache-nifi-dhruv-sahu/ https://www.youtube.com/watch?v=9F6DnsD8TSo
... View more
04-22-2025
06:54 PM
Hello, I need help to renew validity of web certificate for Nifi. It is for local host and Nifi2.0.0-M4 Please refer below screenshot. Thanks & Regards, Gaurav Mahajan
... View more
Labels:
- Labels:
-
Apache NiFi
04-21-2025
06:19 PM
Thanks @MattWho for detailed replay. There are few set of processes which required to active only if those are required by another processes which is a rare event, but important run those on time. If i removed all credentials and methods to access it with "http". If goes to No retry. Below is the InvokeHTTP configuration Next i try with StandardRestrictedSSLContextService. I use details from nifi.properties to configure service. use same details to configure service but it is till goes to No retry. Here URL is ="https://localhost:8443/nifi-api/flow/process-groups/11d11155-1f75-15c9-4802-91f2b21aec2e" and passing payload ={"id":"11d11156-1f75-15c9-6843-a34f61aff12d","state":"RUNNING"} Please do share if you have any working example link Thank you.
... View more
04-21-2025
04:25 AM
Hello Team, I am looking to control processers from NiFi iteslf. I learn that can be possible with Nifi Rest Api. But i am not able to connect api with InvokeHTTP processor. I am using NIFI 2.0.0-M4 There are multiple post/articles available on internet but unfortunately those are showing and talking about old version of these processor. At first I have tried to access it with StandardSSLContextService2.0.0-M4 by saving certificate and then use it from java keystore Then i tried to remove SSL certificate and disable all remote securities to push Nifi with "http". Here i tried with StandardOauth2AccessTokenProvider 2.0.0-M4. but it is still showing below error If you could comment on this, it will be appreciated Or at least Please guide me with some latest tutorials/articles to understand this latest processors. Thank you,
... View more
Labels:
- Labels:
-
Apache NiFi
02-26-2025
12:31 PM
Thank you @MattWho . Thanks for brief explanation. I understand the loop is causing large number of queue. Let me redesign the flow. Thanks !
... View more
02-24-2025
12:17 PM
Can you please share absolute path details? I am guessing error in that string statement.
... View more
02-24-2025
12:10 PM
Hello, i am using ScriptedFilterRecord to filter empty records for one of the record filed. It is working as expected but when i try to push same records to QueryRecord to get list down those ids. NIFi push different set of records to query record processor. Please refer attached screenshot. Thank you.
... View more
Labels:
- Labels:
-
Apache NiFi