Oracle 如何为Spark JDBC连接指定信任存储和信任存储类型
我是Spark的新手,目前我们正在使用Spark java从Oracle数据库创建orc文件。我能够配置与的连接Oracle 如何为Spark JDBC连接指定信任存储和信任存储类型,oracle,apache-spark,truststore,spark-jdbc,Oracle,Apache Spark,Truststore,Spark Jdbc,我是Spark的新手,目前我们正在使用Spark java从Oracle数据库创建orc文件。我能够配置与的连接 sqlContext.read().jdbc(url,table,props) 但是,我在属性中找不到任何方法来指定trustStore或trustStoreType。有人能帮我指定这些属性吗 我已经尝试将属性填充为 props.put("trustStore", "<PATH_TO_SSO>"); props.put("trustStoreType", "sso"
sqlContext.read().jdbc(url,table,props)
但是,我在属性中找不到任何方法来指定trustStore或trustStoreType。有人能帮我指定这些属性吗
我已经尝试将属性填充为
props.put("trustStore", "<PATH_TO_SSO>");
props.put("trustStoreType", "sso");
首先,属性是javax.net.ssl.trustStore
和javax.net.ssl.trustStoreType
第二个问题是,
trustStore
应该可以在每个executor节点上访问。从驱动程序访问它还不够。嗨,有什么进展吗?
oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:470)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:506)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:595)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:230)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1452)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:496)
... 23 more
Caused by: oracle.net.ns.NetException: Unable to initialize ssl context.
at oracle.net.nt.CustomSSLSocketFactory.getSSLSocketFactory(CustomSSLSocketFactory.java:325)
at oracle.net.nt.TcpsNTAdapter.connect(TcpsNTAdapter.java:117)
at oracle.net.nt.ConnOption.connect(ConnOption.java:159)
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:428)
... 28 more
Caused by: oracle.net.ns.NetException: Unable to initialize the trust store.
at oracle.net.nt.CustomSSLSocketFactory.getTrustManagerArray(CustomSSLSocketFactory.java:413)
at oracle.net.nt.CustomSSLSocketFactory.getSSLSocketFactory(CustomSSLSocketFactory.java:309)
... 31 more
Caused by: java.security.KeyStoreException: sso not found
at java.security.KeyStore.getInstance(KeyStore.java:851)
at oracle.net.nt.CustomSSLSocketFactory.getTrustManagerArray(CustomSSLSocketFactory.java:401)
... 32 more
Caused by: java.security.NoSuchAlgorithmException: sso KeyStore not available
at sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
at java.security.Security.getImpl(Security.java:695)
at java.security.KeyStore.getInstance(KeyStore.java:848)
... 33 more