0

我正在尝试在 Mac 上的 IntelliJ-IDE 上使用 Spark 2.4 读取一个简单的 csv 文件 Azure Data Lake Storage V2

下面的代码

package com.example

import org.apache.spark.SparkConf
import org.apache.spark.sql._



object Test extends App {

  val appName: String = "DataExtract"
  val master: String = "local[*]"
  val sparkConf: SparkConf = new SparkConf()
    .setAppName(appName)
    .setMaster(master)
    .set("spark.scheduler.mode", "FAIR")
    .set("spark.sql.session.timeZone", "UTC")
    .set("spark.sql.shuffle.partitions", "32")
    .set("fs.defaultFS", "abfs://development@xyz.dfs.core.windows.net/")
    .set("fs.azure.account.key.xyz.dfs.core.windows.net", "~~key~~")


  val spark: SparkSession = SparkSession
    .builder()
    .config(sparkConf)
    .getOrCreate()
  spark.time(run(spark))


def run(spark: SparkSession): Unit = {

  val df = spark.read.csv("abfs://development@xyz.dfs.core.windows.net/development/sales.csv")
  df.show(10)

}

}

它能够读取并抛出安全异常

Exception in thread "main" java.lang.NullPointerException
    at org.wildfly.openssl.CipherSuiteConverter.toJava(CipherSuiteConverter.java:284)
    at org.wildfly.openssl.OpenSSLEngine.toJavaCipherSuite(OpenSSLEngine.java:1094)
    at org.wildfly.openssl.OpenSSLEngine.getEnabledCipherSuites(OpenSSLEngine.java:729)
    at org.wildfly.openssl.OpenSSLContextSPI.getCiphers(OpenSSLContextSPI.java:333)
    at org.wildfly.openssl.OpenSSLContextSPI$1.getSupportedCipherSuites(OpenSSLContextSPI.java:365)
    at org.apache.hadoop.fs.azurebfs.utils.SSLSocketFactoryEx.<init>(SSLSocketFactoryEx.java:105)
    at org.apache.hadoop.fs.azurebfs.utils.SSLSocketFactoryEx.initializeDefaultFactory(SSLSocketFactoryEx.java:72)
    at org.apache.hadoop.fs.azurebfs.services.AbfsClient.<init>(AbfsClient.java:79)
    at org.apache.hadoop.fs.azurebfs.AzureBlobFileSystemStore.initializeClient(AzureBlobFileSystemStore.java:817)
    at org.apache.hadoop.fs.azurebfs.AzureBlobFileSystemStore.<init>(AzureBlobFileSystemStore.java:149)
    at org.apache.hadoop.fs.azurebfs.AzureBlobFileSystem.initialize(AzureBlobFileSystem.java:108)

任何人都可以帮助我,这是什么错误?

4

1 回答 1

1

根据我的研究,当您的 jar 与 hadoop 版本不兼容时,您将收到此错误消息。

我会请您仔细阅读以下问题:

http://mail-archives.apache.org/mod_mbox/spark-issues/201907.mbox/%3CJIRA.13243325.1562321895000.591499.1562323440292@Atlassian.JIRA%3E

https://issues.apache.org/jira/browse/HADOOP-16410

于 2020-08-07T07:59:28.057 回答