Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InfluxDB Sink sample does not make sense #32

Open
jerrinot opened this issue Nov 11, 2019 · 0 comments
Open

InfluxDB Sink sample does not make sense #32

jerrinot opened this issue Nov 11, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@jerrinot
Copy link
Contributor

This is the InfluxDB Sink sample from the readme

Pipeline p = Pipeline.create();
p.drawFrom(Sources.list(measurements))
 .map(index -> Point.measurement("mem_usage")
                    .time(System.nanoTime(), TimeUnit.NANOSECONDS)
                    .addField("value", index)
                    .build())
 .drainTo(InfluxDbSinks.influxDb(DB_URL, DATABASE_NAME, USERNAME, PASSWORD));

.time(System.nanoTime(), TimeUnit.NANOSECONDS) makes no sense as nanoTime is only useful for measuring elapsed time on a single computer. It cannot be used as a sensible timestamp let alone persisted into a time series DB.

@jerrinot jerrinot added the bug Something isn't working label Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant