1
操作系统:CentOS的火花和AWS红移:java.sql.SQLException中:红移://xxx.us-west-2.redshift.amazonaws.com:5439
火花:1.6找到JDBC没有合适的驱动程序0.1
SBT:build.sbt
libraryDependencies ++= {
Seq(
"org.apache.spark" %% "spark-core" % "1.6.1" % "provided",
"com.amazonaws" % "aws-java-sdk" % "1.10.75",
"com.amazonaws" % "amazon-kinesis-client" % "1.1.0",
"com.amazon.redshift" % "jdbc4" % "1.1.7.1007" % "test"
)
}
resolvers ++= Seq(
"redshift" at "https://s3.amazonaws.com/redshift-downloads/drivers/RedshiftJDBC4-1.1.7.1007.jar"
)
火花应用:
val redshiftDriver = "com.amazon.redshift.jdbc4.Driver"
Class.forName(redshiftDriver)
我指定的红移驱动程序,并更新到网址等。,以下AWS官方文档在这里:http://docs.aws.amazon.com/redshift/latest/mgmt/connecting-in-code.html
但我仍然得到以下错误:
java.sql.SQLException: No suitable driver found for jdbc:redshift://xxx.us-west-2.redshift.amazonaws.com:5439
我一派,有人说瓶子应该被加入到classpath中?任何人都可以帮忙吗?非常感谢您