Azure Databricks-接收错误检测到Zip炸弹!该文件将超过压缩文件大小与扩展数据大小的最大比率



我已经通过了许多链接来解决这个问题。然而,没有人帮助我。主要是因为我在Azure Databricks上遇到了这个错误。

我正在尝试读取位于ADLS Curated区域的Excel文件。大约有25个excel文件。我的程序循环遍历excel文件,并将它们读取到PySpark数据框架中。然而,在阅读了大约9个excel文件后,我收到了以下错误-

Py4JJavaError: An error occurred while calling o1481.load.
: java.io.IOException: Zip bomb detected! The file would exceed the max. ratio of compressed file size to the size of the expanded data.
This may indicate that the file is used to inflate memory usage and thus could pose a security risk.
You can adjust this limit via ZipSecureFile.setMinInflateRatio() if you need to work with files which exceed this limit.
Uncompressed size: 6111064, Raw/compressed size: 61100, ratio: 0.009998

我安装了maven-org.apache.poi.openxml4j,但当我尝试使用下面的简单import语句调用它时,我收到了错误";没有名为"org"的模块;导入org.apache.poi.openxml4j.util.ZipSecureFile

有人知道如何在Azure Databricks中将ZipSecureFile.setMin充气比率((设置为0吗?

谨致问候,Sree

;检测到拉链炸弹";如果展开的文件与Apache jar中的默认Min充气比率集交叉,则会发生异常。Apache包含一个名为Min充气比率的设置,该设置可通过ZipSecureFile.setMin充气比率((进行配置;默认情况下,这将设置为0.0,以允许使用大文件。

在POI中检出已知问题:https://bz.apache.org/bugzilla/show_bug.cgi?id=58499

最新更新