Duplicate values for the same timestamp ?

229 views
Skip to first unread message

Arnaud Vandepaer

unread,
Oct 10, 2014, 5:17:10 AM10/10/14
to kairosd...@googlegroups.com
Hi all,

When I try to push data with the same timestamp, i get some duplicate datapoints in Kairos.

I'am using the 0.9.3 version and 2.0.7 version for cassandra.

Any Idea what cause this issue ?

You'ill find the data pushed and the result in attachement.
first_push.txt
second_push.txt
result.txt

Brian Hawkins

unread,
Oct 10, 2014, 1:09:26 PM10/10/14
to kairosd...@googlegroups.com
You need to push the same kind of data, either all float or all integer values.  For example here are to consecutive data points:
[1383930000000,0]
[1383930000000,0.625]

The first is considered an integer value and the second is a floating point value.  These are stored in two different rows.  Now if you were to send the first data point as '0.0' then they would overwrite.

That probably wasn't very clear in the documentation.

Brian

Arnaud Vandepaer

unread,
Oct 13, 2014, 4:30:29 AM10/13/14
to kairosd...@googlegroups.com
Hi Brian,

Thank you for your quick reply !

I will made the changes today.

Arnaud Vandepaer

unread,
Oct 13, 2014, 11:52:58 AM10/13/14
to kairosd...@googlegroups.com
I made some changes but I still have the same problem. I forgot to mention that i'am using the 1.0 version of kairosdb-client. Maybe it's related to the client version ?

Brian Hawkins

unread,
Oct 13, 2014, 2:21:40 PM10/13/14
to kairosd...@googlegroups.com
So lets try to narrow down the scenario.  You are inserting data and then overwriting them with zero.  Is the overwriting with zero done as a sampled value or is this a hardcoded thing?  Can you paste the code you have that sets the value in the client?

Brian

Arnaud Vandepaer

unread,
Oct 14, 2014, 3:30:21 AM10/14/14
to kairosd...@googlegroups.com
I'am using a sampled value.

Here is the code to insert the values :

   for (DataPointDTO key : parameter.getDataPoints()) {
            metric.addDataPoint(key.getTimestamp(), key.getValue());
        }

public class DataPointDTO implements Serializable {
    private long timestamp;
    private double value;
.....

Brian Hawkins

unread,
Oct 14, 2014, 6:20:54 PM10/14/14
to kairosd...@googlegroups.com
I verified that the client is doing the right thing.  What is doing the wrong thing is the server.  If you update to 0.9.4 the problem goes away.  The problem was in how we were detecting types on the server side.  The server code was seeing 0.0 the same as 0 so it stored all zero values as long

I should have known that one sooner.

Brian

Irfanuddin Shafi Ahmed

unread,
Jun 3, 2022, 11:15:59 AM6/3/22
to KairosDB
Is this issue open again in v1.3? I am facing the same thing.

Brian Hawkins

unread,
Jun 11, 2022, 12:17:51 AM6/11/22
to KairosDB
I don't think so.  If you are seeing the same issue  it is likely they are going in as long and double values.  If you have some examples that are showing the problem please paste it here.

Brian

Reply all
Reply to author
Forward
0 new messages