如果我有以下类型的impala连接,我还可以使用SquirreL SQL:
self.impala_con = connect(host='sql.edamame.com', port=25003, use_ssl=True, auth_mechanism="PLAIN",
user='edamame1', password='edamamePass')
以下是我在Squirrel中设置Alias的方法:
我在测试连接期间遇到以下错误:
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.sql.SQLException: [Simba][ImpalaJDBCDriver](500151) Error setting/closing session: Open Session Error.
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:206)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:132)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$100(OpenConnectionCommand.java:45)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$2.run(OpenConnectionCommand.java:115)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
更新
我也尝试过以下网址:
jdbc:impala://sql.edamame.com:25003/default;AuthMech=3;SSL=1
并获得以下新错误:
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.sql.SQLException: [Simba][ImpalaJDBCDriver](500310) Invalid operation: null;
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:206)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:132)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$100(OpenConnectionCommand.java:45)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$2.run(OpenConnectionCommand.java:115)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
我可能还缺少什么?谢谢!
答案 0 :(得分:-1)
简答:RTFM。
答案很长:Cloudera JDBC驱动程序附带了80多页PDF“安装和配置指南”。不要害羞,打开它。您可以直接转到附录A - 驱动程序配置并查看以下条目:
AuthMech 要使用的身份验证机制 将值设置为以下数字之一:为0表示无验证
1表示Kerberos
2表示用户名
3表示用户名和密码<强> SSL 强>
当此属性设置为1时,驱动程序通过启用SSL的套接字与Impala服务器通信。当此属性设置为0时,驱动程序不会连接到启用SSL的套接字。
因此,您的网址应该如下所示
jdbc:impala://blahblah:25003/default;AuthMech=3;SSL=1
还有一件事:要解决SSL握手问题,您可以使用此Java系统属性启用调试跟踪...
-Djavax.net.debug=ssl