如何在没有数据块的情况下“挂载” Data Lake Gen 1

问题描述

我们有要在kubernetes中运行的pyspark代码。它应该从数据湖第1代存储中提取数据。现在,我了解到要在Databricks中访问数据湖中的文件,应该首先安装它。我想问一下是否:a。可能b。)采取什么方法

解决方法

我发现最简单的方法是遵循Apache Hadoop中的this documentation。确保将正确的JAR下载到您的类路径中。

您将需要使用ClientCredential和OAuth2(我将私有信息替换为xxxx)在hadoop core-site.xml文件中设置各种参数,示例如下:

<configuration>
  <property>
      <name>fs.adl.oauth2.access.token.provider.type</name>
      <value>ClientCredential</value>
  </property>

  <property>
      <name>fs.adl.oauth2.refresh.url</name>
      <value>https://login.microsoftonline.com/xxxx/oauth2/token</value>
  </property>

  <property>
      <name>fs.adl.oauth2.client.id</name>
      <value>xxxx</value>
  </property>

  <property>
      <name>fs.adl.oauth2.credential</name>
      <value>xxxx</value>
  </property>
</configuration>