com.baidubce.services.tsdb
Class TsdbClient

java.lang.Object
  extended by com.baidubce.AbstractBceClient
      extended by com.baidubce.services.tsdb.AbstractTsdbBceClient
          extended by com.baidubce.services.tsdb.TsdbClient

public class TsdbClient
extends AbstractTsdbBceClient

Provides the client for accessing the Tsdb(Time series database).


Field Summary
 
Fields inherited from class com.baidubce.services.tsdb.AbstractTsdbBceClient
CONTENT_TYPE, TSDB_HANDLERS
 
Fields inherited from class com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
 
Constructor Summary
TsdbClient(BceClientConfiguration config)
           
TsdbClient(BceClientConfiguration config, String databaseName)
           
 
Method Summary
protected  InternalRequest createRequest(URI endpoint, AbstractBceRequest bceRequest, HttpMethodName httpMethod, SignOptions signOptions, String... pathVariables)
          Creates and initializes a new request object for the specified resource.
 URL generatePresignedUrlForQueryDatapoints(List<Query> queries)
           
 URL generatePresignedUrlForQueryDatapoints(List<Query> queries, int expirationInSeconds)
           
 URL generatePresignedUrlForQueryDatapoints(QueryDatapointsRequest queryDatapointsRequest)
           
 URL generatePresignedUrlForQueryDatapoints(QueryDatapointsRequest queryDatapointsRequest, int expirationInSeconds)
           
 GetFieldsResponse getFields(GetFieldsRequest getFieldsRequest)
           
 GetFieldsResponse getFields(String metric)
           
 GetMetricsResponse getMetrics()
           
 GetMetricsResponse getMetrics(GetMetricsRequest getMetricsRequest)
           
 GetRowsWithSqlResponse getRowsWithSql(GetRowsWithSqlRequest request)
           
 GetRowsWithSqlResponse getRowsWithSql(String sql)
           
 GetTagsResponse getTags(GetTagsRequest getTagsRequest)
           
 GetTagsResponse getTags(String metric)
           
 QueryDatapointsResponse queryDatapoints(List<Query> queries)
           
 QueryDatapointsResponse queryDatapoints(QueryDatapointsRequest queryDatapointsRequest)
           
 WriteDatapointsResponse writeDatapoints(List<Datapoint> datapoints)
           
 WriteDatapointsResponse writeDatapoints(WriteDatapointsRequest writeDatapointsRequest)
           
 WriteDatapointsResponse writeDatapoints(WriteDatapointsRequest writeDatapointsRequest, boolean isGzip)
           
 
Methods inherited from class com.baidubce.services.tsdb.AbstractTsdbBceClient
convertRequestToUrl, createRequest, fillInHeadAndBody, fillInHeadAndBodyForGzip, getTimestampInThisMinute, toGzipBytes, toJson
 
Methods inherited from class com.baidubce.AbstractBceClient
computeServiceId, getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TsdbClient

public TsdbClient(BceClientConfiguration config)

TsdbClient

public TsdbClient(BceClientConfiguration config,
                  String databaseName)
Method Detail

writeDatapoints

public WriteDatapointsResponse writeDatapoints(List<Datapoint> datapoints)

writeDatapoints

public WriteDatapointsResponse writeDatapoints(WriteDatapointsRequest writeDatapointsRequest)

writeDatapoints

public WriteDatapointsResponse writeDatapoints(WriteDatapointsRequest writeDatapointsRequest,
                                               boolean isGzip)

getMetrics

public GetMetricsResponse getMetrics()

getMetrics

public GetMetricsResponse getMetrics(GetMetricsRequest getMetricsRequest)

getTags

public GetTagsResponse getTags(String metric)

getTags

public GetTagsResponse getTags(GetTagsRequest getTagsRequest)

getFields

public GetFieldsResponse getFields(String metric)

getFields

public GetFieldsResponse getFields(GetFieldsRequest getFieldsRequest)

queryDatapoints

public QueryDatapointsResponse queryDatapoints(List<Query> queries)

queryDatapoints

public QueryDatapointsResponse queryDatapoints(QueryDatapointsRequest queryDatapointsRequest)

getRowsWithSql

public GetRowsWithSqlResponse getRowsWithSql(String sql)

getRowsWithSql

public GetRowsWithSqlResponse getRowsWithSql(GetRowsWithSqlRequest request)

generatePresignedUrlForQueryDatapoints

public URL generatePresignedUrlForQueryDatapoints(QueryDatapointsRequest queryDatapointsRequest)

generatePresignedUrlForQueryDatapoints

public URL generatePresignedUrlForQueryDatapoints(List<Query> queries)

generatePresignedUrlForQueryDatapoints

public URL generatePresignedUrlForQueryDatapoints(List<Query> queries,
                                                  int expirationInSeconds)

generatePresignedUrlForQueryDatapoints

public URL generatePresignedUrlForQueryDatapoints(QueryDatapointsRequest queryDatapointsRequest,
                                                  int expirationInSeconds)

createRequest

protected InternalRequest createRequest(URI endpoint,
                                        AbstractBceRequest bceRequest,
                                        HttpMethodName httpMethod,
                                        SignOptions signOptions,
                                        String... pathVariables)
Description copied from class: AbstractTsdbBceClient
Creates and initializes a new request object for the specified resource.

Overrides:
createRequest in class AbstractTsdbBceClient
Parameters:
endpoint - The endpoint to request.
bceRequest - The original BCE request created by the user.
httpMethod - The HTTP method to use when sending the request.
signOptions - The options for signature.
pathVariables - The optional variables used in the URI path.
Returns:
A new request object populated with endpoint, resource path and specific parameters to send.


Copyright © 2020. All rights reserved.