當需要查看分析儲存的詳細配置資訊,您可以使用DescribeTimeseriesAnalyticalStore介面查詢分析儲存描述資訊,例如資料生命週期配置、資料同步選項、資料同步狀態、資料存放區大小等。
前提條件
參數
參數 | 說明 |
timeseriesTableName | 時序表名。 |
analyticalStoreName | 分析儲存名。 |
樣本
以下樣本用於查詢test_timeseries_table時序表下的test_analytical_store分析儲存的描述資訊。
public void describeAnalyticalStore(TimeseriesClient client) {
//設定時序表名稱和分析儲存名稱。
DescribeTimeseriesAnalyticalStoreRequest request = new DescribeTimeseriesAnalyticalStoreRequest("test_timeseries_table", "test_analytical_store");
DescribeTimeseriesAnalyticalStoreResponse response = client.describeTimeseriesAnalyticalStore(request);
//列印分析儲存名稱。
System.out.println("AnalyticalStoreName: " + response.getAnalyticalStore().getAnalyticalStoreName());
//列印分析儲存的資料生命週期,單位為秒。
System.out.println("TimeToLive: " + response.getAnalyticalStore().getTimeToLive());
//列印分析儲存的同步選項。
System.out.println("SyncOption: " + response.getAnalyticalStore().getSyncOption());
//列印分析儲存目前時間的同步階段。
if (response.getSyncStat() != null) {
System.out.println("SyncPhase: " + response.getSyncStat().getSyncPhase());
System.out.println("CurrentSyncTimestamp: " + response.getSyncStat().getCurrentSyncTimestamp());
}
//列印分析儲存目前時間的儲存量大小。
if (response.getStorageSize() != null) {
System.out.println("StorageSize: " + response.getStorageSize().getSizeInBytes());
System.out.println("StorageSizeTimestamp: " + response.getStorageSize().getTimestamp());
}
}