All Products
Search
Document Center

Tablestore:Query global table information

Last Updated:Jan 15, 2026

This topic describes how to query the details of a global table using the Tablestore SDK for Java.

Prerequisite

Initialize the client.

Method

public DescribeGlobalTableResponse describeGlobalTable(DescribeGlobalTableRequest request) throws TableStoreException, ClientException

DescribeGlobalTableRequest parameters

  • globalTableId (Required) String: The global table ID.

    Note

    If you do not have the global table ID, call the DescribeTable operation to query the details of a table replica. If the replica is part of a global table, the response contains the global table ID.

  • globalTableName (Required) String: The name of the global table. The name must be the same as the base table name.

  • returnRpo (Optional) boolean: Specifies whether to return the Recovery Point Objective (RPO). The default value is false. Retrieving the RPO is time-consuming. Do not enable this parameter unless necessary.

  • phyTable (Optional) GlobalTableTypes.PhyTable: The conditions to filter physical tables. This parameter contains the following members:

    Parameter

    Type

    Description

    regionId (Optional)

    String

    The ID of the region where the physical table resides.

    instanceName (Optional)

    String

    The name of the instance where the physical table resides.

DescribeGlobalTableResponse return values

  • globalTableId (Required) String: The global table ID.

  • status (Required) GlobalTableTypes.GlobalTableStatus: The status of the global table. Valid values:

    Status

    Description

    INIT

    Initializing. The global table enters this state after it is created.

    RE_CONF

    Reconfiguring. All or some replicas of the global table are being configured. The configuration may be caused by table creation, historical data synchronization, or attaching or detaching members of the global table.

    ACTIVE

    Active.

  • phyTables (Required) List<PhyTable>: A list of physical tables. Each object in the list contains the following members:

    Parameter

    Type

    Description

    regionId (Required)

    String

    The ID of the region where the physical table resides.

    instanceName (Required)

    String

    The name of the instance where the physical table resides.

    tableName (Required)

    String

    The name of the physical table.

    status (Required)

    PhyTableStatus

    The status of the physical table. Valid values:

    • PENDING: Queued. The system is waiting for other replica tables to be configured.

    • INIT: Initializing. The replica table is being created or configured.

    • SYNCDATA: Synchronizing. Historical data is being synchronized and incremental data synchronization is enabled.

    • READY: Ready. Historical data synchronization is complete and the incremental tunnel is enabled. The table is not writable.

    • ACTIVE: Active and synchronizing. The replica table is readable and writable.

    • UNBINDING: Detaching. The replica table is being detached from the global table. The replica table and its data are not deleted during this process.

    • UNBOUND: Detached. The replica table is detached from the global table. The replica table and its data were not deleted during this process.

    statusTimestamp (Optional)

    long

    The timestamp of the last status update. Unit: milliseconds.

    writable (Required)

    boolean

    Specifies whether the table is writable.

    role (Optional)

    String

    The role of the physical table in the service model.

    rpo (Optional)

    Instant

    The RPO of the data in the physical table.

    tableId (Optional)

    String

    The ID of the physical table.

    stage (Optional)

    SyncStage

    The data synchronization stage.

    isFailed (Required)

    boolean

    Specifies whether the table is in a failed state.

    message (Optional)

    String

    Additional information about the physical table status, such as a failure cause. If creating a global table or attaching or detaching a synchronization relationship fails, `isFailed` is true and this parameter displays the reason.

Example

private static void describeGlobalTableExample(SyncClient client) {
    // Construct the request.
    DescribeGlobalTableRequest req = new DescribeGlobalTableRequest(
        // The global table ID.
        "gt-ee1b54db-f5d9-43f3-ad36-ec44********",
        // The name of the global table.
        "t-gt-test-1"
    );

    // Send the request.
    DescribeGlobalTableResponse descResp = client.describeGlobalTable(req);

    // Print the basic information of the global table.
    System.out.println("Status: " + descResp.getStatus());
    System.out.println("Global Table ID: " + descResp.getGlobalTableId());

    // Print the replica deployment information (Placement).
    List<GlobalTableTypes.PhyTable> placements = descResp.getPhyTables();
    for (GlobalTableTypes.PhyTable p : placements) {
        System.out.println("Replica in " + p.getRegionId() +
                ", Instance: " + p.getInstanceName() +
                ", Writable: " + p.isWritable());
    }
}