Se você criou um analytical store ao criar uma tabela de séries temporais, chame a operação DescribeTimeseriesAnalyticalStore para consultar informações sobre esse analytical store, como configuração de tempo de vida (TTL), opção de sincronização de dados, status da sincronização e uso de armazenamento.
Pré-requisitos
Crie um analytical store durante a criação da tabela de séries temporais. Para mais informações, consulte Criar tabelas de séries temporais.
Inicialize um cliente. Para mais informações, consulte Inicializar um cliente do Tablestore.
Parâmetros
|
Parâmetro |
Descrição |
|
timeseriesTableName |
Nome da tabela de séries temporais. |
|
analyticalStoreName |
Nome do analytical store. |
Exemplo
O exemplo a seguir mostra como consultar informações do analytical store test_analytical_store, criado para a tabela de séries temporais test_timeseries_table:
public void describeAnalyticalStore(TimeseriesClient client) {
//Specify the names of the time series table and analytical store.
DescribeTimeseriesAnalyticalStoreRequest request = new DescribeTimeseriesAnalyticalStoreRequest("test_timeseries_table", "test_analytical_store");
DescribeTimeseriesAnalyticalStoreResponse response = client.describeTimeseriesAnalyticalStore(request);
//Print the name of the analytical store.
System.out.println("AnalyticalStoreName: " + response.getAnalyticalStore().getAnalyticalStoreName());
//Print the TTL of the analytical store in seconds.
System.out.println("TimeToLive: " + response.getAnalyticalStore().getTimeToLive());
//Print the synchronization option of the analytical store.
System.out.println("SyncOption: " + response.getAnalyticalStore().getSyncOption());
//Print the current synchronization phase of the analytical store.
if (response.getSyncStat() != null) {
System.out.println("SyncPhase: " + response.getSyncStat().getSyncPhase());
System.out.println("CurrentSyncTimestamp: " + response.getSyncStat().getCurrentSyncTimestamp());
}
//Print the current storage usage of the analytical store.
if (response.getStorageSize() != null) {
System.out.println("StorageSize: " + response.getStorageSize().getSizeInBytes());
System.out.println("StorageSizeTimestamp: " + response.getStorageSize().getTimestamp());
}
}