Azure data lake gen。 2(adls2),api获取存储在数据湖中的数据的整体大小

问题描述 投票:0回答:1

我正在寻找一种获取有关存储在数据湖(azure数据湖gen2 2-adls2)中的所有数据的整体大小的数据的方法。有谁知道如何获取有关数据湖大小的信息(存储了多少数据)?试图找到合适的API,但到目前为止没有找到任何东西。将感谢您的任何提示。

azure azure-data-lake
1个回答
0
投票

[如果要获取存储在数据湖gen2中的所有数据的大小(不包括File, Table, Queue存储,则可以将此Metrics - List REST API与Metrics - List结合使用,并用最新的metricnames=BlobCapacity指定一个)小时,例如现在是metricnames=BlobCapacity,只需使用timespan,它对我来说效果很好。

样本

2019-10-14T05:48:03Z

Response

timespan=2019-10-14T04:47:03Z/2019-10-14T05:47:03Z

更新

如果要获取包括GET https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Storage/storageAccounts/<storageaccount-name>/blobServices/default/providers/microsoft.insights/metrics?timespan=2019-10-14T04:47:03Z/2019-10-14T05:47:03Z&metricnames=BlobCapacity&api-version=2018-01-01 存储在内的所有数据的大小,只需使用 { "cost":0, "timespan":"2019-10-14T04:47:03Z/2019-10-14T05:47:03Z", "interval":"PT1H", "value":[ { "id":"/subscriptions/xxxxxxx/resourceGroups/xxxxxxx/providers/Microsoft.Storage/storageAccounts/joygen2/blobServices/default/providers/Microsoft.Insights/metrics/BlobCapacity", "type":"Microsoft.Insights/metrics", "name":{ "value":"BlobCapacity", "localizedValue":"Blob Capacity" }, "displayDescription":"The amount of storage used by the storage account’s Blob service in bytes.", "unit":"Bytes", "timeseries":[ { "metadatavalues":[ ], "data":[ { "timeStamp":"2019-10-14T04:47:00Z", "average":44710.0 } ] } ] } ], "namespace":"Microsoft.Storage/storageAccounts/blobServices", "resourceregion":"eastus" } 度量标准名称。

样本

File, Table, Queue

Response

UsedCapacity
© www.soinside.com 2019 - 2024. All rights reserved.