spark cassandra连接器无法读取hdfs中ssl信任存储文件

bq8i3lrv  于 2023-05-27  发布在  HDFS
关注(0)|答案(1)|浏览(296)

我正在尝试在Spark和Cassandra之间配置SSL。为trustStore传递本地文件路径可以工作,而传递HDFS filepath则不起作用。它在Yarn clientcluster mode中抛出错误File Not Found

sparkConf.set("spark.cassandra.connection.ssl.enabled", "true");
sparkConf.set("spark.cassandra.connection.ssl.trustStore.password", "password");
sparkConf.set("spark.cassandra.connection.ssl.trustStore.path", "jks file path");

知道为什么会这样吗相同的文件通过sc.textfile()工作。

Exception:
About to save to Cassandra.16/07/22 08:56:55 ERROR org.apache.spark.streaming.scheduler.JobScheduler: Error running job streaming job 1469177810000 ms.0 
java.io.FileNotFoundException: hdfs:/abc/ssl.jks (No such file or directory) 
at java.io.FileInputStream.open0(Native Method)

谢谢
荷马

whlutmcx

whlutmcx1#

发生这种情况是因为SSL参数被不了解HDFS的Java驱动程序使用。您需要将每个节点的truststore和keystore放在同一个位置,并在配置参数中指定它。
我将把这个问题标记给开发人员

相关问题