Create a file with name tablestoreConf.json
in ${user.home}
(For windows: C:\Documents and Settings\%username%\tablestoreCong.json
, for linux /home/${username}/tablestoreCong.json
, for mac /Users/${username}/tablestoreCong.json
)
{
"endpoint": "*****",
"accessId": "*******",
"accessKey": "*************",
"instanceName": "*****"
}
Tablestore java sdk.
<dependency>
<groupId>com.aliyun.openservices</groupId>
<artifactId>tablestore</artifactId>
<version>5.3.0</version>
</dependency>
.
└── java
└── com
└── aliyun
└── tablestore
└── basic
├── BaseExample.java # Example base class
├── GlobalIndexCRDExample.java # Basic operations of Tablestore Global Index :)
├── common
│ └── Consts.java # Consts
└── model
└── CallDO.java # Domain object
Run the main method in class GlobalIndexCRDExample
, the table & index would be created, mock data inserted, along with queries.
create table & global index at the same time
create table & global index independently
list all global indices on a specific table
describe meta of a global index
query a global index
delete a global index