16

使用influxDB批量插入的时候,报了这个错org.influxdb.InfluxDBException: short writ...

 3 years ago
source link: https://www.oschina.net/question/4117387_2323083
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

使用influxDB批量插入的时候,报了这个错org.influxdb.InfluxDBException: short write,原因是什么,怎么解决啊

HGGWAN 发布于 今天 09:49

环境是java8 

private BatchPoints batchInsert(BatchPoints batchPoints){
    influxDB().writeWithRetry(batchPoints);
    batchPoints = BatchPoints
            .database(database)
            .consistency(InfluxDB.ConsistencyLevel.ANY)
            .build();
    return batchPoints;
}

private InfluxDB influxDB() {
    InfluxDB influxDB = InfluxDBFactory.connect(influxDBUrl, userName, password);
    influxDB.setDatabase(database)
            .setRetentionPolicy("autogen")
            .enableBatch(100000, 50000, TimeUnit.MILLISECONDS);
    return influxDB;
}

但是批量插入就有这个问题


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK