TcaplusDB Client - Show Command
For TcaplusDB Client Instructions, see Document.
1. Function Descriptions
Show tables can query all data table names in the currently connected TcaplusDB.
Show status can query the current connection status, directory server information and access layer information.
Show shard can query shard ids of the table, if use where clause, show shard id of the record in table.
Show last_access_time can query last_access_time of the record in table, only generic tables are supported.
Show hashcode can query the hashcode of the record key offline based on the metadata of the table (supported since 3.55.0)
2. Initial Version
3.40.0
3. Command Syntax
tcaplus> help show;
--------------------------------------------------------------------------------
show tables output all table names
show status output appID, zoneID, dir server status, tcaproxy status,
all the dir server addresses
show shard from <table> [where key1=*** and key2=***](full key)
show shard ids of the table, if use where clause, show shard id of the record in table.
show last_access_time from <table> where key1=*** and key2=*** (full key)
show last_access_time of the record in table, only generic tables are supported.
show hashcode from <table> where key1=*** and key2=*** (full key) using tdr/proto
show hashcode of the record in tdr/pb table, 'using tdr' for tdr table, 'using proto' for pb table.
metadata needs to be specified via -T or -P when starting the tcaplus_client tool.
this command can be run in offline mode entered with the -o parameter when starting the tcaplus_client tool.
--------------------------------------------------------------------------------
4. Command Example
tcaplus> show tables;
----------------------------------------------------------
| Table Name Type Protocol |
----------------------------------------------------------
| test_table GENERIC TDR |
| tbMailTest LIST PROTOBUF |
| pb_generic_index_shardingkey GENERIC PROTOBUF |
| pb_generic_index_noshardkey GENERIC PROTOBUF |
| pb_generic_noindex_noshardkey GENERIC PROTOBUF |
| pb_list LIST PROTOBUF |
| pb_list2 LIST PROTOBUF |
| pb_sortedlist LIST PROTOBUF |
| aes_info GENERIC TDR |
| auth_info GENERIC TDR |
| depend_me_services GENERIC TDR |
| host_info GENERIC TDR |
| instance_info GENERIC TDR |
| node_info GENERIC TDR |
| service_depends GENERIC TDR |
| service_info GENERIC TDR |
| token_info GENERIC TDR |
| cl_list LIST PROTOBUF |
| cl_generic GENERIC PROTOBUF |
| table_generic GENERIC TDR |
----------------------------------------------------------
tcaplus> show status;
------------------------------------------------------------------
Access_id(app_id) = 2
------------------------------------------------------------------
TableGroup_id(zone_id) = 3
------------------------------------------------------------------
[dir_server_url]
dir_server_url[0]: 9.135.8.93:9999
------------------------------------------------------------------
[Proxys]
proxy[0]:tcp://9.135.8.93:13755 CONNECTED Authened
proxy[1]:tcp://9.135.8.93:13756 CONNECTED Authened
------------------------------------------------------------------
[The connected dir server]
tcp://9.135.8.93:9999
------------------------------------------------------------------
tcaplus> show shard from IDAllocc;
shard id: 7224852
tcaplus> show shard from IDAllocc where IDType=1;
shard id: 7224852
tcaplus> show last_access_time from IDAllocc where IDType=1;
last_access_time: 1746500784
./tcaplus_client --offline --debug --proto ./542a223a399115348b8db7a5df4c2a73.proto
====== You have entered the OFFLINE-MODE of the tcaplus_client tool ======
tcaplus> show hashcode from hashcodetest where a=1 and b=1 and c=1 and d="1" using proto;
the hash code of key is 9536