Giter Site home page Giter Site logo

influxdb-java's Introduction

influxdb-java

A pure Java library to access the REST API of a InfluxDB database.

This implementation is meant as a Java rewrite of the influxdb-go package. All low level REST Api calls are available.

Typical usage looks like:

InfluxDB influxDB = InfluxDBFactory.connect("http://172.17.0.2:8086", "root", "root");

this.influxDB.createDatabase("aTimeSeries", 1);

Serie serie = new Serie("testSeries");
serie.setColumns(new String[] { "value1", "value2" });
Object[] point = new Object[] { System.currentTimeMillis(), 5 };
serie.setPoints(new Object[][] { point });
Serie[] series = new Serie[] { serie };
this.influxDB.write(dbName, series, TimeUnit.MILLISECONDS);

For additional usage examples have a look ad InfluxDBTest.java

Build Requirements

  • Java 1.6+
  • Maven 3.0+
  • Docker daemon running

Maven will run tests during build process using a docker image with influxdb actual image is majst01/influxdb-java. This docker image is pulled during the first test run which will take some time. So the first test execution will fail because the image to pull is not there. You can check with:

    $ docker images | grep majst01
majst01/influxdb-java      latest              50256afac0c9        About an hour ago   298.7 MB

Then you can build influxdb-java with all tests with:

$ mvn clean install

If you don't have Docker running locally, you can skip tests with -DskipTests flag set to true:

$ mvn clean install -DskipTests=true

TODO

Publish to maven-repo.

influxdb-java's People

Contributors

majst01 avatar

Stargazers

Ebot Tabi avatar

Watchers

Ebot Tabi avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.