Member since
04-03-2019
38
Posts
68
Kudos Received
5
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
1475 | 11-03-2017 06:11 PM | |
1164 | 02-09-2017 11:24 PM | |
3048 | 02-06-2017 12:54 PM | |
3842 | 01-04-2017 02:49 PM | |
3031 | 02-17-2016 09:49 AM |
06-26-2018
07:43 AM
@Bhushan Kandalkar - what do you see in Ranger logs for the same timeframe?
... View more
06-25-2018
05:39 PM
@Bhushan Kandalkar Is the Test Connection for Ranger NiFi repo working fine?
... View more
03-09-2018
09:48 PM
Hi @Josh Nicholson, On ambari server node, can you check what is present in below file? /var/lib/ambari-server/resources/mpacks/hdf-ambari-mpack-3.0.1.0-43/stacks/HDF/3.0/services/NIFI/metainfo.xml Also, in Ambari DB you may need to check output of below query: select version_xml from repo_version; If both point to NiFi version as 1.2.0 then we will have to update metainfo.xml and also the repo_version table.
... View more
11-03-2017
06:11 PM
Hi @Sammy Gold Do you have Namenode HA enabled in your HDP cluster? Looks like it is looking for namespace of Namenode HA. Can you please pass hdfs-site.xml and core-site.xml as well alongwith hive-site.xml in PutHiveStreaming "Hive Configuration Resources" property?
... View more
10-05-2017
03:32 PM
Hi @Arun A K This is a known issue where the datatypes are not preserved. https://issues.apache.org/jira/browse/NIFI-2624 which talks about Oracle/SQL datatypes not being preserved. You should also check out https://gist.github.com/ijokarumawak/69b29fa7b11c2ada656823db614af373 As mentioned by @Karthik Narayanan, best approach would be to use Record Oriented processors.
... View more
06-30-2017
11:41 PM
8 Kudos
You can execute any shell script using ExecuteProcess Processor in Nifi. For example I have a very simple shell script below which writes "Hello world" to a file.
... View more
Labels:
06-30-2017
11:32 PM
8 Kudos
For non-SSL enabled NiFi below should work:
curl --tlsv1.2 -i -H
'Content-Type: application/json' -XPUT -d
'{"id":"cdb54c9a-0158-1000-5566-c45ca9692f85","state":"RUNNING"}'
localhost:8080/nifi-api/flow/process-groups/cdb54c9a-0158-1000-5566-c45ca9692f85
Start Process Group for SSL enabled NiFi :
Generate access token:
[root@nifi-ambari-01
~]# curl --tlsv1.2 https://000.00.00.000:9091/nifi-api/access/token
--data 'username=awadhwani&password=password' -k
O/P:
eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJjbj1BcnRpIFdhZGh3YW5pLG91PVBlb3BsZSxkYz1zbWUsZGM9aHd4IiwiaXNzIjoiTGRhcFByb3ZpZGVyIiwiYXVkIjoiTGRhcFByb3ZpZGVyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiQXJ0aSBXYWRod2FuaSIsImtpZCI6MywiZXhwIjoxNDg5MjMyNDQyLCJpYXQiOjE0ODkxODkyNDJ9.17iHL3XX7Bw6dXv5lCByimu_asQOaSwW11o2IQEFO0s[root@nifi-ambari-01~]#
Start PG by passing the above access token
[root@nifi-ambari-01
~]# curl --tlsv1.2 -ik -H 'Content-Type: application/json' -H 'Authorization:
Bearer
eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJjbj1BcnRpIFdhZGh3YW5pLG91PVBlb3BsZSxkYz1zbWUsZGM9aHd4IiwiaXNzIjoiTGRhcFByb3ZpZGVyIiwiYXVkIjoiTGRhcFByb3ZpZGVyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiQXJ0aSBXYWRod2FuaSIsImtpZCI6MywiZXhwIjoxNDg5MjMyNDQyLCJpYXQiOjE0ODkxODkyNDJ9.17iHL3XX7Bw6dXv5lCByimu_asQOaSwW11o2IQEFO0s'
-XPUT -d
'{"id":"2f092b07-0157-1000-0000-00005f526fbc","state":"RUNNING"}'
https://000.00.00.000:9091/nifi-api/flow/process-groups/2f092b07-0157-1000-0000-00005f526fbc
O/P:
HTTP/1.1 200 OKDate: Fri, 10 Mar
2017 23:42:14 GMTServer:
Jetty(9.3.9.v20160517)Cache-Control:
private, no-cache, no-store, no-transformX-ProxiedEntitiesAccepted:
trueDate: Fri, 10 Mar
2017 23:42:14 GMTContent-Type:
application/jsonContent-Length: 63{"id":"2f092b07-0157-1000-0000-00005f526fbc","state":"RUNNING"}[root@nifi-ambari-01
~]#
Earlier before starting:
After starting:
Stop process Group for SSL enabled NiFi :
(use the same token generated above)
[root@nifi-ambari-01
~]# curl --tlsv1.2 -ik -H 'Content-Type: application/json' -H 'Authorization:
Bearer
eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJjbj1BcnRpIFdhZGh3YW5pLG91PVBlb3BsZSxkYz1zbWUsZGM9aHd4IiwiaXNzIjoiTGRhcFByb3ZpZGVyIiwiYXVkIjoiTGRhcFByb3ZpZGVyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiQXJ0aSBXYWRod2FuaSIsImtpZCI6MywiZXhwIjoxNDg5MjMyNDQyLCJpYXQiOjE0ODkxODkyNDJ9.17iHL3XX7Bw6dXv5lCByimu_asQOaSwW11o2IQEFO0s'
-XPUT -d
'{"id":"2f092b07-0157-1000-0000-00005f526fbc","state":"STOPPED"}'
https://000.00.00.000:9091/nifi-api/flow/process-groups/2f092b07-0157-1000-0000-00005f526fbc
HTTP/1.1 200 OKDate: Fri, 10 Mar
2017 23:42:46 GMTServer:
Jetty(9.3.9.v20160517)Cache-Control:
private, no-cache, no-store, no-transformX-ProxiedEntitiesAccepted:
trueDate: Fri, 10 Mar
2017 23:42:46 GMTContent-Type:
application/jsonContent-Length: 63{"id":"2f092b07-0157-1000-0000-00005f526fbc","state":"STOPPED"}[root@nifi-ambari-01
~]
Earlier before stopping:
After stopping:
... View more
Labels:
06-30-2017
11:09 PM
6 Kudos
While designing your flow, one will think of handling failures as well. Some may ignore (terminate) it while some may want to analyze their failed flow files.
You can view/download any flowfile in the connection via NiFi UI. However if there are multiple flowfiles then this becomes little tedious since you have to do it for each flowfile. .
In that case, I used below flow to put all failed flow files to a temp location on my nifi node and then access it from there for further analysis. In this I am generating random 2B text file and passing it to FTP server. If FTP server is unreachable it will put all flow files to failure/reject queue. You can list all files in this queue. I have viewed one such file in image below. Then all these files are passed to PutFile processor which is configured to write all the files it receives to /tmp/test location on the nifi node.
Please note: There could be multiple ways to do this. This is the approach used by me to quickly download all failed flow files in my flow. download-failed-flowfiles-2.png download-failed-flowfiles-3.png download-failed-flowfiles-4.png download-failed-flowfiles-5.png
... View more
Labels:
06-30-2017
10:27 PM
11 Kudos
Using NiFi REST API for unsecured cluster is straight-forward like below: [root@<nifi-host> ~]# curl -v -X GET http://<nifi-host>:<port>/nifi-api/flow/current-user
* About to connect() to <nifi-host> port <port> (#0)
* Trying <IP address>...
* Connected to <nifi-host> (<IP address>) port <port> (#0)
> GET /nifi-api/flow/current-user HTTP/1.1
> User-Agent: curl/7.29.0
> Host: <nifi-host>:<port>
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Fri, 30 Jun 2017 22:15:09 GMT
< X-Frame-Options: SAMEORIGIN
< X-Frame-Options: SAMEORIGIN
< X-Frame-Options: SAMEORIGIN
< Cache-Control: private, no-cache, no-store, no-transform
< Server: Jetty(9.4.3.v20170317)
< Vary: Accept-Encoding, User-Agent
< Date: Fri, 30 Jun 2017 22:15:09 GMT
< Date: Fri, 30 Jun 2017 22:15:09 GMT
< Content-Type: application/json
< Content-Length: 439
<
* Connection #0 to host <nifi-host> left intact
{"identity":"anonymous","anonymous":true,"provenancePermissions":{"canRead":true,"canWrite":true},"countersPermissions":{"canRead":true,"canWrite":true},"tenantsPermissions":{"canRead":true,"canWrite":true},"controllerPermissions":{"canRead":true,"canWrite":true},"policiesPermissions":{"canRead":true,"canWrite":true},"systemPermissions":{"canRead":true,"canWrite":true},"restrictedComponentsPermissions":{"canRead":true,"canWrite":true}} However if this cluster is using Kerberos for authentication then the curl call will need a Kerberos authentication token as below: First do a kinit (using appropriate keytab/principal) on the nifi node you are logged into. Now get a token using below API call: token=`curl -k -X POST --negotiate -u : https://<nifi-node>:<port>/nifi-api/access/kerberos` Second you need to pass above generated token to the actual API call: curl -k --header "Authorization: Bearer $token" https://<nifi-host>:<port>/nifi-api/flow/cluster/summary
... View more
Labels:
06-30-2017
10:03 PM
7 Kudos
This is a known issue https://issues.apache.org/jira/browse/NIFI-3800 which is fixed in Apache NiFi 1.2.0 (HDF 2.1.4 and later) Workaround:
You can downgrade your Java version to openjdk-1.8.0_121 if you are using something higher than that.
... View more
Labels: