繁体   English   中英

将 jars 添加到 great_expectations 的 spark 会话中

[英]Adding jars to the great_expectations' spark session

设置:

  • 我的数据位于 Azure ADLS Gen2
  • 我想使用great_expectations包来测试我的数据质量。
  • 我正在使用InferredAssetAzureDataConnector data_connector 创建我的数据源(这有效,我可以在创建过程中在 ADLS 上看到我的文件)。
  • 我正在尝试使用自动分析器通过数据创建一个测试套件。

我特别想知道如何将 jars 添加到 great_expectation 在运行自动分析器以创建测试套件时使用的 spark 会话的配置中。

该过程失败,因为我需要将org.apache.hadoop:hadoop-azure:3.3.1 jar 添加到 spark 会话中,以便 spark 作业能够访问和分析 ADLS 上的数据。

任何关于如何在 great_expectations 包的上下文中做的帮助表示赞赏。

错误信息:


Great Expectations will create a notebook, containing code cells that select from 
available columns in your dataset and generate expectations about them to demonstrate 
some examples of assertions you can make about your data.

When you run this notebook, Great Expectations will store these 
expectations in a new Expectation Suite "adls_test_suite_tmp" here:

  file://C:\Coding\...\great_expectations\expectations/adls_suite_tmp.json

Would you like to proceed? [Y/n]: Y

WARN FileStreamSink: Assume no metadata directory. 
    Error while looking for metadata directory in the path: 
    wasbs://<adls-container>@<adls-account>.blob.core.windows.net/test/myfile.csv

java.lang.RuntimeException: java.lang.ClassNotFoundException: 
    Class org.apache.hadoop.fs.azure.NativeAzureFileSystem$Secure not found

我通过将 jars 添加到spark-defaults.conf文件来半解决它,但我对这个肮脏的解决方案真的很不满意,因为系统上启动的任何 spark 作业现在都将包含 jar 包。 如果有人有更好的解决方案,请分享。

spark.jars.packages                 com.microsoft.azure:azure-storage:8.6.6,org.apache.hadoop:hadoop-azure:3.3.1

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM