[Java] Collecting Azure Storage Blob metrics from $MetricsMinutePrimaryTransactionsBlob returns NULL RRS feed

  • Question

  • I have written a stand alone java program to get the metrics for the Azure Storage Blob from $MetricsHourPrimaryTransactionsBlob using Azure Java SDK but it returns NULL for all the columns.The below is my standalone code

    CloudTable cloudMetric = tableClient.getTableReference(cloud .getHourMetricsTable(StorageService.BLOB).getName()); String partitionFilter2 = TableQuery.generateFilterCondition( "Partition", QueryComparisons.EQUAL, "20170602T0100"); String RowFilter = TableQuery.generateFilterCondition("RowKey", QueryComparisons.EQUAL, "user;All"); String combinedFilter = TableQuery.combineFilters(partitionFilter2, Operators.AND, RowFilter); TableQuery<MetricsPojo> partitionQuery2 = TableQuery.from( MetricsPojo.class).where(combinedFilter); for (MetricsPojo capacityMetrics2 : cloudMetric .execute(partitionQuery2)) { System.out.println(capacityMetrics2.getTime() + "\n" + capacityMetrics2.getAccessType() + "\n" + capacityMetrics2.getTransactionType() + "\n" + capacityMetrics2.getRowKey() + "\n" + capacityMetrics2.getTotalRequests() + "\n" + capacityMetrics2.getTotalBillableRequests()); } The Following is my POJO `public class MetricsPojo extends TableServiceEntity { private String Time; private String AccessType; private String TransactionType; private long TotalIngress; private long TotalEgress; private long TotalRequests; private long TotalBillableRequests; private double Availability; private double AverageE2ELatency; private double AverageServerLatency; private double PercentSuccess;

    private double PercentThrottlingError; private double PercentTimeoutError; private double PercentServerOtherError; private double PercentClientOtherError; private double PercentAuthorizationError; private double PercentNetworkError; private long Success; private long AnonymousSuccess; private long SASSuccess; private long ThrottlingError; private long AnonymousThrottlingError; private long SASThrottlingError; private long ClientTimeoutError; private long AnonymousClientTimeoutError; private long SASClientTimeoutError; private long ServerTimeoutError; private long AnonymousServerTimeoutError; private long SASServerTimeoutError; private long ClientOtherError; private long SASClientOtherError; private long AnonymousClientOtherError; private long ServerOtherError; getter's and setter's and toString()` Please tell me where i'm doing wrong?

    Friday, June 2, 2017 8:02 AM

All replies

  • Looks like a similar query you posted on Stack Overflow has been answered already. Let us know if you're still looking for any further information.
    • Edited by Md Shihab Monday, June 5, 2017 6:59 AM
    Sunday, June 4, 2017 4:14 AM
  • You may consider to rename "Partition" to "PartitionKey" in proposing partitionFilter2. It should be working with the fix.
    • Proposed as answer by Md Shihab Monday, June 5, 2017 6:59 AM
    Sunday, June 4, 2017 6:29 AM
  • Hi,

    Thanks for posting here.

    It looks like a similar question you post on SO that I had answered and followed up. If you have any more concern, please feel free to let me know.

    Best Regards,

    Peter Pan

    Tuesday, June 6, 2017 5:42 AM