Support Questions

Find answers, ask questions, and share your expertise

Nifi Unable to use Impala connection in the executor script processor,impala Jdbc connection failed

avatar
Explorer

Hi Team,

 I am unable to impala in the nifi executor, as i have to use impala using a jdbc connection by placing the impalajdbc41.jar in a customized location, and when restarted the nifi the jython script worked like a charm, however when using the nifi executor it says java class path not found, why is this causing the issue. Any leads would be appreciated

 

Regards

Khursheed

4 REPLIES 4

avatar
Community Manager

Hi! @mburgess @MattWho @SAMSAL Do you have any insights here? Thanks!


Regards,

Diana Torres,
Senior Community Moderator


Was your question answered? 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.
Learn more about the Cloudera Community:

avatar
Master Mentor

@Zainers 

Unfortunately I don't think there is enough information shared to make any suggestion here yet.

Could you share your exact NiFi version and more details around what you are trying to accomplish?  

Can you share the jython script you are using to restart NiFi?
When you say it does not work using the NiFi executor, What executor are you talking about? 
What NiFi processors are you using?
How are they configured?

Thank you,
Matt

avatar
Explorer

Dear Matt,

Thank you for the Followup,  This is the jython script tested in jython on of the Nifi nodes, using the central location for using the impala jar files, and nifi was restarted to pickup the jar class from the nar location as well the customized location readable by nifi,

and in jython it works fine, and in impala it fails. we are using nifi version 1.28.1.2.1.7


jython -J-cp "/data/01/Nifi_Scripts/Nifi_Nars/*"


from java.sql import DriverManager, SQLException
from java.lang import Class


# JDBC Connection
jdbc_url = ( "jdbc:impala://xxxxrodk08.kw.xxxx.com:21000/sandbox_bi;" "AuthMech=1;" "KrbRealm=CORP.xxx.COM.xxxx;" "KrbHostFQDN=xxxxxprodk08.sw.xxxxx.com;" "KrbServiceName=impala;" "SSL=1;" "SSLTrustStore=/var/lib/cloudera-scm-agent/agent-cert/cm-auto-global_cacerts.pem;" "SSLTrustStorePwd=xxxxxxxx" )
jdbc_driver = "com.cloudera.impala.jdbc41.Driver"
Class.forName(jdbc_driver)
conn = DriverManager.getConnection(jdbc_url)

Regards

 

 

avatar
Master Guru

Do you need the script or can you just configure a DBCPConnectionPool to point at the Impala JARs and the connection URL?

Also that version may have an ImpalaConnectionPool which already includes the driver and is easier to use to configure a connection to Impala.