in tablestore-java-mcp-server/src/main/java/com/alicloud/openservices/tablestore/sample/service/TablestoreService.java [186:198]
private void createTableIfNotExist() {
if (tableExists()) {
log.info("table:{} already exists", tableName);
return;
}
TableMeta tableMeta = new TableMeta(this.tableName);
tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema(pkName, PrimaryKeyType.STRING));
TableOptions tableOptions = new TableOptions(-1, 1);
CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions);
request.setReservedThroughput(new ReservedThroughput(new CapacityUnit(0, 0)));
client.createTable(request);
log.info("create table:{}", tableName);
}