Unable to use type float?[Solved]

The documentation indicates Float is a supported type: https://docs.influxdata.com/influxdb/v1.3/write_protocols/line_protocol_reference/#data-types

but I get errors trying to use a POJO with a field with type float. I have tried the primitive float and Object Float:
org.influxdb.InfluxDBMapperException: Class ‘xxx.dao.influx.DBIdleNoiseAggrTimeSeries’ field ‘average’ is from an unsupported type ‘float’

org.influxdb.InfluxDBMapperException: Class ‘xxx.dao.influx.DBIdleNoiseAggrTimeSeries’ field ‘average’ is from an unsupported type ‘java.lang.Float’

Answered: looks like it is a 32 bit/ 64 bit definition thing - Double works great.

2 Likes

Sorry you had to answer your own question, but you are exactly right. InfluxDB uses float64 as the data type, so it is expecting a 64-bit value for float. Depending on what you’re using to send the data, you may have to use double, float64, etc.

dg