Member since
08-26-2017
20
Posts
3
Kudos Received
0
Solutions
01-24-2019
01:47 PM
Once the file is corruputed, you cannot recover from this even after setting dfs.client.block.write.replace-datanode-on-failure.policy=NEVER and restarting HDFS. As a work-around, I created a copy of the file and removed the old one.
... View more
09-02-2018
09:50 AM
1 Kudo
Thanks!! These changes should be performed on all hosts
... View more
04-07-2018
04:53 AM
moved to comment Matt. Sorry about the confusion, just realized it 😛
... View more
04-06-2018
04:52 PM
Thanks @Matt Burgess for your reply and for sharing the link about registry. I would look into this. For the time being, we dont plan to do a upgrade of Nifi. Any work around that you would suggest in the interim ? EDIT : Shout out for @Matt Clarke
... View more
04-06-2018
11:18 AM
1 Kudo
Currently, every time I deploy a template from one environment to another (or edit something and upload to the same environment) , it deploys the controller services (even if they are already existing with the same name) onto the environment at the Process Group level. Would it be possible to reuse the existing controller services (DBCP connection pool for example) rather than creating a new one at the process group level everytime ? I have tried editing the xml and replaced the controller Node with pre-used Controller Node, but this does not help. Right now, as the Nifi Framework is growing, this task is becoming cumbersome and difficult to manage.
... View more
Labels:
- Labels:
-
Apache NiFi
12-07-2017
08:48 AM
As per the Nifi API documentation: GET
/process-groups/{groupId}/variable-registry/update-requests/{updateId}
Gets a process group's variable registry
DELETE
/process-groups/{groupId}/variable-registry/update-requests/{updateId}
Deletes an update request for a process group's variable registry. If the request is not yet complete, it will automatically be cancelled.
GET
/process-groups/{id}
Gets a process group
PUT
/process-groups/{id}
Updates a process group But, the call is /nifi-api/flow/process-groups. Any idea if this is a documentation issue ?
... View more
12-04-2017
01:37 AM
@Matt / @Peter, I have faced problems if incorrect input is passed to ExecuteScript processor and it would need some manual intervention to cleanup the 'buggy' flowFile. The job fails on Production and keeps retrying if we dont route the incorrect flowFile to FAILURE. I generally use try-catch strategy to move the incorrect flowFiles to FAILURE path and add the exception as a attribute that finally gets logged in nifi-app.log.
Modified example below using Peter's if construct-
if (flowFile!=None):
try:
reader = PyStreamCallback()
flowFile = session.write(flowFile,reader)
flowFile = session.putAttribute(flowFile,'ThisIsAnAttributeName',reader.thing())
session.transfer(flowFile, REL_SUCCESS)
except Exception as e:
attrMap = {}
attrMap["Script.Exception"] = e
session.putAllAttribute(flowFile,attrMap)
session.transfer(flowFile, REL_FAILURE)
... View more
11-16-2017
11:06 AM
For Python fans: class PyStreamCallback(StreamCallback):
def __init__(self,tmp_dir):
self.tmp_dir = tmp_dir
pass
def process(self, inputStream, outputStream):
# modified the input attribute of tmp_dir ,and writes it out
text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)
tmp_dir = self.tmp_dir + '_modified'
outputStream.write(bytearray(tmp_dir.encode('utf-8')))
flowFile = session.get()
if (flowFile != None):
tmp_dir = flowFile.getAttribute('tmp_dir')
flowFile = session.write(flowFile,PyStreamCallback(tmp_dir))
... View more
11-16-2017
10:54 AM
1 Kudo
@Matt Burgess You are a Saviour !! Thanks for this cookbook. This is Gold !!
... View more
11-07-2017
10:03 AM
I find nifi regex to have less options. The same regex ( [\.]conf ) in my case to find a configuration file works from outside Nifi. But on putting this pattern in Nifi ListHDFS processor , File Pattern will not match and the file is never pulled. Any idea why this would happen ?
... View more