Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Not able to configure Ranger plugin for Nifi

Re: Not able to configure Ranger plugin for Nifi

After re-installing hdf-select, i am getting the below error while setting the nifi version:-

 

[root@nladfmrvu12 ~]#
[root@nladfmrvu12 ~]# hdf-select
File "/bin/hdf-select", line 216
print "ERROR: Invalid package - " + name
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("ERROR: Invalid package - " + name)?
[root@nladfmrvu12 ~]#
[root@nladfmrvu12 ~]#
[root@nladfmrvu12 ~]# hdf-select set nifi 3.3.1.0-10
File "/bin/hdf-select", line 216
print "ERROR: Invalid package - " + name
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("ERROR: Invalid package - " + name)?
[root@nladfmrvu12 ~]#

Highlighted

Re: Not able to configure Ranger plugin for Nifi

Super Mentor

@pritam_konar 

Your latest error is :

 

[root@nladfmrvu12 ~]# hdf-select
File "/bin/hdf-select", line 216
print "ERROR: Invalid package - " + name
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("ERROR: Invalid package - " + name)?

 

This indicates that you are using "Python3" which needs the print statements to be inside parentheses. 

You should be using Python 2.7.x to avoid this error OR you will have to manually update the hdf-select  script to change all 'print' statements with 'print()'

Example:

 

Old: print "The answer is", 2*2
New: print("The answer is", 2*2)

 

You can see this behaviour change in Python3 in the following doc: https://docs.python.org/3/whatsnew/3.0.html

 

The print statement has been replaced with a print() function, with keyword arguments to replace most of the special syntax of the old print statement (PEP 3105).

 

.

.

 

If your question is answered then, Please make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

 

Better to add new Community Topic/Threads for completely unrelated errors that way it helps more users.

Re: Not able to configure Ranger plugin for Nifi

Explorer

Could you share the nifi log under 

/var/log/nifi/