Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql 通过证书文件从hadoop连接到Postgres_Postgresql_Apache Spark_Hadoop - Fatal编程技术网

Postgresql 通过证书文件从hadoop连接到Postgres

Postgresql 通过证书文件从hadoop连接到Postgres,postgresql,apache-spark,hadoop,Postgresql,Apache Spark,Hadoop,我想通过证书文件(client.crt、root.crt、client.key.der)从spark作业(在Thread上启动)连接到postgres,但我遇到了这个问题,我在Thread日志中找到了它: “无法打开SSL证书文件/hdfsPath/../client.crt。” 这是我的代码: val props = new Properties() props.put("user", userPostgres) props.put("driver",

我想通过证书文件(client.crt、root.crt、client.key.der)从spark作业(在Thread上启动)连接到postgres,但我遇到了这个问题,我在Thread日志中找到了它: “无法打开SSL证书文件/hdfsPath/../client.crt。” 这是我的代码:

val props = new Properties()
props.put("user", userPostgres)
props.put("driver", driverOfPostgres)
props.setProperty("ssl", "true")
props.setProperty("sslmode", "Require")
props.setProperty("sslkey", hdfsPath/client.key.der)
props.setProperty("sslcert", hdfsPath/client.crt)
props.setProperty("sslrootcert", hdfsPath/root.crt)

也许用户缺少权限?