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

一、已完成

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

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

Table of Contents

...

1. write()

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

...

/**
* Set the database which is used for writing points.
*/
public InfluxDB setDatabase(final String database);

...


二、进行中

1. query()

query函数有很多接口,主要的适配目标包括:支持常规过滤、值过滤和tag过滤。同时支持聚合函数,选择函数等等功能。

...


/**
* Execute a query against a database.
*/
public void query(final Query query, final Consumer<QueryResult> onSuccess, final Consumer<Throwable> onFailure);

/**
* Execute a streaming query against a database.
*/
public void query(Query query, int chunkSize, Consumer<QueryResult> onNext);

/**
* Execute a streaming query against a database.
*/
public void query(Query query, int chunkSize, BiConsumer<Cancellable, QueryResult> onNext);

/**
* Execute a streaming query against a database.
*/
public void query(Query query, int chunkSize, Consumer<QueryResult> onNext, Runnable onComplete);

/**
* Execute a streaming query against a database.
*/
public void query(Query query, int chunkSize, BiConsumer<Cancellable, QueryResult> onNext, Runnable onComplete);

/**
* Execute a streaming query against a database.
*/
public void query(Query query, int chunkSize, BiConsumer<Cancellable, QueryResult> onNext, Runnable onComplete,
Consumer<Throwable> onFailure);

/**
* Execute a query against a database.
*/
public QueryResult query(final Query query, TimeUnit timeUnit);

...


三、未开始

1. write()

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

...

/**
* Write a set of Points to the influxdb database with the new (&gt;= 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();

...