项目作者: mbrtargeting

项目描述 :
spring blossoms and blessing of the ancients
高级语言: Scala
项目地址: git://github.com/mbrtargeting/druid-client.git
创建时间: 2016-12-08T11:19:18Z
项目社区:https://github.com/mbrtargeting/druid-client

开源协议:MIT License

下载


Druid Client Build Status

Druid client that simplifies interactions with the Druid API.

Scaladoc

Usage

You can either use the druid-client as a Scala library or from command-line.

Import to your Scala project:

  1. libraryDependencies ++= Seq("eu.m6r" %% "druid-client" % "0.1.2")

CLI

Task-Config

XML Example:

  1. <task:taskConfig xmlns:task="http://m6r.eu/druid/client/task-config">
  2. <!--1 or more repetitions:-->
  3. <dimensions>string</dimensions>
  4. <!--1 or more repetitions:-->
  5. <metrics>
  6. <type>string</type>
  7. <name>string</name>
  8. <fieldName>string</fieldName>
  9. </metrics>
  10. </task:taskConfig>

JSON Example (json config filename has to end with json):

  1. {
  2. "taskConfig": {
  3. "dimensions": [
  4. "string"
  5. ],
  6. "metrics": [
  7. {
  8. "type": "string",
  9. "name": "string",
  10. "fieldName": "string"
  11. }
  12. ]
  13. }
  14. }

You can use models.Utils.parseTaskConfig(file) to parse a task config file programmatically.

Build

We support Scala 2.11 and 2.12. To do a cross-build that create jars for all supported Scala
versions, do:

  1. sbt +package

To build fat jars:

  1. sbt +assembly

Publish artifact

  1. sbt +publishSigned

Upload Scaladoc to Github Pages

Build and upload Scaladoc documentation to Github pages.

  1. sbt ghpagesPushSite

TODO

  • Add scaladoc comments
  • Add documentation to the README. e.g.
    • methods description
    • parameters description
    • Examples
    • how to contribute
  • Add tests
  • Write to druid mailing list
  • Add to druid libraries page
  • Upload to maven central

Optional

  • Support more druid functions:
    • Queries
  • Build .deb with sbt.
  • Maybe upload .deb to ubuntu package sources.
  • Would be nice to support brew.