Я пытаюсь прочитать данные из Verticausing SparklyR. Spark Context создается с использованием livy. Vertica нужны два файла JAR для своего драйвера и разъема. вот код Однако банки не загружаются в контекст искры. Итак, ошибка класса vertica выскакивает.
ver_jars <- c("wasbs://[path]/vertica-jdbc-9.3.0-0.jar",
"wasbs://[path]/vetica-9.0.1-spark2.1_scala2.11.jar"
)
spark_conf <- spark_config()
spark_conf$spark.executor.instances <- 3
spark_conf$spark.dynamicAllocation.enabled <- "false"
spark_conf$livy.jars <- ver_jars
#spark_conf$spark.jars <- ver_jars # no sucess with this also
livy_conf <- livy_config(config = spark_conf, user = "user", password = "pass" )
sc <- spark_connect(master = "https://mycluster.azurehdinsight.net/livy/",
method = "livy",
config = livy_conf,
version= "2.4.0"
)
ds <- spark_read_jdbc(sc, "myquery", repartition = 200, options = list(
url = "jdbc:vertica://url:5433/",
driver = 'com.vertica.spark.datasource.DefaultSource',
user = "user",
password = "pass",
dbtable = paste0("(",sql, ")","as this_ds"))
)
Ошибка
at scala.reflect.internal.util.AbstractFileClassLoader.findClass(AbstractFileClassLoader.scala:62)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at org.apache.spark.sql.execution.datasources.jdbc.DriverRegistry$.register(DriverRegistry.scala:45)
at org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions$$anonfun$5.apply(JDBCOptions.scala:99)
at org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions$$anonfun$5.apply(JDBCOptions.scala:99)
at scala.Option.foreach(Option.scala:257)
at org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions.<init>(JDBCOptions.scala:99)
at org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions.<init>(JDBCOptions.scala:35)
at org.apache.spark.sql.execution.datasources.jdbc.JdbcRelationProvider.createRelation(JdbcRelationProvider.scala:32)
at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:318)
at org.apache.spark.sql.DataFrameReader.loadV1Source(DataFrameReader.scala:223)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:211)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:167)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)```