y42 / clj-druid Goto Github PK
View Code? Open in Web Editor NEWLicense: Eclipse Public License 1.0
License: Eclipse Public License 1.0
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"}})
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?
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.
It's spec'ed as [s/Str]
but should be s/Str
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.
From http://druid.io/docs/0.9.2/querying/granularities.html,
druid supports
all, none, second, minute, fifteen_minute, thirty_minute, hour, day, week, month, quarter and year.
cli-druid is missing
week, month, quarter and year
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:
random
isn't defined, as in (query client random (:queryType q) q)
. Maybe you meant randomize
?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
use 0.2.12
As indicated in the 0.8.3 release notes, min/max aggregators have been removed in favor of doubleMin, doubleMax, longMin, and longMax aggregators.
The service may be added with docker-compose
Sounds like a dependency is missing:
Caused by: java.io.FileNotFoundException: Could not locate pjstadig/util__init.class or pjstadig/util.clj on classpath:
Queries shall be validated only for :test profile
To latest compojure-api version
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.