[
https://issues.apache.org/jira/browse/DRILL-5337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16239536#comment-16239536
]
ASF GitHub Bot commented on DRILL-5337:
---------------------------------------
Github user Vlad-Storona commented on a diff in the pull request:
https://github.com/apache/drill/pull/774#discussion_r148957497
--- Diff: contrib/storage-opentsdb/README.md ---
@@ -0,0 +1,64 @@
+# drill-storage-openTSDB
+
+Implementation of TSDB storage plugin. Plugin uses REST API to work with
TSDB.
+
+For more information about openTSDB follow this link <http://opentsdb.net>
+
+There is list of required params:
+
+* metric - The name of a metric stored in the db.
+
+* start - The start time for the query. This can be a relative or
absolute timestamp.
+
+* aggregator - The name of an aggregation function to use.
+
+optional param is:
+
+* downsample - An optional downsampling function to reduce the amount of
data returned.
+
+* end - An end time for the query. If not supplied, the TSD will assume
the local system time on the server.
+This may be a relative or absolute timestamp. This param is optional, and
if it isn't specified we will send null
+to the db in this field, but in this case db will assume the local system
time on the server.
+
+List of supported aggregators
+
+<http://opentsdb.net/docs/build/html/user_guide/query/aggregators.html>
+
+List of supported time
+
+<http://opentsdb.net/docs/build/html/user_guide/query/dates.html>
+
+Params must be specified in FROM clause of the query separated by commas.
For example
+
+`openTSDB.(metric=metric_name, start=4d-ago, aggregator=sum)`
+
+Supported queries for now are listed below:
+
+```
+USE openTSDB
+```
+
+```
+SHOW tables
+```
+Will print available metrics. Max number of the printed results is a
Integer.MAX value
+
+```
+SELECT * FROM openTSDB. `(metric=warp.speed.test, start=47y-ago,
aggregator=sum)`
+```
+Return aggregated elements from `warp.speed.test` table since 47y-ago
+
+```
+SELECT * FROM openTSDB.`(metric=warp.speed.test, aggregator=avg,
start=47y-ago)`
+```
+Return aggregated elements from `warp.speed.test` table
+
+```
+SELECT `timestamp`, sum(`aggregated value`) FROM
openTSDB.`(metric=warp.speed.test, aggregator=avg, start=47y-ago)` GROUP BY
`timestamp`
--- End diff --
Ok, I will add it.
> OpenTSDB storage plugin
> -----------------------
>
> Key: DRILL-5337
> URL: https://issues.apache.org/jira/browse/DRILL-5337
> Project: Apache Drill
> Issue Type: New Feature
> Components: Storage - Other
> Reporter: Dmitriy Gavrilovych
> Assignee: Dmitriy Gavrilovych
> Labels: features
> Fix For: 1.12.0
>
>
> Storage plugin for OpenTSDB
> The plugin uses REST API to work with TSDB.
> Expected queries are listed below:
> SELECT * FROM openTSDB.`warp.speed.test`;
> Return all elements from warp.speed.test table with default aggregator SUM
> SELECT * FROM openTSDB.`(metric=warp.speed.test)`;
> Return all elements from (metric=warp.speed.test) table as a previous query,
> but with alternative FROM syntax
> SELECT * FROM openTSDB.`(metric=warp.speed.test, aggregator=avg)`;
> Return all elements from warp.speed.test table, but with the custom aggregator
> SELECT `timestamp`, sum(`aggregated value`) FROM
> openTSDB.`(metric=warp.speed.test, aggregator=avg)` GROUP BY `timestamp`;
> Return aggregated and grouped value by standard drill functions from
> warp.speed.test table, but with the custom aggregator
> SELECT * FROM openTSDB.`(metric=warp.speed.test, downsample=5m-avg)`
> Return data limited by downsample
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)