TSDBClient
类全名:com.aliyun.hitsdb.client.TSDBClient
- java.lang.Object
- com.aliyun.hitsdb.client.TSDBClient
- 所有已实现的接口:
- TSDB, Closeable, AutoCloseable
构造器概要
构造器和说明 TSDBClient(TSDBConfig config)
方法概要
限定符和类型 方法和说明 void
close()
关闭TSDB客户端。void
close(boolean force)
关闭TSDB客户端。void
delete(Query query)
数据删除方法。目前该方法不生效!void
deleteData(String metric, Date startDate, Date endDate)
删除数据。指定Metric,指定时间范围,删除符合条件的数据。void
deleteData(String metric, long startTime, long endTime)
删除数据。指定Metric,指定时间范围,删除符合条件的数据。void
deleteMeta(String metric, Map<String,String> tags)
删除时间线,并且删除时间线相关的所有数据。void
deleteMeta(Timeline timeline)
删除时间线,并且删除时间线相关的所有数据。List<TagResult>
dumpMeta(String tagkey, String tagValuePrefix, int max)
获取Tag相关信息。List<QueryResult>
last(Query query,int num)
查询数据方法。List<LastDPValue>
lastdp(Collection<Timeline> timelines)
返回某个时间线上的最后一个值。List<LastDPValue>
lastdp(Timeline… timelines)
返回某个时间线上的最后一个值。void
put(Point… points)
异步的将时间点写入TSDB。void
put(Point point)
异步的将时间点写入TSDB。<T extends Result>
TputSync(Class<T> resultType, Collection<Point> points)
同步的将时间点写入TSDB。<T extends Result>
TputSync(Class<T> resultType, Point… points)
同步的将时间点写入TSDB。Result
putSync(Collection<Point> points)
同步的将时间点写入TSDB。<T extends Result>
TputSync(Collection<Point> points, Class<T> resultType)
同步的将时间点写入TSDB。Result
putSync(Point… points)
同步的将时间点写入TSDB。List<QueryResult>
query(Query query)
查询数据方法void
query(Query query, QueryCallback callback)
查询数据方法List<String>
suggest(Suggest type, String prefix, int max)
该方法用于查询数据符合条件的metric列表int
ttl()
获取ttl数值的方法。单位:秒void
ttl(int lifetime)
设置ttl数值的方法。单位:秒void
ttl(int lifetime,TimeUnit unit)
构造器详细资料
TSDBClient
- public TSDBClient(TSDBConfig config) throws HttpClientInitException
方法详细资料
close
- public void close() throws IOException
- 指定者:
close
在接口中Closeable
- 指定者:
close
在接口中AutoCloseable
- 抛出:
IOException
close
- public void close(boolean force) throws IOException
从接口复制的说明:TSDB
关闭TSDB实例。该方法在程序结束前调用。- 指定者:
close
在接口中TSDB
- 参数:
force
- true or false- 抛出:
IOException
- exception
deleteData
- public void deleteData(String metric, long startTime, long endTime)
- 指定者:
deleteData
在接口中TSDB
- 参数:
metric
- metricstartTime
- start timestampendTime
- end timestamp
deleteData
从接口复制的说明:TSDB
指定Metric,指定时间范围内的数据都删除。- 指定者:
deleteData
在接口中TSDB
- 参数:
metric
- metric namestartDate
- start dateendDate
- end date
deleteMeta
从接口复制的说明:TSDB
删除时间线数据。- 指定者:
deleteMeta
在接口中TSDB
- 参数:
metric
- Metric,度量名称,指标名称tags
- 以Map表示的Tag键值对。
deleteMeta
- public void deleteMeta(Timeline timeline)
从接口复制的说明:TSDB
删除时间线数据。/div>- 指定者:
deleteMeta
在接口中TSDB
- 参数:
timeline
- Timeline 时间线类的实例。
dumpMeta
从接口复制的说明:TSDB
获取符合条件的Tag列表
query
- public List<QueryResult> query(Query query)
从接口复制的说明:TSDB
查询数据
query
- public void query(Query query, QueryCallback callback)
从接口复制的说明:TSDB
异步查询方法,查询结果在回调中返回。
suggest
从接口复制的说明:TSDB
suggest method
last
- public List<QueryResult> last(Query query, int num) throws HttpUnknowStatusException
- 指定者:
last
在接口中TSDB
- 参数:
query
- Query 查询类实例。num
- 需要的查询结果中时间线上最后点的个数- 返回:
- 查询结果列表
- 抛出:
HttpUnknowStatusException
- Exception
putSync
- public Result putSync(Collection<Point> points)
从接口复制的说明:TSDB
同步写入时间点
putSync
- public <T extends Result> T putSync(Collection<Point> points, Class<T> resultType)
从接口复制的说明:TSDB
同步写入方法
delete
- public void delete(Query query) throws HttpUnknowStatusException
从接口复制的说明:TSDB
删除方法,该方法尚未生效。- 指定者:
delete
在接口中TSDB
- 参数:
query
- query- 抛出:
HttpUnknowStatusException
- Exception
lastdp
- public List<LastDPValue> lastdp(Collection<Timeline> timelines) throws HttpUnknowStatusException
从接口复制的说明:TSDB
获取指定时间线上的最后一个数据点。- 指定者:
lastdp
在接口中TSDB
- 参数:
timelines
- Timelines实例。- 返回:
- 结果
- 抛出:
HttpUnknowStatusException
- Exception
lastdp
- public List<LastDPValue> lastdp(Timeline… timelines) throws HttpUnknowStatusException
从接口复制的说明:TSDB
获取指定时间线上的最后一个数据点。- 指定者:
lastdp
在接口中TSDB
- 参数:
timelines
- 时间线的值。- 返回:
- List
- 抛出:
HttpUnknowStatusException
- Exception
putSync
从接口复制的说明:TSDB
同步写时间点
putSync
- public <T extends Result> T putSync(Class<T> resultType, Collection<Point> points)
从接口复制的说明:TSDB
同步写
版权声明
本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。
评论