在Azure Blob存储中生成ZIP文件 [英] Generating ZIP files in azure blob storage
问题描述
压缩AZ blob存储中存在的大文件并将其下载到存档文件中的最佳方法是什么(zip/rar)使用天蓝色批次可以帮助吗?当前,我们以传统方式实现此功能,我们读取流以生成zip文件并返回结果,但这会占用服务器上的大量资源和用户时间.我在询问最佳的技术解决方案(使用Microsoft技术的首选方式)
What is the best method to zip large files present in AZ blob storage and download them to the user in an archive file (zip/rar) does using azure batch can help ? currently we implement this functions in a traditionally way , we read stream generate zip file and return the result but this take many resources on the server and time for users. i'am asking about the best technical and technologies solution (preferred way using Microsoft techs)
推荐答案
只有几种方法可以从仅蔚蓝色的批处理角度实现此 ****
:( 最初的部分用户代码应该拥有他们用来压缩文件的任何zip API, 但是一旦它位于Blob中并且用户想要在节点中使用,那么下面就会提到这些选项.)
There are few ways you can do this **from azure-batch only point of view**
: (for the initial part user code should own whatever zip api they use to zip their files but once it is in blob and user want to use in the nodes then there are options mentioned below.)
对于您的问题的最初部分,我发现这可能很方便: https://microsoft.github.io/AzureTipsAndTricks/blog/tip141.html (但这主要是出于想法的缘故,您将更好地了解+需要相应地设计解决方案空间)
For initial part of your question I found this which could come handy: https://microsoft.github.io/AzureTipsAndTricks/blog/tip141.html (but this is mainly from idea sake and you will know better + need to design you solution space accordingly)
在下面的选项1和3中,需要确保您的用户代码可以处理解压缩或解压缩zip文件的操作.选项2是池级别和任务级别的 *.zip
文件的批处理内置功能.
In option 1 and 3 below you need to make sure you user code handle the unzip or unpacking the zip file. Option 2 is the batch built-in feature for *.zip
file both at pool and task level.
-
选项1 :您可以将
* rar或* zip
文件作为azure批处理资源文件
添加,然后解压缩在开始任务级别,一旦下载资源文件. Azure批处理池启动任务从Blob FileShare下载资源文件
Option 1: You could have your
*rar or *zip
file added asazure batch resource files
and then unzip them at the start task level, once resource file is downloaded. Azure Batch Pool Start up task to download resource file from Blob FileShare
选项2 :如果您在播放中具有 zip
但没有rar 文件,则最好的选择是此功能,名为 Azure批处理应用程序包
链接在这里: https://docs.microsoft.com/zh-CN/azure/batch/batch-application-packages
Option 2: The best opiton if you have zip
but not rar file in the play is this feature named Azure batch applicaiton package
link here : https://docs.microsoft.com/en-us/azure/batch/batch-application-packages
Azure Batch的应用程序包功能可轻松实现任务应用程序的管理及其在计算中的部署池中的节点.使用应用程序包,您可以上传和管理您的任务运行的应用程序的多个版本,包括他们的支持文件.然后,您可以自动部署一个或多个这些应用程序连接到池中的计算节点.
The application packages feature of Azure Batch provides easy management of task applications and their deployment to the compute nodes in your pool. With application packages, you can upload and manage multiple versions of the applications your tasks run, including their supporting files. You can then automatically deploy one or more of these applications to the compute nodes in your pool.
- https://docs.microsoft.com/zh-CN/azure/batch/batch-application-packages#application-packages
-
关于大小:请参考上面文档中的blob链接中允许的最大值.
With regards to the size: refer to the max allowed in blob link in the document above.
选项3 :(不确定是否适合您的方案)您的特定方案远景,但您也可以在连接池
Option 3: (Not sure if this will fit your scenario) Long shot for your specific scenario but you could also mount virtual blob to the drive at join pool via mount feature in azure batch and you need to write code at start task or some thing to unzip from the mounted location.
希望这对
:)
这篇关于在Azure Blob存储中生成ZIP文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
应用程序包是一个.zip文件,其中包含您需要的应用程序二进制文件和支持文件运行应用程序的任务.每个应用程序包代表一个该应用程序的特定版本.
An application package is a .zip file that contains the application binaries and supporting files that are required for your tasks to run the application. Each application package represents a specific version of the application.