Giter VIP home page Giter VIP logo

clj-druid's People

Contributors

gbuisson avatar slipset avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

clj-druid's Issues

Wrong node-type in connect-with-zk docs

Doc states:

(connect {:zk {:host "127.0.0.1:2181,my-other-zk-host:2181" ; can contain multiple hosts separated by commas
               :discovery-path "/druid/discovery"
               :node-type "broker"}})

At least in my environment, this should be

(connect {:zk {:host "127.0.0.1:2181,my-other-zk-host:2181" ; can contain multiple hosts separated by commas
               :discovery-path "/druid/discovery"
               :node-type "druid:broker"}})

Migration example

I'm currently using cli-druid version 0.2.12, which lets me connect by calling

(let [zk-client (zk/connect "zk1,zk2,zk3")]
   (druid\zk-watch-node-list zk-client "/druid/discovery/druid:broker"))

Which suits me quite well, since I'm using the zookeeper client for other stuff as well.

How would this be done in 0.2.16?

Make it possible to bypass validations

Even though I like the query-validations, there are times when I need to do stuff that the schemas are
not allowing. Example at hand right now is working with thetaSketches, http://druid.io/docs/latest/development/extensions-core/datasketches-aggregators.html
which is not currently supported by the schema. As a work around I do this

(defn execute*
  "Issue a druid query"
  ([client balance-strategy druid-query http-params]
   (execute* client balance-strategy druid-query http-params false))
  ([client balance-strategy druid-query http-params non-strict?]
   (let [nodes (druid/nodes client)]
     (when-not non-strict?
       (v/validate druid-query (:queryType druid-query)))
     (when (empty? nodes)
       (throw (Exception.
               "No druid node available for query")))
     (http/post (balance-strategy nodes)
                (merge {:body (json/encode druid-query)
                        :as :text
                        :content-type :json}
                       http-params)))))

in my code.

Would you want this in cli-druid? if not, please just close this issue.

Update clj-http dependency

clj-druid uses version 2.0.0 of clj-http to send request to Druid. My application uses clj-druid and clj-http. I cannot use the latest version of clj-http which is 3.4.1.

Problems in README.md

I just started looking at this, since I need to access Druid from Clojure.

I noticed a couple of problems in the top-level README.md file:

  1. random isn't defined, as in (query client random (:queryType q) q). Maybe you meant randomize?
  2. execute isn't defined, as in (execute client random q)

Also, I'd appreciate a quick comment confirming whether this package should work (since I'm having some other exceptions). I'm using Clojure 1.8 (admittedly old).
Thanks,
Dan

example project is broken

Sounds like a dependency is missing:

Caused by: java.io.FileNotFoundException: Could not locate pjstadig/util__init.class or pjstadig/util.clj on classpath:

Wrong Schema

Apparently

"aggregator":{"type":"filtered","aggregator":
                          {"type":"longSum"
                          ,"name":"qualityRows"
                          ,"fieldName":"count"}
                    ,"filter":
                          {"type":"not"
                          ,"field":{"type":"selector","dimension":"quality","value":null}}

Is ok for druid but doesn't pass the cli-druid aggregation schema (clj-druid.schemas.aggregation). Or more precisely it try to use aggregator schema instead of filtered aggregator schema

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.