You can call this operation to specify the concurrency level of the computing engine. The ComputeSplitsBySize operation logically splits the data in a specified table into several shards. This is based on the specified size, and the operation returns the location of the split points among these splits and the host.

Examples

private static void describeTable(SyncClient client) {
    // Split data by 200 MB.
    ComputeSplitsBySizeRequest request = new ComputeSplitsBySizeRequest(TABLE_NAME, 2);
    ComputeSplitsBySizeResponse response = client.computeSplitsBySize(computeSplitsBySizeRequest);
    System.out.println("ConsumedCapacity=" + response.getConsumedCapacity().jsonize());
    System.out.println("PrimaryKeySchema=" + response.getPrimaryKeySchema());
    System.out.println("RequestId=" + response.getRequestId());
    System.out.println("TraceId=" + response.getTraceId());
    List<Split> splits = response.getSplits();
    System.out.println("splits.size=" + splits.size());
    Iterator<Split> iterator = splits.iterator();
    while (iterator.hasNext()) {
        Split split = iterator.next();
        System.out.println("split.getLocation()=" + split.getLocation());
        // You can inject split.getLowerBound() and split.getUpperBound() into RangeRowQueryCriteria, and pass RangeRowQueryCriteria to getRange() or createRangeIterator().
        System.out.println("split.getLowerBound()=" + split.getLowerBound().jsonize());
        System.out.println("split.getUpperBound()=" + split.getUpperBound().jsonize());
    }
}