Class InfluxDBClientImpl
- All Implemented Interfaces:
InfluxDBClient
,AutoCloseable
Please use InfluxDBClient
to create an instance.
-
Constructor Summary
ConstructorDescriptionInfluxDBClientImpl
(ClientConfig config) Creates an instance using the specified config. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Query data from InfluxDB IOx using FlightSQL.query
(String query, QueryOptions options) Query data from InfluxDB IOx using FlightSQL.Query data from InfluxDB IOx using FlightSQL.Query data from InfluxDB IOx using FlightSQL.Stream<org.apache.arrow.vector.VectorSchemaRoot>
queryBatches
(String query) Query data from InfluxDB IOx using FlightSQL.Stream<org.apache.arrow.vector.VectorSchemaRoot>
queryBatches
(String query, QueryOptions options) Query data from InfluxDB IOx using FlightSQL.Stream<org.apache.arrow.vector.VectorSchemaRoot>
queryBatches
(String query, Map<String, Object> parameters) Query data from InfluxDB IOx using FlightSQL.Stream<org.apache.arrow.vector.VectorSchemaRoot>
queryBatches
(String query, Map<String, Object> parameters, QueryOptions options) Query data from InfluxDB IOx using FlightSQL.queryPoints
(String query) Query data from InfluxDB IOx into Point structure using FlightSQL.queryPoints
(String query, QueryOptions options) Query data from InfluxDB IOx into Point structure using FlightSQL.queryPoints
(String query, Map<String, Object> parameters) Query data from InfluxDB IOx into Point structure using FlightSQL.queryPoints
(String query, Map<String, Object> parameters, QueryOptions options) Query data from InfluxDB IOx into Point structure using FlightSQL.void
writePoint
(Point point) Write aPoint
to the InfluxDB server.void
writePoint
(Point point, WriteOptions options) Write aPoint
to the InfluxDB server.void
writePoints
(List<Point> points) Write a list ofPoint
to the InfluxDB server.void
writePoints
(List<Point> points, WriteOptions options) Write a list ofPoint
to the InfluxDB server.void
writeRecord
(String record) Write a record specified in the InfluxDB Line Protocol to the InfluxDB server.void
writeRecord
(String record, WriteOptions options) Write a record specified in the InfluxDB Line Protocol to the InfluxDB server.void
writeRecords
(List<String> records) Write records specified in the InfluxDB Line Protocol to the InfluxDB server.void
writeRecords
(List<String> records, WriteOptions options) Write records specified in the InfluxDB Line Protocol to the InfluxDB server.
-
Constructor Details
-
InfluxDBClientImpl
Creates an instance using the specified config.Please use
InfluxDBClient
to create an instance.- Parameters:
config
- the client config.
-
-
Method Details
-
writeRecord
Description copied from interface:InfluxDBClient
Write a record specified in the InfluxDB Line Protocol to the InfluxDB server.- Specified by:
writeRecord
in interfaceInfluxDBClient
- Parameters:
record
- the record specified in the InfluxDB Line Protocol, can be null
-
writeRecord
Description copied from interface:InfluxDBClient
Write a record specified in the InfluxDB Line Protocol to the InfluxDB server.- Specified by:
writeRecord
in interfaceInfluxDBClient
- Parameters:
record
- the record specified in the InfluxDB Line Protocol, can be nulloptions
- the options for writing data to InfluxDB
-
writeRecords
Description copied from interface:InfluxDBClient
Write records specified in the InfluxDB Line Protocol to the InfluxDB server.- Specified by:
writeRecords
in interfaceInfluxDBClient
- Parameters:
records
- the records specified in the InfluxDB Line Protocol, cannot be null
-
writeRecords
Description copied from interface:InfluxDBClient
Write records specified in the InfluxDB Line Protocol to the InfluxDB server.- Specified by:
writeRecords
in interfaceInfluxDBClient
- Parameters:
records
- the records specified in the InfluxDB Line Protocol, cannot be nulloptions
- the options for writing data to InfluxDB
-
writePoint
Description copied from interface:InfluxDBClient
Write aPoint
to the InfluxDB server.- Specified by:
writePoint
in interfaceInfluxDBClient
- Parameters:
point
- thePoint
to write, can be null
-
writePoint
Description copied from interface:InfluxDBClient
Write aPoint
to the InfluxDB server.- Specified by:
writePoint
in interfaceInfluxDBClient
- Parameters:
point
- thePoint
to write, can be nulloptions
- the options for writing data to InfluxDB
-
writePoints
Description copied from interface:InfluxDBClient
Write a list ofPoint
to the InfluxDB server.- Specified by:
writePoints
in interfaceInfluxDBClient
- Parameters:
points
- the list ofPoint
to write, cannot be null
-
writePoints
Description copied from interface:InfluxDBClient
Write a list ofPoint
to the InfluxDB server.- Specified by:
writePoints
in interfaceInfluxDBClient
- Parameters:
points
- the list ofPoint
to write, cannot be nulloptions
- the options for writing data to InfluxDB
-
query
Description copied from interface:InfluxDBClient
Query data from InfluxDB IOx using FlightSQL.The result stream should be closed after use, you can use try-resource pattern to close it automatically:
try (Stream<Object[]> rows = client.query("select * from cpu")) { rows.forEach(row -> { // process row } });
- Specified by:
query
in interfaceInfluxDBClient
- Parameters:
query
- the SQL query string to execute, cannot be null- Returns:
- Batches of rows returned by the query
-
query
Description copied from interface:InfluxDBClient
Query data from InfluxDB IOx using FlightSQL.The result stream should be closed after use, you can use try-resource pattern to close it automatically:
try (Stream<Object[]> rows = client.query("select * from cpu", options)) { rows.forEach(row -> { // process row } });
- Specified by:
query
in interfaceInfluxDBClient
- Parameters:
query
- the query string to execute, cannot be nulloptions
- the options for querying data from InfluxDB- Returns:
- Batches of rows returned by the query
-
query
@Nonnull public Stream<Object[]> query(@Nonnull String query, @Nonnull Map<String, Object> parameters) Description copied from interface:InfluxDBClient
Query data from InfluxDB IOx using FlightSQL.The result stream should be closed after use, you can use try-resource pattern to close it automatically:
try (Stream<Object[]> rows = client.query("select * from cpu where host=$host", Map.of("host", "server-a")) { rows.forEach(row -> { // process row } });
- Specified by:
query
in interfaceInfluxDBClient
- Parameters:
query
- the SQL query string to execute, cannot be nullparameters
- query named parameters- Returns:
- Batches of rows returned by the query
-
query
@Nonnull public Stream<Object[]> query(@Nonnull String query, @Nonnull Map<String, Object> parameters, @Nonnull QueryOptions options) Description copied from interface:InfluxDBClient
Query data from InfluxDB IOx using FlightSQL.The result stream should be closed after use, you can use try-resource pattern to close it automatically:
try (Stream<Object[]> rows = client.query("select * from cpu where host=$host", Map.of("host", "server-a"), options)) { rows.forEach(row -> { // process row } });
- Specified by:
query
in interfaceInfluxDBClient
- Parameters:
query
- the query string to execute, cannot be nullparameters
- query named parametersoptions
- the options for querying data from InfluxDB- Returns:
- Batches of rows returned by the query
-
queryPoints
Description copied from interface:InfluxDBClient
Query data from InfluxDB IOx into Point structure using FlightSQL.The result stream should be closed after use, you can use try-resource pattern to close it automatically:
try (Stream<PointValues> rows = client.queryPoints("select * from cpu", options)) { rows.forEach(row -> { // process row } });
- Specified by:
queryPoints
in interfaceInfluxDBClient
- Parameters:
query
- the SQL query string to execute, cannot be null- Returns:
- Batches of PointValues returned by the query
-
queryPoints
@Nonnull public Stream<PointValues> queryPoints(@Nonnull String query, @Nonnull QueryOptions options) Description copied from interface:InfluxDBClient
Query data from InfluxDB IOx into Point structure using FlightSQL.The result stream should be closed after use, you can use try-resource pattern to close it automatically:
try (Stream<PointValues> rows = client.queryPoints("select * from cpu", options)) { rows.forEach(row -> { // process row } });
- Specified by:
queryPoints
in interfaceInfluxDBClient
- Parameters:
query
- the query string to execute, cannot be nulloptions
- the options for querying data from InfluxDB- Returns:
- Batches of PointValues returned by the query
-
queryPoints
@Nonnull public Stream<PointValues> queryPoints(@Nonnull String query, @Nonnull Map<String, Object> parameters) Description copied from interface:InfluxDBClient
Query data from InfluxDB IOx into Point structure using FlightSQL.The result stream should be closed after use, you can use try-resource pattern to close it automatically:
try (Stream<PointValues> rows = client.queryPoints("select * from cpu where host=$host", Map.of("host", "server-a"))) { rows.forEach(row -> { // process row } });
- Specified by:
queryPoints
in interfaceInfluxDBClient
- Parameters:
query
- the SQL query string to execute, cannot be nullparameters
- query named parameters- Returns:
- Batches of PointValues returned by the query
-
queryPoints
@Nonnull public Stream<PointValues> queryPoints(@Nonnull String query, @Nonnull Map<String, Object> parameters, @Nonnull QueryOptions options) Description copied from interface:InfluxDBClient
Query data from InfluxDB IOx into Point structure using FlightSQL.The result stream should be closed after use, you can use try-resource pattern to close it automatically:
try (Stream<PointValues> rows = client.queryPoints("select * from cpu where host=$host", Map.of("host", "server-a"), options)) { rows.forEach(row -> { // process row } });
- Specified by:
queryPoints
in interfaceInfluxDBClient
- Parameters:
query
- the query string to execute, cannot be nullparameters
- query named parametersoptions
- the options for querying data from InfluxDB- Returns:
- Batches of PointValues returned by the query
-
queryBatches
@Nonnull public Stream<org.apache.arrow.vector.VectorSchemaRoot> queryBatches(@Nonnull String query) Description copied from interface:InfluxDBClient
Query data from InfluxDB IOx using FlightSQL.The result stream should be closed after use, you can use try-resource pattern to close it automatically:
try (Stream<VectorSchemaRoot> batches = client.queryBatches("select * from cpu")) { batches.forEach(batch -> { // process batch } });
- Specified by:
queryBatches
in interfaceInfluxDBClient
- Parameters:
query
- the SQL query string to execute, cannot be null- Returns:
- Batches of rows returned by the query
-
queryBatches
@Nonnull public Stream<org.apache.arrow.vector.VectorSchemaRoot> queryBatches(@Nonnull String query, @Nonnull QueryOptions options) Description copied from interface:InfluxDBClient
Query data from InfluxDB IOx using FlightSQL.try (Stream<VectorSchemaRoot> batches = client.queryBatches("select * from cpu", options)) { batches.forEach(batch -> { // process batch } });
- Specified by:
queryBatches
in interfaceInfluxDBClient
- Parameters:
query
- the query string to execute, cannot be nulloptions
- the options for querying data from InfluxDB- Returns:
- Batches of rows returned by the query
-
queryBatches
@Nonnull public Stream<org.apache.arrow.vector.VectorSchemaRoot> queryBatches(@Nonnull String query, @Nonnull Map<String, Object> parameters) Description copied from interface:InfluxDBClient
Query data from InfluxDB IOx using FlightSQL.The result stream should be closed after use, you can use try-resource pattern to close it automatically:
try (Stream<VectorSchemaRoot> batches = client.queryBatches("select * from cpu where host=$host", Map.of("host", "server-a"))) { batches.forEach(batch -> { // process batch } });
- Specified by:
queryBatches
in interfaceInfluxDBClient
- Parameters:
query
- the SQL query string to execute, cannot be nullparameters
- query named parameters- Returns:
- Batches of rows returned by the query
-
queryBatches
@Nonnull public Stream<org.apache.arrow.vector.VectorSchemaRoot> queryBatches(@Nonnull String query, @Nonnull Map<String, Object> parameters, @Nonnull QueryOptions options) Description copied from interface:InfluxDBClient
Query data from InfluxDB IOx using FlightSQL.try (Stream<VectorSchemaRoot> batches = client.queryBatches("select * from cpu where host=$host", Map.of("host", "server-a"), options)) { batches.forEach(batch -> { // process batch } });
- Specified by:
queryBatches
in interfaceInfluxDBClient
- Parameters:
query
- the query string to execute, cannot be nullparameters
- query named parametersoptions
- the options for querying data from InfluxDB- Returns:
- Batches of rows returned by the query
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-