Comments (9)
DruidConfiguration config = DruidConfiguration.builder().host("broker.druid.data.srv").endpoint("druid/v2/").build();
When we do config.getUrl()
, http://broker.druid.data.srv:8082/druid/v2/
Does this help you?
from druidry.
Right now, we don't have support for removing the port. Since in the case you gave, no port is specified, it will pick up default port, which is 80
in case of HTTP protocol. Below snippet should help.
DruidConfiguration config = DruidConfiguration.builder().host("broker.druid.data.srv").port(80) .endpoint("druid/v2/").build();
`
from druidry.
Right now, we don't have support for removing the port. Since in the case you gave, no port is specified, it will pick up default port, which is
80
in case of HTTP protocol. Below snippet should help.DruidConfiguration config = DruidConfiguration.builder().host("broker.druid.data.srv").port(80) .endpoint("druid/v2/").build(); `
The request I constructed with the above method returned "500 Internal Server Error error", but the same url and request I put in the Postman can request the result.
url:http://broker.druid.data.srv:80/druid/v2/
request:{
"dataSource": "SdkLog",
"queryType": "topN",
"intervals": [
"2018-12-29T17:31:15.643+08:00/2019-01-28T17:31:15.643+08:00"
],
"granularity": "all",
"filter": {
"type": "and",
"fields": [
{
"type": "selector",
"dimension": "tagId",
"value": "1.16.e.1"
}
]
},
"aggregations": [
{
"type": "longSum",
"name": "count",
"fieldName": "count"
}
],
"dimension": "adId",
"threshold": 5,
"metric": "count"
}
Are there any problems with the POST request you constructed?
from druidry.
Right now, we don't have support for removing the port. Since in the case you gave, no port is specified, it will pick up default port, which is
80
in case of HTTP protocol. Below snippet should help.DruidConfiguration config = DruidConfiguration.builder().host("broker.druid.data.srv").port(80) .endpoint("druid/v2/").build(); `
The request I constructed with the above method returned "500 Internal Server Error error", but the same url and request I put in the Postman can request the result.
url:http://broker.druid.data.srv:80/druid/v2/
request:{
"dataSource": "SdkLog",
"queryType": "topN",
"intervals": [
"2018-12-29T17:31:15.643+08:00/2019-01-28T17:31:15.643+08:00"
],
"granularity": "all",
"filter": {
"type": "and",
"fields": [
{
"type": "selector",
"dimension": "tagId",
"value": "1.16.e.1"
}
]
},
"aggregations": [
{
"type": "longSum",
"name": "count",
"fieldName": "count"
}
],
"dimension": "adId",
"threshold": 5,
"metric": "count"
}
Are there any problems with the POST request you constructed?
I tried it successfully in your “zapr/druidry” project, but it will fail in my own project. Is there any difference, such as pom file?
from druidry.
If it is possible, please share your dependencies and code-snipper for query generation
from druidry.
dependencies:
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ miui_ad_explorer_service ---
[INFO] miui_ad:miui_ad_explorer_service:jar:1.0-SNAPSHOT
[INFO] +- com.xiaomi:miui-ad-computation-interface:jar:1.0.2:compile
[INFO] | +- com.facebook.swift:swift-annotations:jar:0.15.0-mdf1.0.11:compile
[INFO] | +- com.facebook.swift:swift-generator-cli:jar:0.15.0-mdf1.0.11:compile
[INFO] | | +- com.facebook.swift:swift-generator:jar:0.15.0-mdf1.0.11:compile
[INFO] | | | +- com.facebook.swift:swift-idl-parser:jar:0.15.0-mdf1.0.11:compile
[INFO] | | | | - org.antlr:antlr-runtime:jar:3.5:compile
[INFO] | | | - org.antlr:stringtemplate:jar:4.0.2:compile
[INFO] | | +- com.google.code.findbugs:annotations:jar:2.0.2:compile
[INFO] | | - com.beust:jcommander:jar:1.30:compile
[INFO] | - org.apache.thrift:thrift:jar:0.5.0-mdf2.0.6:compile
[INFO] +- com.xiaomi.miui.ad:online_predict_swift_interface:jar:2.0.6:compile
[INFO] +- com.typesafe:config:jar:1.3.0:compile
[INFO] +- org.projectlombok:lombok:jar:1.16.16:compile
[INFO] +- miui_ad:miui_ad_offline_thrift:jar:1.0-SNAPSHOT:compile
[INFO] | +- com.xiaomi:xiaomi-thrift-shared:jar:2.0.2:compile
[INFO] | - commons-lang:commons-lang:jar:2.4:compile
[INFO] +- com.google.code.gson:gson:jar:2.8.1:compile
[INFO] +- org.springframework:spring-aop:jar:4.3.7.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:4.3.7.RELEASE:compile
[INFO] | - org.springframework:spring-core:jar:4.3.7.RELEASE:compile
[INFO] | - commons-logging:commons-logging:jar:1.2:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.5.2.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.5.2.RELEASE:compile
[INFO] | | - org.yaml:snakeyaml:jar:1.17:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.5.2.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.11:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.11:compile
[INFO] | | - org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.11:compile
[INFO] | +- org.hibernate:hibernate-validator:jar:5.3.4.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
[INFO] | | - com.fasterxml:classmate:jar:1.3.3:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.7:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] | | - com.fasterxml.jackson.core:jackson-core:jar:2.8.7:compile
[INFO] | +- org.springframework:spring-web:jar:4.3.7.RELEASE:compile
[INFO] | - org.springframework:spring-webmvc:jar:4.3.7.RELEASE:compile
[INFO] | - org.springframework:spring-expression:jar:4.3.7.RELEASE:compile
[INFO] +- mysql:mysql-connector-java:jar:5.1.10:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-log4j2:jar:1.5.2.RELEASE:compile
[INFO] | +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.9.0:compile
[INFO] | +- org.apache.logging.log4j:log4j-api:jar:2.9.0:compile
[INFO] | +- org.apache.logging.log4j:log4j-core:jar:2.9.0:compile
[INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.7.25:compile
[INFO] | - org.slf4j:jul-to-slf4j:jar:1.7.24:compile
[INFO] +- org.springframework.boot:spring-boot-starter-jdbc:jar:1.5.2.RELEASE:compile
[INFO] | +- org.apache.tomcat:tomcat-jdbc:jar:8.5.11:compile
[INFO] | | - org.apache.tomcat:tomcat-juli:jar:8.5.11:compile
[INFO] | - org.springframework:spring-jdbc:jar:4.3.7.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-aop:jar:1.5.2.RELEASE:compile
[INFO] | - org.aspectj:aspectjweaver:jar:1.6.12:compile
[INFO] +- org.springframework.boot:spring-boot-starter-thymeleaf:jar:1.5.2.RELEASE:compile
[INFO] | +- org.thymeleaf:thymeleaf-spring4:jar:2.1.5.RELEASE:compile
[INFO] | | - org.thymeleaf:thymeleaf:jar:2.1.5.RELEASE:compile
[INFO] | | +- ognl:ognl:jar:3.0.8:compile
[INFO] | | - org.unbescape:unbescape:jar:1.1.0.RELEASE:compile
[INFO] | - nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:jar:1.4.0:compile
[INFO] | - org.codehaus.groovy:groovy:jar:2.4.9:compile
[INFO] +- com.xiaomi.appstore:appstore-backend-thrift:jar:1.0.0-SNAPSHOT:compile
[INFO] | - org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- com.xiaomi:xiaomi-common-utils:jar:2.8.14:compile
[INFO] | +- com.google.guava:guava:jar:17.0:compile
[INFO] | +- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] | - commons-codec:commons-codec:jar:1.10:compile
[INFO] +- com.xiaomi:xiaomi-common-swift:jar:2.7.19:compile
[INFO] | +- com.facebook.nifty:nifty-core:jar:0.15.0-mdf1.0.8:compile
[INFO] | | +- javax.inject:javax.inject:jar:1:compile
[INFO] | | +- com.google.inject:guice:jar:3.0:compile
[INFO] | | | - aopalliance:aopalliance:jar:1.0:compile
[INFO] | | +- com.google.inject.extensions:guice-multibindings:jar:3.0:compile
[INFO] | | - io.airlift:units:jar:0.91:compile
[INFO] | +- io.netty:netty:jar:3.7.0.Final:compile
[INFO] | +- com.xiaomi:xiaomi-common-zookeeper:jar:2.8.14:compile
[INFO] | | +- org.apache.zookeeper:zookeeper:jar:3.4.5-mdh1.2.4:compile
[INFO] | | | +- jline:jline:jar:0.9.94:compile
[INFO] | | | +- com.xiaomi.infra:ext-log4j:jar:1.0.0-SNAPSHOT:compile
[INFO] | | | - org.codehaus.jettison:jettison:jar:1.1:compile
[INFO] | | | - stax:stax-api:jar:1.0.1:compile
[INFO] | | - zkclient:zkclient:jar:0.2.3:compile
[INFO] | +- com.xiaomi:xiaomi-swift-async-apis:jar:1.0.2:compile
[INFO] | +- com.facebook.swift:swift-service:jar:0.15.0-mdf1.0.10:compile
[INFO] | | +- com.facebook.swift:swift-codec:jar:0.15.0-mdf1.0.10:compile
[INFO] | | | +- org.ow2.asm:asm-all:jar:4.1:compile
[INFO] | | | - com.thoughtworks.paranamer:paranamer:jar:2.5.2:compile
[INFO] | | +- com.facebook.nifty:nifty-client:jar:0.15.0-mdf1.0.5:compile
[INFO] | | +- io.airlift:configuration:jar:0.91:compile
[INFO] | | | - org.apache.bval:bval-jsr303:jar:0.5:compile
[INFO] | | | - org.apache.bval:bval-core:jar:0.5:compile
[INFO] | | | - commons-beanutils:commons-beanutils-core:jar:1.8.3:compile
[INFO] | | +- io.airlift:stats:jar:0.91:compile
[INFO] | | | +- io.airlift:slice:jar:0.5:compile
[INFO] | | | - org.openjdk.jol:jol-core:jar:0.1:compile
[INFO] | | +- org.weakref:jmxutils:jar:1.16:compile
[INFO] | | - org.javassist:javassist:jar:3.21.0-GA:compile
[INFO] | +- commons-pool:commons-pool:jar:1.6:compile
[INFO] | +- org.apache.commons:cli:jar:1.2:compile
[INFO] | +- com.yammer.metrics:metrics-core:jar:2.2.0:compile
[INFO] | +- com.xiaomi.common.perfcounter:xiaomi-common-perfcounter:jar:2.8.14:compile
[INFO] | | +- commons-io:commons-io:jar:1.3.2:compile
[INFO] | | +- org.json:json:jar:20140107:compile
[INFO] | | - org.aspectj:aspectjrt:jar:1.8.9:compile
[INFO] | +- commons-validator:commons-validator:jar:1.4.0:compile
[INFO] | | +- commons-beanutils:commons-beanutils:jar:1.9.3:compile
[INFO] | | - commons-digester:commons-digester:jar:2.1:compile
[INFO] | +- com.xiaomi:xtrace-common:jar:1.0.72:compile
[INFO] | +- com.xiaomi:xtrace-client:jar:1.0.72:compile
[INFO] | | +- com.xiaomi:xtrace-base:jar:1.0.72:compile
[INFO] | | | +- com.xiaomi:xtrace-thrift:jar:1.0.72:compile
[INFO] | | | - org.elasticsearch:elasticsearch:jar:2.4.4:compile
[INFO] | | | +- org.apache.lucene:lucene-backward-codecs:jar:5.5.2:compile
[INFO] | | | +- org.apache.lucene:lucene-analyzers-common:jar:5.5.2:compile
[INFO] | | | +- org.apache.lucene:lucene-queries:jar:5.5.2:compile
[INFO] | | | +- org.apache.lucene:lucene-memory:jar:5.5.2:compile
[INFO] | | | +- org.apache.lucene:lucene-highlighter:jar:5.5.2:compile
[INFO] | | | +- org.apache.lucene:lucene-queryparser:jar:5.5.2:compile
[INFO] | | | | - org.apache.lucene:lucene-sandbox:jar:5.5.2:compile
[INFO] | | | +- org.apache.lucene:lucene-suggest:jar:5.5.2:compile
[INFO] | | | | - org.apache.lucene:lucene-misc:jar:5.5.2:compile
[INFO] | | | +- org.apache.lucene:lucene-join:jar:5.5.2:compile
[INFO] | | | | - org.apache.lucene:lucene-grouping:jar:5.5.2:compile
[INFO] | | | +- org.apache.lucene:lucene-spatial:jar:5.5.2:compile
[INFO] | | | | +- org.apache.lucene:lucene-spatial3d:jar:5.5.2:compile
[INFO] | | | | - com.spatial4j:spatial4j:jar:0.5:compile
[INFO] | | | +- org.elasticsearch:securesm:jar:1.0:compile
[INFO] | | | +- com.carrotsearch:hppc:jar:0.7.1:compile
[INFO] | | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.8.7:compile
[INFO] | | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.8.7:compile
[INFO] | | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.8.7:compile
[INFO] | | | +- com.ning:compress-lzf:jar:1.0.2:compile
[INFO] | | | +- com.tdunning:t-digest:jar:3.0:compile
[INFO] | | | - com.twitter:jsr166e:jar:1.1.0:compile
[INFO] | | - com.lmax:disruptor:jar:3.3.0:compile
[INFO] | +- com.xiaomi:rpc-security-base:jar:0.0.2:compile
[INFO] | - com.xiaomi:rpc-security-impl:jar:0.0.2:compile
[INFO] | - com.xiaomi:xiaomi-iauth-java-sdk:jar:2.0.0:compile
[INFO] | +- xerces:xercesImpl:jar:2.9.1:compile
[INFO] | +- com.xiaomi:xiaomi-common-xclient:jar:2.4.2:compile
[INFO] | - net.paoding:paoding-rose-portal:jar:1.1.1:compile
[INFO] +- miui_ad:miui_ad_common:jar:1.7.01:compile
[INFO] | +- org.apache.kafka:kafka_2.10:jar:0.8.1.1-mdh1.0.2:compile
[INFO] | | +- com.101tec:zkclient:jar:0.9:compile
[INFO] | | +- org.xerial.snappy:snappy-java:jar:1.0.5:compile
[INFO] | | +- net.sf.jopt-simple:jopt-simple:jar:3.2:compile
[INFO] | | - org.scala-lang:scala-library:jar:2.10.1:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.4.1:compile
[INFO] | +- org.apache.httpcomponents:httpcore:jar:4.4.1:compile
[INFO] | +- net.sf.json-lib:json-lib:jar:jdk15:2.4:compile
[INFO] | +- net.sf.ezmorph:ezmorph:jar:1.0.6:compile
[INFO] | +- com.sun.mail:javax.mail:jar:1.5.6:compile
[INFO] | | - javax.activation:activation:jar:1.1:compile
[INFO] | +- log4j:log4j:jar:1.2.17:compile
[INFO] | +- com.xiaomi:miui-ad-infra-cacheclient:jar:0.3.12:compile
[INFO] | | +- com.xiaomi:miui-ad-infra-metrics:jar:0.3.12:compile
[INFO] | | | - com.timgroup:java-statsd-client:jar:3.1.0:compile
[INFO] | | +- com.xiaomi:miui-ad-infra-util:jar:0.3.12:compile
[INFO] | | | - com.alibaba:transmittable-thread-local:jar:2.5.1:compile
[INFO] | | - com.xiaomi:miui-ad-infra-common:jar:0.3.12:compile
[INFO] | +- com.xiaomi:miui-ad-infra-kafka:jar:0.3.12:compile
[INFO] | +- redis.clients:jedis:jar:3.0.1-SNAPSHOT:compile
[INFO] | | - org.apache.commons:commons-pool2:jar:2.4.2:compile
[INFO] | +- commons-dbcp:commons-dbcp:jar:1.2.2:compile
[INFO] | +- com.google.protobuf:protobuf-java:jar:2.5.0:compile
[INFO] | +- miui_ad:miui_ad_thrift:jar:1.7.01:compile
[INFO] | +- miui_ad:exchange_thrift:jar:1.7.01:compile
[INFO] | +- miui_ad:miui_ad_dsp_thrift:jar:1.7.01:compile
[INFO] | +- miui_ad:select_thrift:jar:1.7.01:compile
[INFO] | +- miui_ad:miui_ad_ssp_service:jar:1.7.01:compile
[INFO] | | +- org.eclipse.collections:eclipse-collections:jar:9.0.0:compile
[INFO] | | - com.alibaba:fastjson:jar:1.2.47:compile
[INFO] | +- com.xiaomi:xiaomi-common-thrift:jar:2.8.14:compile
[INFO] | | - com.xiaomi:xiaomi-thrift-scribe:jar:2.0.3:compile
[INFO] | +- com.xiaomi.data:commons-thrift:jar:0.16.3:compile
[INFO] | | - com.twitter.elephantbird:elephant-bird-core:jar:4.4:compile
[INFO] | | +- com.twitter.elephantbird:elephant-bird-hadoop-compat:jar:4.4:compile
[INFO] | | +- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] | | - com.hadoop.gplcompression:hadoop-lzo:jar:0.4.16:compile
[INFO] | +- com.xiaomi.ad:ip-utils_2.10:jar:0.1.4-20181218:compile
[INFO] | | - com.typesafe.scala-logging:scala-logging-slf4j_2.10:jar:2.1.2:compile
[INFO] | | +- com.typesafe.scala-logging:scala-logging-api_2.10:jar:2.1.2:compile
[INFO] | | - org.scala-lang:scala-reflect:jar:2.10.4:compile
[INFO] | +- com.xiaomi.data:data-platform-spec:jar:0.0.2-SNAPSHOT:compile
[INFO] | +- com.xiaomi.infra:pegasus-client:jar:1.5.2-for-thrift-0.5:compile
[INFO] | | - io.netty:netty-all:jar:4.0.33.Final:compile
[INFO] | +- miui_ad:miui_ad_common_model:jar:1.7.01:compile
[INFO] | +- com.ctrip.framework.apollo:apollo-client:jar:0.9.1-ad-SNAPSHOT:compile
[INFO] | | - com.ctrip.framework.apollo:apollo-core:jar:0.9.1-ad-SNAPSHOT:compile
[INFO] | +- com.xiaomi.miui.dmp:idm-client:jar:1.3.7:compile
[INFO] | | - com.xiaomi.miui.ad.infra:redis:jar:1.1.0-SNAPSHOT:compile
[INFO] | - com.xiaomi:miui-ad-infra-rpc:jar:0.3.12:compile
[INFO] | +- com.xiaomi:miui-ad-infra-thrift:jar:0.3.12:compile
[INFO] | +- com.xiaomi:miui-ad-infra-circuit-breaker:jar:0.3.12:compile
[INFO] | +- com.xiaomi:miui-ad-infra-service-manager:jar:0.3.12:compile
[INFO] | +- com.netflix.hystrix:hystrix-core:jar:1.5.13:compile
[INFO] | | +- com.netflix.archaius:archaius-core:jar:0.4.1:compile
[INFO] | | | - commons-configuration:commons-configuration:jar:1.8:compile
[INFO] | | +- io.reactivex:rxjava:jar:1.2.0:compile
[INFO] | | - org.hdrhistogram:HdrHistogram:jar:2.1.9:compile
[INFO] | +- com.xiaomi:scribe-log4j:jar:2.7.19:compile
[INFO] | | +- com.xiaomi:xlogger-core:jar:2.7.19:compile
[INFO] | | - com.xiaomi.channel:scribe-log4j:jar:0.0.1:compile
[INFO] | - com.xiaomi.data:data-platform-spec-miuiads:jar:0.0.1-SNAPSHOT:compile
[INFO] +- com.xiaomi.miui:miui-ad-core:jar:2.0.95:compile
[INFO] | +- com.xiaomi.marketing:marketing-emailsender-thrift:jar:1.0.0-SNAPSHOT:compile
[INFO] | +- com.xiaomi.miui.developer:miui-developer-common:jar:0.0.1-SNAPSHOT:compile
[INFO] | | +- com.xiaomi:miui-file-uploader:jar:1.0.3:compile
[INFO] | | +- com.xiaomi.marketing:miui-common-exception:jar:1.0.0-SNAPSHOT:compile
[INFO] | | - com.xiaomi.miui.developer:miui-developer-thrift:jar:1.0.0-SNAPSHOT:compile
[INFO] | +- com.xiaomi.miliao:miliao-serviceapi:jar:1.0.3-SNAPSHOT:compile
[INFO] | | +- com.xiaomi:miliao-common:jar:0.0.2-SNAPSHOT:compile
[INFO] | | | +- com.xiaomi:xiaomi-common-mq:jar:1.0-SNAPSHOT:compile
[INFO] | | | +- com.danga:java-memcached:jar:2.5.1.2-xiaomi-SNAPSHOT:compile
[INFO] | | | +- javax.servlet:servlet-api:jar:2.4:compile
[INFO] | | | +- jmagick:jmagick:jar:6.40:compile
[INFO] | | | +- oro:oro:jar:2.0.8:compile
[INFO] | | | - com.rabbitmq:amqp-client:jar:2.4.1:compile
[INFO] | | +- com.xiaomi:xiaomi-common-dal:jar:1.0.5-SNAPSHOT:compile
[INFO] | | | +- jaxen:jaxen:jar:1.1.6:compile
[INFO] | | | - net.sf:jsqlparser:jar:0.7.0:compile
[INFO] | | +- com.xiaomi:xiaomi-thrift-api:jar:1.0.1-SNAPSHOT:compile
[INFO] | | | +- com.xiaomi:xiaomi-thrift-messaging:jar:1.0-SNAPSHOT:compile
[INFO] | | | +- com.xiaomi:xiaomi-thrift-micloud-common:jar:1.0-SNAPSHOT:compile
[INFO] | | | - com.xiaomi:xiaomi-thrift-antispam:jar:1.0-SNAPSHOT:compile
[INFO] | | +- org.codehaus.jackson:jackson-core-asl:jar:1.9.2:compile
[INFO] | | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.2:compile
[INFO] | | +- com.xiaomi:ipWrapper:jar:0.0.1-SNAPSHOT:compile
[INFO] | | +- com.basho.riak:riak-client:jar:1.1.0:compile
[INFO] | | | - com.basho.riak.protobuf:riak-pb:jar:1.2.1:compile
[INFO] | | +- com.linkedin:sensei-java-client:jar:1.5.0:compile
[INFO] | | +- voldemort:voldemort:jar:0.90.1:compile
[INFO] | | +- com.xiaomi:xiaomi-thrift-hotspots:jar:1.0-SNAPSHOT:compile
[INFO] | | - IKAnalyzer:IKAnalyzer:jar:4.0.6:compile
[INFO] | +- com.xiaomi.data:user-profile-common:jar:0.0.1-SNAPSHOT:compile
[INFO] | | +- com.xiaomi.data:data-market-common:jar:0.0.1-SNAPSHOT:compile
[INFO] | | | +- org.apache.hadoop:hadoop-common:jar:2.0.0-mdh1.1.0:compile
[INFO] | | | | +- org.apache.hadoop:hadoop-annotations:jar:2.0.0-mdh1.1.0:compile
[INFO] | | | | +- org.apache.commons:commons-math:jar:2.1:compile
[INFO] | | | | +- xmlenc:xmlenc:jar:0.52:compile
[INFO] | | | | +- org.mortbay.jetty:jetty:jar:6.1.26.cloudera.2:compile
[INFO] | | | | +- org.mortbay.jetty:jetty-util:jar:6.1.26.cloudera.2:compile
[INFO] | | | | +- javax.servlet.jsp:jsp-api:jar:2.1:runtime
[INFO] | | | | +- commons-el:commons-el:jar:1.0:runtime
[INFO] | | | | +- net.java.dev.jets3t:jets3t:jar:0.6.1:compile
[INFO] | | | | +- org.mockito:mockito-all:jar:1.9.5:test
[INFO] | | | | +- org.apache.avro:avro:jar:1.5.3:compile
[INFO] | | | | +- net.sf.kosmosfs:kfs:jar:0.3:compile
[INFO] | | | | +- org.apache.hadoop:hadoop-auth:jar:2.0.0-mdh1.1.0:compile
[INFO] | | | | +- com.jcraft:jsch:jar:0.1.42:compile
[INFO] | | | | - jdk.tools:jdk.tools:jar:1.6:system
[INFO] | | | +- com.xiaomi.data:commons-encode:jar:0.16.3:compile
[INFO] | | | - com.xiaomi.data:commons-misc:jar:0.16.3:compile
[INFO] | | | - org.jruby:jruby-complete:jar:1.6.5:compile
[INFO] | | - com.google.code:cjftransform:jar:1.0.1:compile
[INFO] | +- com.xiaomi.market:miui-dev-common:jar:0.0.2-SNAPSHOT:compile
[INFO] | +- com.xiaomi.miui:miui-stats-utils:jar:2.3-SNAPSHOT:compile
[INFO] | | +- junit:junit:jar:4.11:test
[INFO] | | | - org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | | +- commons-cli:commons-cli:jar:1.2:compile
[INFO] | | - com.googlecode.aviator:aviator:jar:2.2.1:compile
[INFO] | +- com.xiaomi:miui-analytics-util:jar:1.0.5:compile
[INFO] | | +- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] | | +- org.jsoup:jsoup:jar:1.7.2:compile
[INFO] | | +- org.apache.ant
[INFO] | | | - org.apache.ant:ant-launcher:jar:1.8.2:compile
[INFO] | | +- org.bouncycastle:bcprov-jdk16:jar:1.46:compile
[INFO] | | - org.apache.poi:poi-excelant:jar:3.10-beta1:compile
[INFO] | | +- org.apache.poi:poi:jar:3.10-beta1:compile
[INFO] | | - org.apache.poi:poi-ooxml:jar:3.10-beta1:compile
[INFO] | | - org.apache.poi:poi-ooxml-schemas:jar:3.10-beta1:compile
[INFO] | | - org.apache.xmlbeans:xmlbeans:jar:2.3.0:compile
[INFO] | +- com.xiaomi.appstore:appstore-backend-thrift:jar:jdk16:1.0.0-SNAPSHOT:compile
[INFO] | - miui_ad:miui_ad_utils:jar:1.0-SNAPSHOT:compile
[INFO] +- miui_ad:miui_ad_select_service:jar:1.0-SNAPSHOT:compile
[INFO] | +- com.xiaomi.miui:miui-ad-service:jar:1.0-SNAPSHOT:compile
[INFO] | | +- com.xiaomi.miui:emi-common-biz:jar:0.0.1-SNAPSHOT:compile
[INFO] | | | +- com.xiaomi.miui:emi-account:jar:0.0.1-SNAPSHOT:compile
[INFO] | | | | - com.xiaomi.miui:emi-common:jar:0.0.1-SNAPSHOT:compile
[INFO] | | | +- com.xiaomi.miui:polaris-audit:jar:0.0.2-SNAPSHOT:compile
[INFO] | | | - com.xiaomi.miui:polaris-common:jar:0.0.2-SNAPSHOT:compile
[INFO] | | | +- com.baomidou:mybatis-plus-boot-starter:jar:3.0-beta:compile
[INFO] | | | +- com.xiaomi.miui:polaris-i18n-messages:jar:0.0.2-SNAPSHOT:compile
[INFO] | | | +- org.apache.commons:commons-jcs-core:jar:2.2:compile
[INFO] | | | - org.apache.httpcomponents:fluent-hc:jar:4.5.3:compile
[INFO] | | +- com.baomidou:mybatis-plus:jar:3.0-beta:compile
[INFO] | | | +- com.baomidou:mybatis-plus-extension:jar:3.0-beta:compile
[INFO] | | | | - com.baomidou:mybatis-plus-core:jar:3.0-beta:compile
[INFO] | | | | +- com.baomidou:mybatis-plus-annotation:jar:3.0-beta:compile
[INFO] | | | | - com.github.jsqlparser:jsqlparser:jar:1.2:compile
[INFO] | | | - com.baomidou:mybatis-plus-generator:jar:3.0-beta:compile
[INFO] | | | - org.apache.velocity:velocity-engine-core:jar:2.0:optional
[INFO] | | +- com.xiaomi:bmw-jade-route:jar:1.0.4:compile
[INFO] | | | +- xstream:xstream:jar:1.3.1:compile
[INFO] | | | - com.xiaomi:dal:jar:0.1:compile
[INFO] | | +- com.xiaomi.appstore:appstore-common:jar:0.0.1-SNAPSHOT:compile
[INFO] | | | +- commons-net:commons-net:jar:3.3:compile
[INFO] | | | +- net.sf.supercsv:super-csv:jar:2.0.0-beta-1:compile
[INFO] | | | +- com.cybozu.labs:langdetect:jar:1.1-20120112:compile
[INFO] | | | | - net.arnx:jsonic:jar:1.2.7:compile
[INFO] | | | +- org.apache.lucene:lucene-core:jar:6.6.1:compile
[INFO] | | | +- com.xiaomi.appstore:appstore-common-utils:jar:1.0.0-SNAPSHOT:compile
[INFO] | | | +- com.xiaomi:passport-service-api:jar:0.2.32:compile
[INFO] | | | +- com.xiaomi.appstore:appstore-abtest:jar:0.0.1-SNAPSHOT:compile
[INFO] | | | +- com.xiaomi.dlabs:vr-apk-parser:jar:0.0.12:compile
[INFO] | | | | - org.imgscalr:imgscalr-lib:jar:4.2:compile
[INFO] | | | - com.xiaomi.appstore:appstore-activity-thrift:jar:1.0.0-SNAPSHOT:compile
[INFO] | | +- com.xiaomi:miui-ad-cpm-planning-thrift:jar:1.1.4.14:compile
[INFO] | | +- com.xiaomi.comment:comment-common:jar:0.0.1-SNAPSHOT:compile
[INFO] | | | - com.chenlb.mmseg4j:all:jar:1.8.4:compile
[INFO] | | +- org.springframework:spring-test:jar:2.5.6:test
[INFO] | | +- miui_ad:miui-ad-keyword-thrift:jar:1.0-SNAPSHOT:compile
[INFO] | | | - miui_ad:miui-ad-relevance-thrift:jar:1.0-SNAPSHOT:compile
[INFO] | | +- org.spockframework:spock-core:jar:1.0-groovy-2.4:compile
[INFO] | | - org.spockframework:spock-spring:jar:1.0-groovy-2.4:compile
[INFO] | | - org.codehaus.groovy:groovy-all:jar:2.4.9:compile
[INFO] | +- com.xiaomi.marketing:miui-common-utils:jar:1.0.0-SNAPSHOT:compile
[INFO] | | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | - xml-apis:xml-apis:jar:1.4.01:compile
[INFO] | +- com.xiaomi.appstore:appstore-common-thrift-utils:jar:1.0.0-SNAPSHOT:compile
[INFO] | +- com.xiaomi.miui:miui-comment-thrift:jar:0.0.1-SNAPSHOT:compile
[INFO] | +- net.paoding:paoding-rose:jar:1.1.1:compile
[INFO] | | +- javax.persistence:persistence-api:jar:1.0:compile
[INFO] | | +- commons-fileupload:commons-fileupload:jar:1.2.1:compile
[INFO] | | +- org.apache.velocity:velocity:jar:1.6.2:compile
[INFO] | | - org.apache.velocity:velocity-tools:jar:1.3:compile
[INFO] | +- net.paoding:paoding-rose-scanning:jar:1.1.1:compile
[INFO] | +- net.paoding:paoding-rose-jade:jar:1.1.1:compile
[INFO] | | - commons-jexl:commons-jexl:jar:1.1:compile
[INFO] | +- org.springframework:spring-tx:jar:4.3.7.RELEASE:compile
[INFO] | +- com.xiaomi.marketing:miui-common-aoplog:jar:1.0.0-SNAPSHOT:compile
[INFO] | +- cglib:cglib-nodep:jar:2.2:compile
[INFO] | +- org.hamcrest:hamcrest-all:jar:1.3:compile
[INFO] | +- com.xiaomi.data:ip-tools:jar:0.0.1-SNAPSHOT:compile
[INFO] | +- org.springframework:spring-context:jar:4.3.7.RELEASE:compile
[INFO] | - com.xiaomi:miui-ad-infra-logger-log4j:jar:0.3.12:compile
[INFO] | +- com.xiaomi.infra.galaxy:galaxy-lcs-log4j:jar:2.0.26:compile
[INFO] | | +- com.xiaomi.infra.galaxy:galaxy-lcs-common:jar:2.0.26:compile
[INFO] | | | +- com.xiaomi.infra.galaxy:galaxy-thrift-api:jar:1.2.8:compile
[INFO] | | | +- com.xiaomi.infra.galaxy:galaxy-talos-common:jar:2.3.1:compile
[INFO] | | | | +- com.xiaomi.infra:hbase-client:jar:1.8.1:compile
[INFO] | | | | | +- com.xiaomi.infra:themis-client:jar:1.0-SNAPSHOT:compile
[INFO] | | | | | | +- com.xiaomi.infra:themis-coprocessor:jar:tests:1.0-SNAPSHOT:compile
[INFO] | | | | | | - com.xiaomi.infra:chronos-client:jar:1.2.1-thrift0.5.0:compile
[INFO] | | | | | - com.xiaomi.infra:themis-coprocessor:jar:1.0-SNAPSHOT:compile
[INFO] | | | | +- com.twitter.common:util:jar:0.0.92:compile
[INFO] | | | | | +- com.twitter.common:util-executor-service-shutdown:jar:0.0.47:compile
[INFO] | | | | | +- com.twitter.common:jdk-logging:jar:0.0.41:compile
[INFO] | | | | | +- com.twitter.common:base:jar:0.0.82:compile
[INFO] | | | | | | - com.twitter.common:util-system-mocks:jar:0.0.67:compile
[INFO] | | | | | +- com.twitter.common:collections:jar:0.0.69:compile
[INFO] | | | | | +- com.twitter.common:quantity:jar:0.0.66:compile
[INFO] | | | | | - com.twitter.common:stats:jar:0.0.89:compile
[INFO] | | | | | +- com.twitter.common:stat-registry:jar:0.0.24:compile
[INFO] | | | | | | - com.twitter.common:stat:jar:0.0.26:compile
[INFO] | | | | | +- com.twitter.common:stats-provider:jar:0.0.53:compile
[INFO] | | | | | +- com.twitter.common:application-action:jar:0.0.66:compile
[INFO] | | | | | - com.twitter.common:util-sampler:jar:0.0.50:compile
[INFO] | | | | - org.apache.curator:curator-test:jar:2.4.0:compile
[INFO] | | | +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] | | | - dnsjava:dnsjava:jar:2.1.8:compile
[INFO] | | +- com.xiaomi.infra.galaxy:galaxy-lcs-log-core:jar:2.0.26:compile
[INFO] | | +- com.xiaomi.infra.galaxy:galaxy-lcs-monitor-client:jar:2.0.26:compile
[INFO] | | | - com.codahale.metrics:metrics-core:jar:3.0.2:compile
[INFO] | | +- com.xiaomi.infra.galaxy:galaxy-lcs-thrift:jar:2.0.26:compile
[INFO] | | - com.xiaomi.infra.galaxy:galaxy-talos-sdk:jar:2.3.3:compile
[INFO] | | - com.xiaomi.infra.galaxy:galaxy-client-java:jar:1.2.5:compile
[INFO] | | - com.fasterxml.uuid:java-uuid-generator:jar:3.1.3:compile
[INFO] | - com.xiaomi:miui-ad-infra-logger-common:jar:0.3.12:compile
[INFO] +- com.xiaomi.misearch:appsearch-thrift:jar:1.0.0:compile
[INFO] | +- com.xiaomi.appstore:appstore-service-thrift:jar:1.0.0-SNAPSHOT:compile
[INFO] | +- org.apache.logging.log4j:log4j-1.2-api:jar:2.7:compile
[INFO] | +- org.apache.logging.log4j:log4j-jcl:jar:2.7:compile
[INFO] | +- org.apache.logging.log4j:log4j-jul:jar:2.7:compile
[INFO] | - args4j:args4j:jar:2.0.26:compile
[INFO] +- com.xiaomi.misearch:appsearch-suggest-thrift:jar:0.0.1-SNAPSHOT:compile
[INFO] | - com.xiaomi.misearch:common-thrifts:jar:0.0.1-SNAPSHOT:compile
[INFO] +- oauth.signpost:signpost-core:jar:1.2.1.2:compile
[INFO] +- org.mybatis.spring.boot:mybatis-spring-boot-starter:jar:1.2.0:compile
[INFO] | +- org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:jar:1.2.0:compile
[INFO] | +- org.mybatis:mybatis:jar:3.4.2:compile
[INFO] | - org.mybatis:mybatis-spring:jar:1.3.1:compile
[INFO] +- com.alibaba:druid:jar:1.1.1:compile
[INFO] | +- com.alibaba:jconsole:jar:1.8.0:system
[INFO] | - com.alibaba:tools:jar:1.8.0:system
[INFO] +- in.zapr.druid:druidry:jar:2.11:compile
[INFO] | +- joda-time:joda-time:jar:2.9.7:compile
[INFO] | +- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.8.7:compile
[INFO] | +- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] | +- org.glassfish.jersey.core:jersey-client:jar:2.26:compile
[INFO] | | +- javax.ws.rs:javax.ws.rs-api:jar:2.1:compile
[INFO] | | +- org.glassfish.jersey.core:jersey-common:jar:2.26:compile
[INFO] | | | +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] | | | - org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] | | - org.glassfish.hk2.external:javax.inject:jar:2.5.0-b42:compile
[INFO] | +- org.glassfish.jersey.media:jersey-media-json-jackson:jar:2.25.1:compile
[INFO] | | +- org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.25.1:compile
[INFO] | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.8.7:compile
[INFO] | | - com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.8.7:compile
[INFO] | | - com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.8.7:compile
[INFO] | +- org.glassfish.jersey.inject:jersey-hk2:jar:2.26:compile
[INFO] | | - org.glassfish.hk2:hk2-locator:jar:2.5.0-b42:compile
[INFO] | | +- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.5.0-b42:compile
[INFO] | | +- org.glassfish.hk2:hk2-api:jar:2.5.0-b42:compile
[INFO] | | - org.glassfish.hk2:hk2-utils:jar:2.5.0-b42:compile
[INFO] | - org.glassfish.jersey.connectors:jersey-apache-connector:jar:2.26:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.5:compile
[INFO] +- com.googlecode.rapid-framework:rapid-generator:jar:4.0.6:compile
[INFO] | +- org.freemarker:freemarker:jar:2.3.25-incubating:compile
[INFO] | - com.h2database:h2:jar:1.4.177:test
[INFO] +- org.jasig.cas.client:cas-client-core:jar:3.5.0:compile
[INFO] +- com.xiaomi.miui.ad:matrix-unistore-client:jar:1.2.0:compile
[INFO] | +- com.xiaomi.miui.ad:matrix-unistore-thrift:jar:1.2.0:compile
[INFO] | - com.xiaomi.miui.ad:matrix-unistore-dao:jar:1.2.0:compile
[INFO] +- miui_ad:miui_ad_frequency_capping_common:jar:0.0.8:compile
[INFO] | - net.sf.json-lib:json-lib:jar:2.4:compile
[INFO] +- miui_ad:miui_ad_frequency_capping_thrift:jar:0.0.8:compile
[INFO] +- miui_ad:miui_ad_global_iputils:jar:1.0.14:compile
[INFO] +- miui_ad:miui_ad_iputils:jar:1.3:compile
[INFO] | - org.eclipse.collections:eclipse-collections-api:jar:9.2.0:compile
[INFO] - org.springframework.boot:spring-boot-devtools:jar:1.5.2.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot:jar:1.5.2.RELEASE:compile
[INFO] - org.springframework.boot:spring-boot-autoconfigure:jar:1.5.2.RELEASE:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.287 s
[INFO] Finished at: 2019-02-25T16:43:32+08:00
[INFO] ------------------------------------------------------------------------
from druidry.
code-snipper:
List sdkAdInfoLites = new ArrayList<>();
SelectorFilter selectorFilter = new SelectorFilter("tagId", "1.16.e.1");
AndFilter filter = new AndFilter(Arrays.asList(selectorFilter));
DruidAggregator aggregator = new LongSumAggregator("count", "count");
List intervals = DruidUtil.getZaprInterval(new DateTime(), PERIOD_ONE_MONTH);
Granularity granularity = new SimpleGranularity(PredefinedGranularity.ALL);
DruidDimension dimension = new SimpleDimension("adId");
TopNMetric metric = new SimpleMetric("count");
DruidTopNQuery query = DruidTopNQuery.builder()
.dataSource(DATA_SOURCE)
.dimension(dimension)
.threshold(5)
.topNMetric(metric)
.granularity(granularity)
.filter(filter)
.aggregators(Arrays.asList(aggregator))
.intervals(intervals)
.build();
ObjectMapper mapper = new ObjectMapper();
try {
String requiredJson = mapper.writeValueAsString(query);
System.out.println("Ethan query test:" + requiredJson);
DruidConfiguration config = DruidConfiguration
.builder()
.host("broker.druid.data.srv")
.port(80)
.endpoint("druid/v2/")
.build();
DruidClient client = new DruidJerseyClient(config);
client.connect();
String result = client.query(query);
System.out.println("Ethan result test:" + result);
sdkAdInfoLites = client.query(query, SdkAdInfoLite.class);
System.out.println("Ethan result test:" + sdkAdInfoLites);
client.close();
} catch (Exception e) {
System.out.println("Ethan error test:" + ExceptionUtil.printStackTrace(e));
log.error("query druid error", e);
}
from druidry.
Going to be out this week. Would look into it once I am back
from druidry.
Closing due to inactivity, if you are still facing the issue feel free to comment/reopen the issue.
Edit : refer #89 if it helps
from druidry.
Related Issues (20)
- Removal of JAX-RS Dependency
- In the examples, there is a bug around creating `DruidTopNQuery` HOT 1
- Cloud you update the README document? HOT 1
- Subtotalspec missing in the API HOT 4
- Looking for example of using https client with basic authentication. HOT 2
- Support offset in Scan Query
- Can druidry query metadata of datasources?
- Add HTTP Basic Auth to DruidJerseyClientAuth
- Add some additional aggregators
- Construct druidry query from json
- Make Context constructor public
- java.lang.NoSuchMethodError: javax.ws.rs.core.MultivaluedMap.addAll(Ljava/lang/Object;[Ljava/lang/Object;)V HOT 1
- Can't InFilter, OrFilter, and AndFilter all exist together? HOT 1
- Enable ordering for DruidScanQuery HOT 1
- Process Scan query result in chunks
- Support @Builder(toBuilder = true) for Context
- How to add offset value in DefaultLimitSpec using groupby query ? HOT 1
- Druidry should correctly handle Druid query errors
- Question: Is this repository still being maintained? HOT 2
- Can I convert it to the corresponding query entity through json
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from druidry.