问题描述
我想计算我的 Azure 存储帐户每天的读/写请求数,或者假设存储在那里的每个对象。我知道,它可以甚至应该直接在 Azure 门户中完成,但我需要在客户端接收此编号。我为此使用 JAVA 库。我现在有以下代码:
public String getNumberOfRequests(String connectionString,Date startTime,Date endTime) {
try {
CloudStorageAccount account = CloudStorageAccount.parse(connectionString);
CloudAnalyticsClient client = account.createCloudAnalyticsClient();
Iterable<LogRecord> records = client.listLogRecords(StorageService.BLOB,startDate,endDate,new BlobRequestOptions(),new OperationContext());
// ???
return numberOfReadWriteRequests;
} catch(...) {}
}
我怎么能从一开始就到这个numberOfReadWriteRequests
?也许我应该使用 LogRecord
方法和 getHourMetricsTable
对象而不是 CloudTable
对象?为此,我只能使用 CloudStorageAccount
和 JAVA-Api。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)