我试图将map
保存为InfluxDB
中的字段,但我收到以下错误消息:
2017-08-10T11:28:26.816 ERROR 7 --- [pool-4-thread-1] org.influxdb.impl.BatchProcessor : Batch could not be sent. Data will be lost
realtortagger_1 | org.influxdb.InfluxDBException: {"error":"engine: field type conflict"}
realtortagger_1 |
realtortagger_1 | at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:511) ~[influxdb-java-2.7.jar!/:na]
realtortagger_1 | at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:312) ~[influxdb-java-2.7.jar!/:na]
realtortagger_1 | at org.influxdb.impl.BatchProcessor.write(BatchProcessor.java:248) ~[influxdb-java-2.7.jar!/:na]
realtortagger_1 | at org.influxdb.impl.BatchProcessor$2.run(BatchProcessor.java:278) [influxdb-java-2.7.jar!/:na]
realtortagger_1 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_144]
realtortagger_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_144]
realtortagger_1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_144]
realtortagger_1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_144]
realtortagger_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_144]
realtortagger_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_144]
realtortagger_1 | at java.lang.Thread.run(Thread.java:748) [na:1.8.0_144]
我的地图是HashMap<String, Object>
,我的所有值都是Integer
。
我使用以下命令InfluxDB.write(dbName, RETENTION_POLICY, point)