【问题标题】:Azure ADLS Gen2 file created by Azure Databricks doesn't inherit ACLAzure Databricks 创建的 Azure ADLS Gen2 文件不继承 ACL
【发布时间】:2022-01-13 06:51:12
【问题描述】:

我有一个数据块笔记本,它正在将数据帧写入 ADLS Gen2 存储中的文件。

它创建一个临时文件夹,输出文件,然后将该文件复制到一个永久文件夹。由于某种原因,该文件没有正确继承 ACL。它创建的文件夹具有正确的 ACL。

笔记本的代码:

#Get data into dataframe
df_export = spark.sql(SQL)

# OUTPUT file to temp directory coalesce(1) creates a single output data file
(df_export.coalesce(1).write.format("parquet")
.mode("overwrite")
.save(TempFolder))

#get the parquet file name.  It's always the last in the folder as the other files are created starting with _
file = dbutils.fs.ls(TempFolder)[-1][0]

#create permanent copy
dbutils.fs.cp(file,FullPath)

为相关帐户创建的临时文件夹显示以下内容。

文件显示以下内容。

还有一个面具。我对面具不是很熟悉,所以不知道这有什么不同。

文件夹的屏蔽权限显示

在文件上显示为

有谁知道为什么这不会从父文件夹继承 ACL?

【问题讨论】:

    标签: acl azure-databricks azure-data-lake-gen2


    【解决方案1】:

    我已收到 Microsoft 支持部门的回复,已为我解决了此问题。

    原因:Databricks 存储的文件将 Service 主体作为具有权限 -rw-r--r-- 的文件的所有者,因此强制 ADLS 中其余批处理用户的有效权限从 rwx(目录权限)变为 r- - 这反过来会导致作业失败

    解决方案:要解决此问题,我们需要在 Databricks 端将默认掩码 (022) 更改为自定义掩码 (000)。您可以在集群配置下的 Spark 配置设置中进行以下设置: spark.hadoop.fs.permissions.umask-mode 000

    【讨论】:

      猜你喜欢
      • 2020-08-09
      • 2021-11-25
      • 2020-09-15
      • 2022-01-18
      • 2020-03-23
      • 1970-01-01
      • 2020-02-01
      • 2021-08-03
      • 1970-01-01
      相关资源
      最近更新 更多