public class SyncClient extends Object implements SyncClientInterface
| 限定符和类型 | 类和说明 |
|---|---|
class |
SyncClient.DefaultPrepareCallback |
| 构造器和说明 |
|---|
SyncClient(String endpoint,
CredentialsProvider credsProvider,
String instanceName,
ClientConfiguration config,
ResourceManager resourceManager) |
SyncClient(String endpoint,
String accessKeyId,
String accessKeySecret,
String instanceName)
Constructs a new
SyncClient instance using the specified TableStore Endpoint and default configuration. |
SyncClient(String endpoint,
String accessKeyId,
String accessKeySecret,
String instanceName,
ClientConfiguration config)
Constructs a new
SyncClient instance using the specified TableStore Endpoint and configuration. |
SyncClient(String endpoint,
String accessKeyId,
String accessKeySecret,
String instanceName,
ClientConfiguration config,
String stsToken)
Constructs a new
SyncClient instance using the specified TableStore Endpoint and default configuration. |
SyncClient(String endpoint,
String accessKeyId,
String accessKeySecret,
String instanceName,
ClientConfiguration config,
String stsToken,
ExecutorService callbackExecutor)
Constructs a new
SyncClient instance using the specified TableStore Endpoint and default configuration. |
SyncClient(String endpoint,
String accessKeyId,
String accessKeySecret,
String instanceName,
String stsToken)
Constructs a new
SyncClient instance using the specified TableStore Endpoint and default configuration. |
| 限定符和类型 | 方法和说明 |
|---|---|
AbortTransactionResponse |
abortTransaction(AbortTransactionRequest request)
Cancel a transaction
|
AddDefinedColumnResponse |
addDefinedColumn(AddDefinedColumnRequest addDefinedColumnRequest)
Add a predefined column to a table.
|
AsyncClientInterface |
asAsyncClient()
Convert to the asynchronous interface Client.
|
AsyncTimeseriesClient |
asAsyncTimeseriesClient() |
TimeseriesClient |
asTimeseriesClient() |
BatchGetRowResponse |
batchGetRow(BatchGetRowRequest batchGetRowRequest)
Read multiple rows of data from multiple tables.
|
BatchWriteRowResponse |
batchWriteRow(BatchWriteRowRequest batchWriteRowRequest)
Perform update or delete operations on multiple rows across multiple tables.
|
BulkExportResponse |
bulkExport(BulkExportRequest bulkExportRequest)
Query multiple rows of data within a range from the table, offline service interface.
|
BulkImportResponse |
bulkImport(BulkImportRequest bulkImportRequest)
Perform update or delete operations on multiple rows in a single table, offline service interface.
|
CommitTransactionResponse |
commitTransaction(CommitTransactionRequest request)
Commit a transaction
|
ComputeSplitsResponse |
computeSplits(ComputeSplitsRequest request)
Get the partition information of the data.
|
ComputeSplitsBySizeResponse |
computeSplitsBySize(ComputeSplitsBySizeRequest computeSplitsBySizeRequest)
Splits the data of a table into chunks based on a certain data size, and returns the split information for use by the data retrieval interface.
|
Iterator<Row> |
createBulkExportIterator(RangeIteratorParameter rangeIteratorParameter) |
CreateDeliveryTaskResponse |
createDeliveryTask(CreateDeliveryTaskRequest request)
Create a data delivery task
|
CreateIndexResponse |
createIndex(CreateIndexRequest createIndexRequest)
Create an index table under a specified table as indicated by the user.
|
RowIterator |
createParallelScanIterator(ParallelScanRequest request)
Get the Iterator for ParallelScan.
|
Iterator<Row> |
createRangeIterator(RangeIteratorParameter rangeIteratorParameter)
Encapsulates the
SyncClientInterface.getRange(GetRangeRequest) interface in iterator form. |
CreateSearchIndexResponse |
createSearchIndex(CreateSearchIndexRequest request)
Create SearchIndex
|
RowIterator |
createSearchIterator(SearchRequest request)
Get the Iterator for Search.
|
CreateTableResponse |
createTable(CreateTableRequest createTableRequest)
Create a new table under the user's instance.
|
WideColumnIterator |
createWideColumnIterator(GetRowRequest getRowRequest) |
DeleteDefinedColumnResponse |
deleteDefinedColumn(DeleteDefinedColumnRequest deleteDefinedColumnRequest)
Delete a predefined column for a table
|
DeleteDeliveryTaskResponse |
deleteDeliveryTask(DeleteDeliveryTaskRequest request)
Delete the delivery task
|
DeleteIndexResponse |
deleteIndex(DeleteIndexRequest deleteIndexRequest)
Delete a specific index table under a specified table.
|
DeleteRowResponse |
deleteRow(DeleteRowRequest deleteRowRequest)
Delete a row of data from the table.
|
DeleteSearchIndexResponse |
deleteSearchIndex(DeleteSearchIndexRequest request)
Delete SearchIndex
Specify the tableName and indexName to delete an index
Note: It is not allowed to delete a table before all indexes under the table are deleted
|
DeleteTableResponse |
deleteTable(DeleteTableRequest deleteTableRequest)
Delete a table under a specified instance for the user.
|
DescribeDeliveryTaskResponse |
describeDeliveryTask(DescribeDeliveryTaskRequest request)
Delivery task description function
|
DescribeSearchIndexResponse |
describeSearchIndex(DescribeSearchIndexRequest request)
Get the information of a SearchIndex.
|
DescribeStreamResponse |
describeStream(DescribeStreamRequest describeStreamRequest)
Get the detailed information of the specified Stream.
|
DescribeTableResponse |
describeTable(DescribeTableRequest request)
Get the detailed information of a table, which includes:
The structure of the table (
TableMeta)
The reserved throughput of the table (ReservedThroughputDetails)
The configuration parameters of the table (TableOptions)
|
String |
getEndpoint()
Returns the TableStore Endpoint being accessed.
|
String |
getInstanceName()
Returns the name of the accessed instance
|
GetRangeResponse |
getRange(GetRangeRequest getRangeRequest)
Query multiple rows of data within a range from the table.
|
GetRowResponse |
getRow(GetRowRequest getRowRequest)
Read a single row of data from the table.
|
GetShardIteratorResponse |
getShardIterator(GetShardIteratorRequest getShardIteratorRequest)
Get the ShardIterator, which can be used to read data from a Shard.
|
GetStreamRecordResponse |
getStreamRecord(GetStreamRecordRequest getStreamRecordRequest)
Read data from a Shard using a ShardIterator.
|
ListDeliveryTaskResponse |
listDeliveryTask(ListDeliveryTaskRequest request)
List all delivery tasks under the user table
|
ListSearchIndexResponse |
listSearchIndex(ListSearchIndexRequest request)
Get the SearchIndex list under a table.
|
ListStreamResponse |
listStream(ListStreamRequest listStreamRequest)
Get the entire Stream list under the user's current instance or the Stream of a specific table.
|
ListTableResponse |
listTable()
Returns the list of all tables under the user's current instance.
|
ParallelScanResponse |
parallelScan(ParallelScanRequest request)
Scan data form SearchIndex.
|
PutRowResponse |
putRow(PutRowRequest putRowRequest)
Insert or overwrite a row of data in the table.
|
SearchResponse |
search(SearchRequest request)
Search functionality
Build your own SearchRequest, then obtain the SearchResponse
Example:
SearchQuery searchQuery = new SearchQuery();
TermQuery termQuery = new TermQuery();
termQuery.setFieldName("user_name");
termQuery.setTerm("jay");
searchQuery.setQuery(termQuery);
SearchRequest searchRequest = new SearchRequest(tableName, indexName, searchQuery);
SearchResponse resp = ots.search(searchRequest);
|
void |
setCredentials(ServiceCredentials credentials) |
void |
setExtraHeaders(Map<String,String> extraHeaders) |
void |
setPrepareCallback(PrepareCallback cb) |
void |
shutdown()
Release resources.
|
SQLQueryResponse |
sqlQuery(SQLQueryRequest request)
SQL query request
|
StartLocalTransactionResponse |
startLocalTransaction(StartLocalTransactionRequest request)
Start a local transaction
|
void |
switchCredentialsProvider(CredentialsProvider newCrdsProvider)
Switch CredentialsProvider.
|
UpdateRowResponse |
updateRow(UpdateRowRequest updateRowRequest)
Updates a row of data in the table.
|
UpdateSearchIndexResponse |
updateSearchIndex(UpdateSearchIndexRequest request)
Update SearchIndex (for user index exchange, or setting index query weight)
|
UpdateTableResponse |
updateTable(UpdateTableRequest request)
Dynamically change the configuration or reserved throughput of a table after it has been created.
|
public SyncClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName)
SyncClient instance using the specified TableStore Endpoint and default configuration.endpoint - The endpoint of the TableStore service.accessKeyId - The Access ID for accessing the TableStore service.accessKeySecret - The Access Key for accessing the TableStore service.instanceName - The instance name for accessing the TableStore service.public SyncClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName, String stsToken)
SyncClient instance using the specified TableStore Endpoint and default configuration.endpoint - The endpoint of the TableStore service.accessKeyId - The Access ID for accessing the TableStore service.accessKeySecret - The Access Key for accessing the TableStore service.instanceName - The instance name for accessing the TableStore service.stsToken - Sts Token.public SyncClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName, ClientConfiguration config)
SyncClient instance using the specified TableStore Endpoint and configuration.endpoint - The endpoint of the TableStore service.accessKeyId - The Access ID for accessing the TableStore service.accessKeySecret - The Access Key for accessing the TableStore service.instanceName - The instance name for accessing the TableStore service.config - The client configuration information (ClientConfiguration). If null is passed, the default configuration will be used.public SyncClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName, ClientConfiguration config, String stsToken)
SyncClient instance using the specified TableStore Endpoint and default configuration.endpoint - The endpoint of the TableStore service.accessKeyId - The Access ID for accessing the TableStore service.accessKeySecret - The Access Key for accessing the TableStore service.instanceName - The instance name for accessing the TableStore service.config - The client configuration information (ClientConfiguration). If null is passed, the default configuration will be used.stsToken - Sts Token.public SyncClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName, ClientConfiguration config, String stsToken, ExecutorService callbackExecutor)
SyncClient instance using the specified TableStore Endpoint and default configuration.endpoint - The endpoint of the TableStore service.accessKeyId - The Access ID for accessing the TableStore service.accessKeySecret - The Access Key for accessing the TableStore service.instanceName - The instance name for accessing the TableStore service.config - The client configuration information (ClientConfiguration). If null is passed, the default configuration will be used.stsToken - Sts Token.callbackExecutor - The thread pool for executing callbacks. Note that this thread pool will also be shut down when the client is shut down.public SyncClient(String endpoint, CredentialsProvider credsProvider, String instanceName, ClientConfiguration config, ResourceManager resourceManager)
public String getEndpoint()
public String getInstanceName()
public CreateTableResponse createTable(CreateTableRequest createTableRequest) throws TableStoreException, ClientException
SyncClientInterfaceThe table cannot be read from or written to immediately after creation; you need to wait a few seconds.
createTable 在接口中 SyncClientInterfacecreateTableRequest - Parameters required for executing CreateTableTableStoreException - Exception returned by the TableStore serviceClientException - Invalid request return result, or network exception encounteredpublic ListTableResponse listTable() throws TableStoreException, ClientException
SyncClientInterfacelistTable 在接口中 SyncClientInterfaceTableStoreException - Exception returned by the TableStore serviceClientException - Invalid request response or network exception encounteredpublic DescribeTableResponse describeTable(DescribeTableRequest request) throws TableStoreException, ClientException
SyncClientInterfaceGet the detailed information of a table, which includes:
TableMeta)ReservedThroughputDetails)TableOptions)describeTable 在接口中 SyncClientInterfacerequest - Parameters required to execute DescribeTableTableStoreException - Exception returned by the TableStore serviceClientException - Invalid response from the request or network exception encounteredpublic DeleteTableResponse deleteTable(DeleteTableRequest deleteTableRequest) throws TableStoreException, ClientException
SyncClientInterfaceCaution: After the table is successfully deleted, all data under the table will be cleared and cannot be recovered. Please operate with caution!
deleteTable 在接口中 SyncClientInterfacedeleteTableRequest - Parameters required to execute DeleteTableTableStoreException - Exception returned by the TableStore serviceClientException - Invalid return result of the request or network exception encounteredpublic UpdateTableResponse updateTable(UpdateTableRequest request) throws TableStoreException, ClientException
SyncClientInterfaceFor example, if a user wants to adjust the table's TTL, MaxVersions, etc., or if the user finds that the current reserved throughput is too low and needs to be increased.
The UpdateTable operation cannot be used to change the table's TableMeta. The adjustable configurations are:
ReservedThroughput):
A table's reserved throughput can be dynamically changed; read or write throughput can be adjusted separately. The minimum time interval for adjusting each table's read/write throughput is 1 minute. If this UpdateTable operation occurs less than 1 minute after the last UpdateTable or CreateTable operation, the request will be rejected.
TableOptions):
Only some configuration items of the table can be dynamically changed, such as TTL, MaxVersions, etc.
updateTable 在接口中 SyncClientInterfacerequest - Parameters required to execute UpdateTableTableStoreException - Exception returned by the TableStore serviceClientException - Invalid response from the request, or network exception encounteredpublic CreateIndexResponse createIndex(CreateIndexRequest createIndexRequest) throws TableStoreException, ClientException
SyncClientInterfacecreateIndex 在接口中 SyncClientInterfaceTableStoreException - Exception returned by the TableStore serviceClientException - The returned result is invalid, or a network exception was encounteredpublic DeleteIndexResponse deleteIndex(DeleteIndexRequest deleteIndexRequest) throws TableStoreException, ClientException
SyncClientInterfaceCaution: After the index table is successfully deleted, all data under that index table will be cleared and cannot be recovered. Please operate with caution!
deleteIndex 在接口中 SyncClientInterfacedeleteIndexRequest - Parameters required to execute DeleteIndexTableStoreException - Exception returned by the TableStore serviceClientException - Invalid return result of the request or network exception encounteredpublic AddDefinedColumnResponse addDefinedColumn(AddDefinedColumnRequest addDefinedColumnRequest) throws TableStoreException, ClientException
SyncClientInterfaceaddDefinedColumn 在接口中 SyncClientInterfaceaddDefinedColumnRequest - Parameters required for executing AddDefinedColumn.TableStoreException - An exception returned by the TableStore service.ClientException - The returned result of the request is invalid, or a network exception occurred.public DeleteDefinedColumnResponse deleteDefinedColumn(DeleteDefinedColumnRequest deleteDefinedColumnRequest) throws TableStoreException, ClientException
SyncClientInterfacedeleteDefinedColumn 在接口中 SyncClientInterfacedeleteDefinedColumnRequest - Parameters required to execute DeleteDefinedColumnTableStoreException - Exception returned by the TableStore serviceClientException - Invalid request return or network exception encounteredpublic GetRowResponse getRow(GetRowRequest getRowRequest) throws TableStoreException, ClientException
SyncClientInterfacegetRow 在接口中 SyncClientInterfacegetRowRequest - Parameters required to perform the GetRow operation.TableStoreException - Exception returned by the TableStore service.ClientException - Invalid request response or network exception encountered.public PutRowResponse putRow(PutRowRequest putRowRequest) throws TableStoreException, ClientException
SyncClientInterfaceIf the row to be written already exists, the old row will be deleted and a new one will be written.
If the row to be written does not exist, a new row will be directly written.
putRow 在接口中 SyncClientInterfaceputRowRequest - Parameters required for performing the PutRow operation.TableStoreException - Exception returned by the TableStore service.ClientException - Invalid response from the request or network exception encountered.public UpdateRowResponse updateRow(UpdateRowRequest updateRowRequest) throws TableStoreException, ClientException
SyncClientInterfaceIf the row to be updated does not exist, a new row of data is written.
The update operation can include writing a new attribute column or deleting one or more versions of an attribute column.
updateRow 在接口中 SyncClientInterfaceupdateRowRequest - Parameters required for the UpdateRow operation.TableStoreException - Exception returned by the TableStore service.ClientException - The returned result of the request is invalid, or a network exception was encountered.public DeleteRowResponse deleteRow(DeleteRowRequest deleteRowRequest) throws TableStoreException, ClientException
SyncClientInterfaceIf the row exists, it will be deleted.
If the row does not exist, this operation will have no effect.
deleteRow 在接口中 SyncClientInterfacedeleteRowRequest - Parameters required for performing the DeleteRow operation.TableStoreException - Exception returned by the TableStore service.ClientException - Invalid response or network exception encountered during the request.public BatchGetRowResponse batchGetRow(BatchGetRowRequest batchGetRowRequest) throws TableStoreException, ClientException
SyncClientInterfaceThe BatchGetRow operation can be regarded as a collection of multiple GetRow operations. Each operation is executed independently, returns results independently, and calculates service capability units independently.
Compared to executing a large number of GetRow operations, using the BatchGetRow operation can effectively reduce the response time of requests and increase the data read rate.
However, note that BatchGetRow only supports setting query conditions at the table level. After the operation is completed, the status of each sub-request needs to be checked individually, and retries can be attempted for failed rows.
batchGetRow 在接口中 SyncClientInterfacebatchGetRowRequest - Parameters required to execute the BatchGetRow operation.TableStoreException - Exception returned by the TableStore service.ClientException - Invalid request return result or network exception encountered.public BatchWriteRowResponse batchWriteRow(BatchWriteRowRequest batchWriteRowRequest) throws TableStoreException, ClientException
SyncClientInterfaceThe BatchWriteRow operation can be considered as a collection of multiple PutRow, UpdateRow, and DeleteRow operations. Each operation is executed independently, returns results independently, and calculates service capability units independently.
After executing the BatchWriteRow operation, it is necessary to check the status of each sub-request individually to determine the write result and choose to retry for failed rows.
batchWriteRow 在接口中 SyncClientInterfacebatchWriteRowRequest - Parameters required to execute the BatchWriteRow operation.TableStoreException - Exception returned by the TableStore service.ClientException - Invalid response or network exception encountered during the request.public BulkImportResponse bulkImport(BulkImportRequest bulkImportRequest) throws TableStoreException, ClientException
SyncClientInterfaceThe BulkImport operation can be regarded as a collection of multiple PutRow, UpdateRow, DeleteRow operations. Each operation is executed independently, returns results independently, and consumes units independently.
After executing the BulkImport operation, it is necessary to check the status of each sub-request individually to determine the write result and choose to retry the failed rows.
bulkImport 在接口中 SyncClientInterfacebulkImportRequest - Parameters required to execute the BatchWriteRow operation.TableStoreException - Exception returned by the TableStore serviceClientException - Invalid request return result, or network exception encounteredpublic GetRangeResponse getRange(GetRangeRequest getRangeRequest) throws TableStoreException, ClientException
SyncClientInterfacegetRange 在接口中 SyncClientInterfacegetRangeRequest - Parameters required for performing the GetRange operation.TableStoreException - Exception returned by the TableStore serviceClientException - Invalid request return or network exception encounteredpublic BulkExportResponse bulkExport(BulkExportRequest bulkExportRequest) throws TableStoreException, ClientException
SyncClientInterfacebulkExport 在接口中 SyncClientInterfacebulkExportRequest - Parameters required to execute the GetRange operation.TableStoreException - Exception returned by the TableStore service.ClientException - Invalid request return or network exception encountered.public ComputeSplitsBySizeResponse computeSplitsBySize(ComputeSplitsBySizeRequest computeSplitsBySizeRequest) throws TableStoreException, ClientException
SyncClientInterfacecomputeSplitsBySize 在接口中 SyncClientInterfacecomputeSplitsBySizeRequest - Parameters required to execute the ComputeSplitsBySize operation.TableStoreException - Exception returned by the TableStore serviceClientException - Invalid request response or network exception encounteredpublic Iterator<Row> createRangeIterator(RangeIteratorParameter rangeIteratorParameter) throws TableStoreException, ClientException
SyncClientInterfaceSyncClientInterface.getRange(GetRangeRequest) interface in iterator form.createRangeIterator 在接口中 SyncClientInterfacerangeIteratorParameter - The parameters required to execute the createRangeIterator operation.TableStoreException - Exception returned by the TableStore serviceClientException - Invalid request response or network exception encounteredpublic Iterator<Row> createBulkExportIterator(RangeIteratorParameter rangeIteratorParameter) throws TableStoreException, ClientException
public WideColumnIterator createWideColumnIterator(GetRowRequest getRowRequest) throws TableStoreException, ClientException
public ListStreamResponse listStream(ListStreamRequest listStreamRequest) throws TableStoreException, ClientException
SyncClientInterfacelistStream 在接口中 SyncClientInterfacelistStreamRequest - Parameters required for performing the ListStream operation.TableStoreException - Exception returned by the TableStore service.ClientException - Invalid request response or network exception encountered.public DescribeStreamResponse describeStream(DescribeStreamRequest describeStreamRequest) throws TableStoreException, ClientException
SyncClientInterfacedescribeStream 在接口中 SyncClientInterfacedescribeStreamRequest - Parameters required for the DescribeStream operation.TableStoreException - Exception returned by the TableStore service.ClientException - Invalid request return or network exception encountered.public GetShardIteratorResponse getShardIterator(GetShardIteratorRequest getShardIteratorRequest) throws TableStoreException, ClientException
SyncClientInterfacegetShardIterator 在接口中 SyncClientInterfacegetShardIteratorRequest - Parameters required to execute the GetShardIterator operation.TableStoreException - Exception returned by the TableStore service.ClientException - Invalid request response or network exception encountered.public GetStreamRecordResponse getStreamRecord(GetStreamRecordRequest getStreamRecordRequest) throws TableStoreException, ClientException
SyncClientInterfacegetStreamRecord 在接口中 SyncClientInterfacegetStreamRecordRequest - Parameters required to perform the GetStreamRecord operation.TableStoreException - Exception returned by the TableStore service.ClientException - Invalid request response or network exception encountered.public CreateSearchIndexResponse createSearchIndex(CreateSearchIndexRequest request) throws TableStoreException, ClientException
SyncClientInterfacecreateSearchIndex 在接口中 SyncClientInterfacerequest - Parameters required for creating a SearchIndex, see CreateSearchIndexRequestTableStoreException - Exception returned by the TableStore serviceClientException - Invalid response from the request or network exception encounteredpublic UpdateSearchIndexResponse updateSearchIndex(UpdateSearchIndexRequest request) throws TableStoreException, ClientException
SyncClientInterfaceupdateSearchIndex 在接口中 SyncClientInterfacerequest - Parameters required for updating the SearchIndex, see UpdateSearchIndexRequestTableStoreException - Exception returned by the TableStore serviceClientException - Invalid request response or network exception encounteredpublic ListSearchIndexResponse listSearchIndex(ListSearchIndexRequest request) throws TableStoreException, ClientException
SyncClientInterfaceThere can be multiple SearchIndex tables under a single table. Through this function, you can retrieve all SearchIndex information under a table.
listSearchIndex 在接口中 SyncClientInterfacerequest - Parameters required to get the SearchIndex list.TableStoreException - Exception returned by the TableStore service.ClientException - Invalid response result or network exception encountered during the request.public DeleteSearchIndexResponse deleteSearchIndex(DeleteSearchIndexRequest request) throws TableStoreException, ClientException
SyncClientInterfaceSpecify the tableName and indexName to delete an index
Note: It is not allowed to delete a table before all indexes under the table are deleted
deleteSearchIndex 在接口中 SyncClientInterfacerequest - Parameters required for deleting SearchIndexTableStoreException - Exception returned by the TableStore serviceClientException - Invalid request return or network exception encounteredpublic DescribeSearchIndexResponse describeSearchIndex(DescribeSearchIndexRequest request) throws TableStoreException, ClientException
SyncClientInterfacedescribeSearchIndex 在接口中 SyncClientInterfacerequest - The parameters required to get the SearchIndex (tableName and indexName).TableStoreException - Exception returned by the TableStore service.ClientException - Invalid response from the request or a network exception encountered.public ComputeSplitsResponse computeSplits(ComputeSplitsRequest request) throws TableStoreException, ClientException
SyncClientInterfacecomputeSplits 在接口中 SyncClientInterfacerequest - Parameters required to perform the computeSplits operation.TableStoreException - Exception returned by Tablestore service.ClientException - The return result of the request is invalid or a network exception was encountered.public ParallelScanResponse parallelScan(ParallelScanRequest request) throws TableStoreException, ClientException
SyncClientInterfaceparallelScan 在接口中 SyncClientInterfacerequest - Parameters required to perform the parallelScan operation.TableStoreException - Exception returned by Tablestore service.ClientException - The return result of the request is invalid or a network exception was encountered.public RowIterator createParallelScanIterator(ParallelScanRequest request) throws TableStoreException, ClientException
SyncClientInterfacecreateParallelScanIterator 在接口中 SyncClientInterfacerequest - Parameters required to perform ParallelScan operation.TableStoreException - Exception returned by Tablestore service.ClientException - The return result of the request is invalid or a network exception was encountered.public RowIterator createSearchIterator(SearchRequest request) throws TableStoreException, ClientException
SyncClientInterfaceNote: If your searchIndex has a nested field and you want to search data, please specify the Sort.
createSearchIterator 在接口中 SyncClientInterfacerequest - Parameters required to perform searchRequest operation.TableStoreException - Exception returned by Tablestore service.ClientException - The return result of the request is invalid or a network exception was encountered.public SearchResponse search(SearchRequest request) throws TableStoreException, ClientException
SyncClientInterfaceBuild your own SearchRequest, then obtain the SearchResponse
Example:
SearchQuery searchQuery = new SearchQuery();
TermQuery termQuery = new TermQuery();
termQuery.setFieldName("user_name");
termQuery.setTerm("jay");
searchQuery.setQuery(termQuery);
SearchRequest searchRequest = new SearchRequest(tableName, indexName, searchQuery);
SearchResponse resp = ots.search(searchRequest);
search 在接口中 SyncClientInterfacerequest - Parameters required for performing a search, see SearchRequest for detailsSearchResponse for detailsTableStoreException - Exception returned by the TableStore serviceClientException - Invalid response from the request or network exception encounteredpublic StartLocalTransactionResponse startLocalTransaction(StartLocalTransactionRequest request) throws TableStoreException, ClientException
SyncClientInterfacestartLocalTransaction 在接口中 SyncClientInterfacerequest - Parameters required for initiating a local transaction operationTableStoreException - Exception returned by the TableStore serviceClientException - The response is invalid or a network exception occurspublic CommitTransactionResponse commitTransaction(CommitTransactionRequest request) throws TableStoreException, ClientException
SyncClientInterfacecommitTransaction 在接口中 SyncClientInterfacerequest - Parameters required for the commit transaction operationTableStoreException - Exception returned by the TableStore serviceClientException - Invalid request response or network exception encounteredpublic AbortTransactionResponse abortTransaction(AbortTransactionRequest request) throws TableStoreException, ClientException
SyncClientInterfaceabortTransaction 在接口中 SyncClientInterfacerequest - Parameters required for the cancel transaction operationTableStoreException - Exception returned by the TableStore serviceClientException - Invalid request response or network exception encounteredpublic CreateDeliveryTaskResponse createDeliveryTask(CreateDeliveryTaskRequest request) throws TableStoreException, ClientException
SyncClientInterfacecreateDeliveryTask 在接口中 SyncClientInterfacerequest - Parameters required to create the delivery taskTableStoreException - Exception returned by the TableStore serviceClientException - Invalid response from the request or network exception encounteredpublic DeleteDeliveryTaskResponse deleteDeliveryTask(DeleteDeliveryTaskRequest request) throws TableStoreException, ClientException
SyncClientInterfacedeleteDeliveryTask 在接口中 SyncClientInterfacerequest - Parameters required for deleting the delivery taskTableStoreException - Exception returned by the Tablestore serviceClientException - The request results are invalid, or a network exception is encounteredpublic DescribeDeliveryTaskResponse describeDeliveryTask(DescribeDeliveryTaskRequest request) throws TableStoreException, ClientException
SyncClientInterfacedescribeDeliveryTask 在接口中 SyncClientInterfacerequest - Parameters required to describe the delivery taskTableStoreException - Exception returned by the Tablestore serviceClientException - The request result is invalid or a network exception is encounteredpublic ListDeliveryTaskResponse listDeliveryTask(ListDeliveryTaskRequest request) throws TableStoreException, ClientException
SyncClientInterfacelistDeliveryTask 在接口中 SyncClientInterfacerequest - Parameters required to get the list of delivery tasksTableStoreException - Exception returned by the Tablestore serviceClientException - The result of the request is invalid, or a network exception was encounteredpublic SQLQueryResponse sqlQuery(SQLQueryRequest request) throws TableStoreException, ClientException
SyncClientInterfacesqlQuery 在接口中 SyncClientInterfacerequest - Parameters for SQL queryTableStoreException - Exception returned by the Tablestore serviceClientException - Request result is invalid or a network exception is encounteredpublic AsyncClientInterface asAsyncClient()
SyncClientInterfaceasAsyncClient 在接口中 SyncClientInterfacepublic TimeseriesClient asTimeseriesClient()
public AsyncTimeseriesClient asAsyncTimeseriesClient()
public void shutdown()
SyncClientInterfaceMake sure to release resources after all requests have been executed. After releasing resources, no further requests can be sent, and ongoing requests may not return results.
shutdown 在接口中 SyncClientInterfacepublic void setPrepareCallback(PrepareCallback cb)
public void setCredentials(ServiceCredentials credentials)
public void switchCredentialsProvider(CredentialsProvider newCrdsProvider)
SyncClientInterfaceswitchCredentialsProvider 在接口中 SyncClientInterfacenewCrdsProvider - new CredentialsProvider, see CredentialsProviderFactory.Copyright © 2025. All Rights Reserved.