kairosdb / kairosdb-client Goto Github PK
View Code? Open in Web Editor NEWJava Client for KairosDB
Java Client for KairosDB
Should check return codes and do something besides letting gson freak out. Just say'n.
Currently only json input is supported. It would be great if gzip support is added to the pushMetric API.
In Metric.java, I tried using addTags but for some reason, it wasn't adding the tags. When I debugged it, I found that you were using same name variable "tags" locally and globally and therefore, tags from map wasn't added into the global variable. Please use this.tags on line 76
I get a 500 error whenever I try to add a metric. I simplified my code to reproduce and inserted below:
try {
MetricBuilder builder = MetricBuilder.getInstance();
Metric metric = builder.addMetric("Test");
metric.addTag("Host", "localhost");
metric.addDataPoint(System.currentTimeMillis(), 10L);
System.out.println(builder.build());
Response response = httpClient.pushMetrics(builder);
if (response.getStatusCode() != 200) {
System.out.println(response.getErrors().toString());
throw new Exception("Did not return 200");
}
} finally {
httpClient.shutdown();
}
The resulting JSON string is as follows:
[{"datapoints":[[1374407396775,10]],"name":"Test","dataPoints":[{"value":10,"integer":true,"timestamp":1374407396775}],"tags":{"Host":"localhost"}}]
The error message with the 500 errors is as follows:
[Expected a name but was BEGIN_ARRAY at line 1 column 65]
It appears that the build is using both the "timestamp" with "value" for a single data point and "datapoints" at the same time.
Bug in Metrics#addTags(Map tags) - line 76
The setter doesn't reference the instance field, this.tags, so it doesn't modify the field.
fixed in my fork, Pull request to follow
Due to the change in the way aggregators are submitted for datapoint queries, the client API is now broken for the master branch of KairosDB.
From my understanding, KairosDB Java Client uses Apache Http Client behind the scene. It's using default value of 2 in max connection per route. I have a multi-threaded application that shares the same KairosDB client instance, but I had to write a subclass to extend Kairos HttpClient so I can pass in a new Apache Http Client with a higher max connection count.
It would be nice if the max connection per route is configurable in the default client.
There should be an option to pass timeout to HttpClient in case if server cannot be reached.
When I use this in a springboot project with async, erros shows like:
java.lang.IllegalStateException: Connection pool shut down
at org.apache.http.util.Asserts.check(Asserts.java:34) ~[httpcore-4.4.8.jar:4.4.8]
at org.apache.http.pool.AbstractConnPool.lease(AbstractConnPool.java:191) ~[httpcore-4.4.8.jar:4.4.8]
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.requestConnection(PoolingHttpClientConnectionManager.java:257) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:176) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) ~[httpclient-4.5.3.jar:4.5.3]
at org.kairosdb.client.HttpClient.execute(HttpClient.java:107) ~[client-2.2.0.jar:na]
at org.kairosdb.client.HttpClient.postData(HttpClient.java:76) ~[client-2.2.0.jar:na]
at org.kairosdb.client.AbstractClient.pushMetrics(AbstractClient.java:87) ~[client-2.2.0.jar:na]
at org.kairosdb.client.AbstractClient.getResponse(AbstractClient.java:177)
at org.kairosdb.client.AbstractClient.pushMetrics(AbstractClient.java:132)
I guess the server is either returning malformed JSON or just does not include "errors" there.
Cannot tell because the actual response is not logged.
Also have no idea how to reproduce as it happens from time to time only.
As of now, the Kairosdb-Client is a bit incomplete because it provides no support for the management of Rollups. The company I am working for needs rollups to create preaggregated data, so I will need to write some classes for this. Do you also see this as a sensible extension for the kairosdb-client?
I am trying to create a DataGapsMarkingAggregator from a java test, and it throws a NullPointerException when trying to deserialize the response.
As some of the values will return null, and that is exactly what I want, JsonMapper throws a NullPointerException
mapper.fromJson(json, typeOfT);
I debugged the code and the method getBody(stream);
is returning the data correctly. Then it throws the exception inside Class QueryResponse, Line 75,
KairosQueryResponse response = mapper.fromJson(body, KairosQueryResponse.class);
I am using KairosDb-Client version 2.1.1
Furthermore, Is there a way to tell kairos explicitly to ignore null values or what should I do?
Thank you!
Hi,
I had an issue building the client using maven with netbeans. In the pom.xml file, I first got an error telling me I needed a version with the maven-gpg-plugin. I added 1.5, but then got the following error: Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.5:sign. Tried with 1.4, but build stopped on passphrase.
I tried deleting the maven repository, but it had the same result. In the end to get a successful build I removed these lines from the pom.xml file completely:
org.apache.maven.plugins
maven-gpg-plugin
1.5
sign-artifacts
verify
sign
Is there a way to build without having to do this?
Regards,
MS
I reuse the same MetricBuilder to collect a batch/bulk of Metric
s before sending them thru the wire but it failed with:
java.lang.ArrayIndexOutOfBoundsException: 887
at java.util.ArrayList.add(ArrayList.java:463)
at org.kairosdb.client.builder.MetricBuilder.addMetric(MetricBuilder.java:68)
So it seems MetricBuilder is not prepared to be used in multi-threaded environment.
Are there any recommendations how to do this ?
My application does monitoring.monitor("measurement", value, tags)
all over the place. I don't want to make single HTTP call for all of them.
Hi,
Am facing a few problems trying to run this in windows eclipse.
mvn package fails..
Running org.kairosdb.client.ClientIntegrationTest
java.io.IOException: Unable to delete file: build\h2db\kairosdb.h2.db
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2106)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1583)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1465)
seems the same process holds lock on the file.
Even after taking all the jars from kairosdb/lib and taking http-client 4.3.3
i get following error..
Exception in thread "main" java.lang.NoSuchFieldError: INSTANCE
at org.apache.http.impl.io.DefaultHttpRequestWriterFactory.(DefaultHttpRequestWriterFactory.java:52)
...
at org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:726)
at org.kairosdb.client.HttpClient.(HttpClient.java:50)
Can you please check?
Regards
Sanjay
Is the client available in some maven repository?
here's may code to query:
QueryBuilder builder = QueryBuilder.getInstance();
builder.setStart(2, TimeUnit.HOURS)
.addMetric("metric1")
.addAggregator(AggregatorFactory.createMinAggregator(1, TimeUnit.MINUTES))
the response.getErrors() says:
[query.metric[0].aggregators[0].m_sampling may not be null]
It may be Sampling aggregators serialize issue.
Hi ,
While pushing metrics using metric builder , I am getting the below error :
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/HttpResponse
at com.kairosdb.KairosPushTest.main(KairosPushTest.java:24)
Caused by: java.lang.ClassNotFoundException: org.apache.http.HttpResponse
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more
I am using client version 2.2.0 .
Hi,
I couldn't fine exclude_tags option for QueryMetrics in Java Client API. I think, it is not supported in client. Can you please let me know the API if already supported? or Kindly add "exclude_tags" option in QueryMetrics. Thanks in advance.
http://kairosdb.github.io/docs/build/html/restapi/QueryMetrics.html#metric-properties
-Raisudeen.
Hi
If I'm not mistaken, this library uses HttpClient, but it could also use https://hc.apache.org/httpcomponents-asyncclient-dev/ to support async requests.
Are there any plans to support async?
Since version 0.9.4 aggregators in Kairos have two more parameters: align sampling and align start time.
This was most likely implemented after this discussion: https://groups.google.com/forum/#!searchin/kairosdb-group/align$20time/kairosdb-group/yAMTV4uBPz8/_CAkd9xsok8J
And is also mentioned here: https://groups.google.com/d/msg/kairosdb-group/2WPuxh6FMTQ/joiEiPpZrTYJ
"Brian has added code in the RangeAggregator (see setAlignStartTime() and setAlignSampling()) to address these issues and provide more flexibility."
We need these two parameters in kairos-client. There is even a todo item on line 41 in Aggregator.java:
" // todo add align_sampling - aligns to the next biggest unit base on the unit"
Hi,
How do I accomplish following quesry with the KairosDB client?
The part of creating a collection of AssetId is of interest with KairosDB client api.
{
"metrics": [
{
"tags": {
"AssetId": [
"23",
"27"
]
},
"name": "thermostat"
}
],
"cache_time": 0,
"start_absolute": 82800000
}
Kindly,
Markoolio
Hi
Currently client supports Java6. Are there any limitations to bump this to min version Java7? Is anyone still using this client with Java6?
when i execute query with then kairos-client , i met a exception like this
Exception in thread "main" org.codehaus.jackson.map.JsonMappingException: org.codehaus.jackson.map.annotate.JsonSerialize$Inclusion.NON_EMPTY (through reference chain: org.kairosdb.client.builder.QueryBuilder["metrics"]->java.util.ArrayList[0])
at org.codehaus.jackson.map.JsonMappingException.wrapWithPath(JsonMappingException.java:215)
at org.codehaus.jackson.map.JsonMappingException.wrapWithPath(JsonMappingException.java:194)
at org.codehaus.jackson.map.ser.SerializerBase.wrapAndThrow(SerializerBase.java:154)
at org.codehaus.jackson.map.ser.ContainerSerializers$IndexedListSerializer.serializeContents(ContainerSerializers.java:278)
at org.codehaus.jackson.map.ser.ContainerSerializers$IndexedListSerializer.serializeContents(ContainerSerializers.java:229)
at org.codehaus.jackson.map.ser.ContainerSerializers$AsArraySerializer.serialize(ContainerSerializers.java:130)
at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:428)
at org.codehaus.jackson.map.ser.BeanSerializer.serializeFields(BeanSerializer.java:244)
at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:211)
at org.codehaus.jackson.map.ser.StdSerializerProvider._serializeValue(StdSerializerProvider.java:586)
at org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:244)
at org.codehaus.jackson.map.ObjectMapper._configAndWriteValue(ObjectMapper.java:1990)
at org.codehaus.jackson.map.ObjectMapper.writeValue(ObjectMapper.java:1576)
at org.kairosdb.client.builder.QueryBuilder.build(QueryBuilder.java:234)
at org.kairosdb.client.AbstractClient.query(AbstractClient.java:82)
at Get.main(Get.java:42)
Caused by: java.lang.EnumConstantNotPresentException: org.codehaus.jackson.map.annotate.JsonSerialize$Inclusion.NON_EMPTY
at sun.reflect.annotation.EnumConstantNotPresentExceptionProxy.generateException(EnumConstantNotPresentExceptionProxy.java:47)
at sun.reflect.annotation.AnnotationInvocationHandler.invoke(AnnotationInvocationHandler.java:75)
at sun.proxy.$Proxy6.include(Unknown Source)
at org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector.findSerializationInclusion(JacksonAnnotationIntrospector.java:289)
at org.codehaus.jackson.map.ser.PropertyBuilder.buildWriter(PropertyBuilder.java:108)
at org.codehaus.jackson.map.ser.BeanSerializerFactory._constructWriter(BeanSerializerFactory.java:727)
at org.codehaus.jackson.map.ser.BeanSerializerFactory.findBeanProperties(BeanSerializerFactory.java:536)
at org.codehaus.jackson.map.ser.BeanSerializerFactory.constructBeanSerializer(BeanSerializerFactory.java:375)
at org.codehaus.jackson.map.ser.BeanSerializerFactory.findBeanSerializer(BeanSerializerFactory.java:291)
at org.codehaus.jackson.map.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:241)
at org.codehaus.jackson.map.ser.StdSerializerProvider._createUntypedSerializer(StdSerializerProvider.java:747)
at org.codehaus.jackson.map.ser.StdSerializerProvider._createAndCacheUntypedSerializer(StdSerializerProvider.java:688)
at org.codehaus.jackson.map.ser.StdSerializerProvider.findValueSerializer(StdSerializerProvider.java:363)
at org.codehaus.jackson.map.ser.impl.PropertySerializerMap.findAndAddSerializer(PropertySerializerMap.java:39)
at org.codehaus.jackson.map.ser.ContainerSerializers$AsArraySerializer._findAndAddDynamic(ContainerSerializers.java:209)
at org.codehaus.jackson.map.ser.ContainerSerializers$IndexedListSerializer.serializeContents(ContainerSerializers.java:271)
... 12 more
the execute code like this
QueryBuilder builder = QueryBuilder.getInstance();
builder.setStart(Calendar.getInstance().getTime()).addMetric("kairosdb.jvm.free_memory");
HttpClient client = new HttpClient("10.11.0.9", 8015);
QueryResponse response = client.query(builder);
System.out.println("Response Code =" + response.getStatusCode());
client.shutdown();
Please, we need support for the Filtering aggregator in our use case. It is currently unimplemented as of the Java Client 2.2.0.
Hi,
I am getting a RuntimeException during queries, also for the most simple one like that:
QueryBuilder qb = QueryBuilder.getInstance();
qb.setStart(10, TimeUnit.HOURS).addMetric("kairosdb.http.ingest_time");
c.client.query(qb);
I am using the dev-branch version. I already tried out some other gson versions, but that didnt help.
Thanks a alot !
Exception in thread "main" java.lang.RuntimeException: No-args constructor for class org.kairosdb.client.response.ErrorResponse does not exist. Register an InstanceCreator with Gson for this type to fix this problem.
at com.google.gson.MappedObjectConstructor.constructWithNoArgConstructor(MappedObjectConstructor.java:64)
.
.
.
at org.kairosdb.client.AbstractClient.query(AbstractClient.java:104)
If Kairos goes down and comes back the client doesn't reconnect to send data.
What if KairosDB contains predicted values? You would not be able to query them.
this is my code
`MetricBuilder builder = MetricBuilder.getInstance();
builder.addMetric("metric1")
.addTag("host", "server1")
.addTag("customer", "Acme")
.addDataPoint(System.currentTimeMillis(), "127.0.0.1");
HttpClient client = new HttpClient("http://localhost:8080");
Response response = client.pushMetrics(builder);
client.shutdown();`
I run the code but I got errors: multiple points
I think it is the bug.Any help is appreciated.
The current code uses .../api/v1/tagNames which doesn't seem to exist. It should be .../api/v1/tagnames
What is the optimal way of querying for datapoints from a java client? Currently I get the datapoints using the following i.e, get a list of datapoints and then iterate through it to append the json. Is there a way that I can get the entire json response at a time instead of me having to iterate through the list and append? I know that I can get the entire json reponse using rest call. But, I want to know if there is a way to do it from Java client.
When I run
"QueryResponse response = client.query(builder);" (without "")
in my Code, there is always a message dropped:
"******************* Type=number" (without "")
I think it it from GSON or Apache's Httpclient (bot inside kairosdb-client), but I can't turn it off and I don't know where it exactly comes from. I searched inside kairosdb-client, but found no point where a Message like this seems to be produced.
It is also not an error or warning.
Can you help me turn this mesage off?
Hi,
When querying grouped series with non unitary sampling (eg: 2 minutes), some gapped groups returns some points that aren't aligned with ungapped groups timestamps.
Here's a query example:
{
"metrics": [
{
"name": [
"http.access.count"
],
"aggregators": [
{
"name": "sum",
"sampling": {
"value": "2",
"unit": "minutes"
},
"align_sampling": true
}
],
"group_by": [
{
"name": "tag",
"tags": [
"status_code"
]
}
]
}
],
"cache_time": 0,
"start_relative": {
"value": "3",
"unit": "hours"
},
"end_relative": {
"value": "3",
"unit": "minutes"
}
}
This way, I'll get common HTTP codes like 200 that will be sampled every 2 minutes (generally on even ones), but some rare codes that aren't present on every minute will be sampled on the exact minute they appear, which is sometimes an odd minute, creating a timestamp that doesn't exist on full groups.
I thought using align_sampling
should align different groups on the same timestamps but it seems not.
Using gaps aggregator doesn't help.
GetResponse response = client.getTagNames();
should be:
GetResponse response = client.getMetricNames();
In order to be build the CloseableHttpClient externally e.g. for more settings (proxy etc.).
At the moment the client depends on Kairos 1.1.3.
Would it be OK to upgrade it to 1.2.0 ?
At the moment the client uses Guava v14.
The latest available release of Guava is v24.
Is there any problem to upgrade it ?
I know that Guava is not always easy to be upgraded due to its short deprecation cycles.
I can provide a PR if you think this is doable!
I would like a non-blocking accumulator which collects and sends silently using a configurable time-interval.
Hi,
I am using the JDK 1.7.0_51 to build the Kairos client and the build fails on the class InMemoryKairosServer under the tests. There are some imports not used that are causing the build to fail (in particular the sun.security.pkcs11.Secmod class is not resolved in my JDK). Removing the imports everything goes well.
Any plans to implement HTTPS client? Using my own httpClient with proper ssl context is impossible (expect for setClient method which is only for testing).
Here is the sample query code
builder.setStart(2, TimeUnit.HOURS)
.setEnd(new Date())
.addMetric("kairosdb.datastore.query_time")
.addAggregator(AggregatorFactory.createSumAggregator(2, TimeUnit.HOURS));
QueryResponse response = client.query(builder);
Response From Client:
response.getQueries().get(0).getResults().get(0).getDataPoints() gives 0 values
Response From Browser:
{"queries":[{"sample_size":6,"results":[{"name":"kairosdb.datastore.query_time","values":[[1432131822647,12],[1432132493439,177]]}]}]}
HttpClient has a retry mechanism.
Can I ask why the internal retry counter is incremented on every call to execute
After testing the client last night - I see that after a few thousand successful requests, when the server (on my laptop) went away (died), there were delays of more than 40 minutes between "exceptions"
when the server recovered some time later requests were successful again, but when it went away again, the retry mechanism was still causing delays of more than an hour.
Why the ++operator at line 85?
is it meant for some kind of exponential backoff?
what if it were reset to the initial value after a successful "1st attempt" submission instead of successful submissions altering the internal state every time?
happy to provide a patch for any of this.
I used each Querybuilder to get dataPoints on every metrics. I want one query to get several metrics.
Could I take it?
Version: kairosdb_0.9.4-6
OS: Debian Wheezy 64bit
I used KairosDB with Cassandra database and I have a client which sends data to KairosDB server.
After stopping Cassandra(service is down), an error is received in KairosDB server, but the client is not notified that the send data could not be stored.
This behaviour cause data loss when the send data is deleted/dropped.
The issue can be reproduce by setting the configuration and sending some POST requests to the KairosDB server.
when i execute query use the kairosdb-client, i encounter a werid problem what is the
org.kairosdb.core.exception.DatastoreException: Query metric tags is not implemented for HBase
at net.opentsdb.kairosdb.HBaseDatastore.queryMetricTags(HBaseDatastore.java:151) ~[hbase_datastore-1.1.0_5.jar:na]
at org.kairosdb.core.datastore.KairosDatastore.queryTags(KairosDatastore.java:196) ~[kairosdb.jar:0.9.2.20131127180758]
at org.kairosdb.core.http.rest.MetricsResource.getMeta(MetricsResource.java:205) ~[kairosdb.jar:0.9.2.20131127180758]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_37]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_37]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_37]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_37]
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1480) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1411) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1360) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1350) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) [jersey-servlet-1.15.jar:1.15]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) [jersey-servlet-1.15.jar:1.15]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716) [jersey-servlet-1.15.jar:1.15]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) [javax.servlet-3.0.0.v201112011016.jar:na]
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) [guice-servlet-3.0.jar:na]
at org.kairosdb.core.http.LoggingFilter.doFilter(LoggingFilter.java:48) [kairosdb.jar:0.9.2.20131127180758]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at org.kairosdb.core.http.MonitorFilter.doFilter(MonitorFilter.java:69) [kairosdb.jar:0.9.2.20131127180758]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) [guice-servlet-3.0.jar:na]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307) [jetty-servlet-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453) [jetty-servlet-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382) [jetty-servlet-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.Server.handle(Server.java:365) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:937) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:998) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856) [jetty-http-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) [jetty-http-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) [jetty-io-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) [jetty-io-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) [jetty-util-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) [jetty-util-8.1.8.v20121106.jar:8.1.8.v20121106]
at java.lang.Thread.run(Thread.java:662) [na:1.6.0_37]
11-27|20:26:14.202 [qtp957250718-171] ERROR [MetricsResource.java:253] - Query failed.
org.kairosdb.core.exception.DatastoreException: Query metric tags is not implemented for HBase
at net.opentsdb.kairosdb.HBaseDatastore.queryMetricTags(HBaseDatastore.java:151) ~[hbase_datastore-1.1.0_5.jar:na]
at org.kairosdb.core.datastore.KairosDatastore.queryTags(KairosDatastore.java:196) ~[kairosdb.jar:0.9.2.20131127180758]
at org.kairosdb.core.http.rest.MetricsResource.getMeta(MetricsResource.java:205) ~[kairosdb.jar:0.9.2.20131127180758]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_37]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_37]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_37]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_37]
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1480) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1411) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1360) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1350) [jersey-server-1.15.jar:1.15]
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) [jersey-servlet-1.15.jar:1.15]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) [jersey-servlet-1.15.jar:1.15]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716) [jersey-servlet-1.15.jar:1.15]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) [javax.servlet-3.0.0.v201112011016.jar:na]
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) [guice-servlet-3.0.jar:na]
at org.kairosdb.core.http.LoggingFilter.doFilter(LoggingFilter.java:48) [kairosdb.jar:0.9.2.20131127180758]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at org.kairosdb.core.http.MonitorFilter.doFilter(MonitorFilter.java:69) [kairosdb.jar:0.9.2.20131127180758]
at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) [guice-servlet-3.0.jar:na]
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) [guice-servlet-3.0.jar:na]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307) [jetty-servlet-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453) [jetty-servlet-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382) [jetty-servlet-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.Server.handle(Server.java:365) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:937) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:998) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856) [jetty-http-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) [jetty-http-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) [jetty-server-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) [jetty-io-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) [jetty-io-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) [jetty-util-8.1.8.v20121106.jar:8.1.8.v20121106]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) [jetty-util-8.1.8.v20121106.jar:8.1.8.v20121106]
at java.lang.Thread.run(Thread.java:662) [na:1.6.0_37]
Could u help me slove it ?thx
The TimeValidator has four instances of the wording "Start time cannot be later than the ending time".
This allows you to query for a single data point.
When quering for DataPoints, it should be possible to enter long value for TimeUnit.MILLISECONDS. For example, last query has timestamp=1413537893570, and next query will be System.currentTimeMillis()-timestamp. Integer.MAX_VALUE is sometimes too small, and changing units to SECONDS/HOURS is not precise enough.
Hi, I noticed that this client uses org.apache.http.client.HttpClient and provides a constructor taking an HttpClientBuilder as a parameter. But in my situation, I want one more constructor that takes an org.apache.http.client.HttpClient as a parameter, because my http client is created by another library and there's no way to get that kind of builder object. Currently I extends org.kairosdb.client.HttpClient and replace the inner client using org.kairosdb.client.HttpClient#setClient method which is intended to be a test method. I suppose this may be a common situation and wonder if there are any plans to support this. Thank you.
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.