Azure Blob存储:如何以长期运行和可恢复的方式枚举blob?

时间:2017-04-09 21:21:25

标签: c# rest azure azure-storage azure-storage-blobs

我需要在漫长的操作中枚举数百万个blob。从List Blobs documentation开始,我仍然留下以下问题:

  • NextMarker值的持续时间或到期时间是什么?
  • 我可以在其他HTTPS连接上使用NextMarker的值吗?可能来自另一台机器(IP地址)?
  • 我可以使用NextMarker的相同值多次调用List Blobs API吗?他们都会回到下一页吗? (如果每次通话的页面可能不同,我没问题 - 我不需要100%的可靠性。)

1 个答案:

答案 0 :(得分:2)

As you can see in this doc, NextMarker is just a string which stands for the next blob to enumerate. So the answers to your questions are:

  1. There is no expiration time of NextMarker value.
  2. You can use it on a a different HTTPS connection or from another machine (IP address).
  3. You can call the List Blobs API multiple times with the same value for NextMarker, they will all return the next page as long as you didn't change the content of the container between two List Blobs requests.