azure-storage-blobs

Is it better to have many small Azure storage blob containers (each with some blobs) or one really large container with tons of blobs?

☆樱花仙子☆ 提交于 2019-11-26 19:32:47
问题 So the scenario is the following: I have a multiple instances of a web service that writes a blob of data to Azure Storage. I need to be able to group blobs into a container (or a virtual directory) depending on when it was received. Once in a while (every day at the worst) older blobs will get processed and then deleted. I have two options: Option 1 I make one container called "blobs" (for example) and then store all the blogs into that container. Each blob will use a directory style name

Add Cache-Control and Expires headers to Azure Storage Blobs

为君一笑 提交于 2019-11-26 19:29:02
问题 I'm using Azure Storage to serve up static file blobs but I'd like to add a Cache-Control and Expires header to the files/blobs when served up to reduce bandwidth costs. Application like CloudXplorer and Cerebrata's Cloud Storage Studio give options to set metadata properties on containers and blobs but get upset when trying to add Cache-Control. Anyone know if it's possible to set these headers for files? 回答1: I had to run a batch job on about 600k blobs and found 2 things that really helped

How to load list of Azure blob files recursively?

孤街醉人 提交于 2019-11-26 17:47:27
问题 Azure blob files are stored in a plain list without any physical folder structure, but we can create virtual folders where each file's folder path is a part of it's name. It brings out another problem, how to retrieve a list of ALL files in virtual sub-folder, using only that folder's name? 回答1: Actually, there's a simpler way to do that and it is available in the library itself. If you look at CloudBlobContainer.ListBlobs method, it accepts two parameters: prefix : This is the name of your

Azure Shared Access Signature - Signature did not match

五迷三道 提交于 2019-11-26 17:28:47
问题 I'm getting this error: <Error> <Code>AuthenticationFailed</Code> <Message> Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:6c3fc9a8-cdf6-4874-a141-10282b709022 Time:2014-07-30T10:48:43.8634735Z </Message> <AuthenticationErrorDetail> Signature did not match. String to sign used was rwl 2014-07-31T04:48:20Z /acoustie/$root 2014-02-14 </AuthenticationErrorDetail> </Error> I get it when I generate a sas

Getting the latest file modified from Azure Blob

女生的网名这么多〃 提交于 2019-11-26 17:23:16
问题 Say I am generating a couple of json files each day in my blob storage. What I want to do is to get the latest file modified in any of my directories. So I'd have something like this in my blob: 2016/01/02/test.json 2016/01/02/test2.json 2016/02/03/test.json I want to get 2016/02/03/test.json . So one way is getting the full path of the file and do a regex checking to find the latest directory created, but this doesn't work if I have more than one josn file in each dir. Is there anything like

Reading data from Azure Blob with Spark

时间秒杀一切 提交于 2019-11-26 16:32:09
问题 I am having issue in reading data from azure blobs via spark streaming JavaDStream<String> lines = ssc.textFileStream("hdfs://ip:8020/directory"); code like above works for HDFS, but is unable to read file from Azure blob https://blobstorage.blob.core.windows.net/containerid/folder1/ Above is the path which is shown in azure UI, but this doesnt work, am i missing something, and how can we access it. I know Eventhub are ideal choice for streaming data, but my current situation demands to use

generate a Zip file from azure blob storage files

爷,独闯天下 提交于 2019-11-26 16:23:05
I have some files stored in my windows azure blob storage. IWant to take these files and create a zip file and store to a new folder .Then return the path to the zip file. Set permission to the zip file location so that my users can download the zip file to their local machines by clicking on the link https://mystorage.blob.core.windows.net/myfiles/2b5f8ea6-3dc2-4b77-abfe-4da832e02556/AppList/isjirleq/mydocs1.doc https://mystorage.blob.core.windows.net/myfiles/2b5f8ea6-3dc2-4b77-abfe-4da832e02556/tempo/xyz/mymusic.mp3 https://mystorage.blob.core.windows.net/myfiles/2b5f8ea6-3dc2-4b77-abfe

What is the best way to backup Azure Blob Storage contents

假装没事ソ 提交于 2019-11-26 16:11:48
问题 I know that the Azure Storage entities (blobs, tables and queues) have a built-in resiliency, meaning that they are replicated to 3 different servers in the same datacenter. On top of that they may also be replicated to a different datacenter altogether that is physically located in a different geographical region. The chance of losing your data in this case is close to zero for all practical purposes. However, what happens if a sloppy developer (or the one under the influence of alcohol :))

How to enable BLOB-logging for a Node.js Api App on Azure?

会有一股神秘感。 提交于 2019-11-26 14:56:56
问题 I have a node.js api app on azure. I use bunyan to log every request to sdtout . How can I save and read the log files? I enabled BLOB-logging. The only thing that shows up in my storage is a bunch of csv-files. Here is an example: | date | level | applicationName | instanceId | eventId | pid | tid | message _______________________________________________________________________________________________________________________________________________________________ | 2017-05-17T14:21:15 |

How can I delete a leased blob in Microsoft Azure storage

谁说胖子不能爱 提交于 2019-11-26 12:33:08
I created a virtual machine in Azure and then deleted it. However, the associated storage account still exists. I can't delete the storage account because it contains a container with a blob in it that has an indefinite lease. Nothing else is using this storage account. How can I delete this blob? You need to delete the disk objects that are associated with the abandoned vhd's. You can do this easily in either the classic or new portal. Once you dispose of these (along with associated leases), you should be able to get rid of your storage account In the Classic portal ( manage.windowsazure.com