Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

InfluxDB的接口适配主要包括writequery两个重要函数:write函数绝大多数接口已经实现,还有一个重试的写入接口未开始;query函数正在开发中。

其中个接口已完成个接口在进行中个接口未开始

未开始的接口中包括一些无需适配的接口:

setLogLevel:设置rest的相关LogLevel。

enableGzip、disableGzip和isGzipEnabled:Http request body的压缩方式有关处理函数。

由于当前适配器采用thrift的方式,因此上述接口无需适配。


Table of Contents

一、已完成

1. write()

write函数有很多接口,主要的适配目标包括:以Point的形式,以String字符串的形式将数据写入数据库中。

...

/**
* Write a set of Points to the influxdb database with the new (>= 0.9.0rc32) lineprotocol.
*
* If batching is enabled with appropriate {@code BatchOptions} settings
* ({@code BatchOptions.bufferLimit} greater than {@code BatchOptions.actions})
* This method will try to retry in case of some recoverable errors.
* Otherwise it just works as {@link #write(BatchPoints)}
*/
public void writeWithRetry(final BatchPoints batchPoints);


2. setLogLevel() (无需适配)

write函数绝大多数接口已经实现,目前还有一个写入重试的接口未开始实现:

...

/**
* Set the loglevel which is used for REST related actions.
*/
public InfluxDB setLogLevel(final LogLevel logLevel);

3. enableGzip() (无需适配)


/**
* Enable Gzip compress for http request body.
*/
public InfluxDB enableGzip();

4. disableGzip() (无需适配)


/**
* Enable Gzip compress for http request body.
*/
public InfluxDB enableGzip();

4. isGzipEnabled() (无需适配)


/**
* Returns whether Gzip compress for http request body is enabled.
*/
public boolean isGzipEnabled();

...