すべてのプロダクト
Search
ドキュメントセンター

Tablestore:分析ストアの情報のクエリ

最終更新日:Apr 25, 2025

時系列テーブルの作成時に分析ストアが作成されている場合、DescribeTimeseriesAnalyticalStore 操作を呼び出して、生存時間 (TTL) の構成、データ同期オプション、データ同期のステータス、データストレージの使用量など、分析ストアの情報をクエリできます。

前提条件

パラメータ

パラメータ

説明

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());
    // 分析ストアの TTL を秒単位で出力します。
    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());
    }
}