Anyone tried using InfluxDB in a quarkus app?

621 views
Skip to first unread message

Minto van der Sluis

unread,
Aug 28, 2019, 2:00:24 PM8/28/19
to quark...@googlegroups.com
Hi,

Has anyone tried using InfluxDB in a Quarkus based application?

I tried. In JVM everything works as expectdd, but unfortunately in
native mode I get  errors (see below)

My stack:

- graalvm 19.0.2

- quarkus 0.21.1

- maven 3.6.0

Kind regards:

misl

Error output:

...

9:46:05,890 INFO  [org.xni.nio] XNIO NIO Implementation Version 3.7.2.Final
Warning: RecomputeFieldValue.ArrayBaseOffset automatic substitution
failed. The automatic substitution registration was attempted because a
call to sun.misc.Unsafe.arrayBaseOffset(Class) was detected in the
static initializer of org.msgpack.core.buffer.MessageBuffer. Detailed
failure reason(s): Could not determine the field where the value
produced by the call to sun.misc.Unsafe.arrayBaseOffset(Class) for the
array base offset computation is stored. The call is not directly
followed by a field store or by a sign extend node followed directly by
a field store.
Warning: RecomputeFieldValue.ArrayIndexScale automatic substitution
failed. The automatic substitution registration was attempted because a
call to sun.misc.Unsafe.arrayIndexScale(Class) was detected in the
static initializer of org.msgpack.core.buffer.MessageBuffer. Detailed
failure reason(s): Could not determine the field where the value
produced by the call to sun.misc.Unsafe.arrayIndexScale(Class) for the
array index scale computation is stored. The call is not directly
followed by a field store or by a sign extend node followed directly by
a field store.
[traeckit-collect-influxdb-0.0.1-SNAPSHOT-runner:20211] analysis: 
25,339.46 ms
Printing call tree to
/home/misl/Dev/TraeckIt/new-attempt/services/traeckit-collect/traeckit-collect-influxdb/target/reports/call_tree_traeckit-collect-influxdb-0.0.1-SNAPSHOT-runner_20190828_194632.txt
Printing list of used classes to
/home/misl/Dev/TraeckIt/new-attempt/services/traeckit-collect/traeckit-collect-influxdb/target/reports/used_classes_traeckit-collect-influxdb-0.0.1-SNAPSHOT-runner_20190828_194634.txt
Printing list of used packages to
/home/misl/Dev/TraeckIt/new-attempt/services/traeckit-collect/traeckit-collect-influxdb/target/reports/used_packages_traeckit-collect-influxdb-0.0.1-SNAPSHOT-runner_20190828_194634.txt
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException:
Discovered unresolved type during parsing: kotlin.Unit. To diagnose the
issue you can use the --allow-incomplete-classpath option. The missing
type is then reported at run time when it is accessed the first time.
Detailed message:
Trace:
    at parsing
retrofit2.BuiltInConverters.responseBodyConverter(BuiltInConverters.java:43)
Call path from entry point to
retrofit2.BuiltInConverters.responseBodyConverter(Type, Annotation[],
Retrofit):
    at
retrofit2.BuiltInConverters.responseBodyConverter(BuiltInConverters.java:33)
    at retrofit2.Retrofit.nextResponseBodyConverter(Retrofit.java:328)
    at retrofit2.Retrofit.responseBodyConverter(Retrofit.java:311)
    at
retrofit2.HttpServiceMethod.createResponseConverter(HttpServiceMethod.java:68)
    at
retrofit2.HttpServiceMethod.parseAnnotations(HttpServiceMethod.java:46)
    at retrofit2.ServiceMethod.parseAnnotations(ServiceMethod.java:36)
    at retrofit2.Retrofit.loadServiceMethod(Retrofit.java:168)
    at retrofit2.Retrofit.eagerlyValidateMethods(Retrofit.java:156)
    at retrofit2.Retrofit.create(Retrofit.java:131)
    at org.influxdb.impl.InfluxDBImpl.<init>(InfluxDBImpl.java:181)
    at org.influxdb.impl.InfluxDBImpl.<init>(InfluxDBImpl.java:123)
    at org.influxdb.impl.InfluxDBImpl.<init>(InfluxDBImpl.java:187)
    at org.influxdb.InfluxDBFactory.connect(InfluxDBFactory.java:48)

--
Minto van der Sluis, Msc
Mobile: +31 6 26 01 45 41
Skype: mintovandersluis

Georgios Andrianakis

unread,
Aug 28, 2019, 4:17:57 PM8/28/19
to mi...@xup.nl, Quarkus Development mailing list
Seems like it the influx driver needs extra work to work in native mode.
It would probably be a nice addition if someone were willing to take it up.

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/be440423-7564-2784-e0cb-ba38279cc99b%40xup.nl.

Minto van der Sluis

unread,
Dec 20, 2019, 9:32:53 AM12/20/19
to Georgios Andrianakis, Quarkus Development mailing list

Well, I guess I am the one to step forward, since I am probably the first to need it.

I tried registering additional dependencies for indexing in application.properties, but that only brought me to the next issue. Now I get the following:

Error: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported type java.lang.invoke.MemberName is reachable: All methods from java.lang.invoke should have been replaced during image building.
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Detailed message:
Trace:
    at parsing java.lang.invoke.MethodHandles$Lookup.unreflectSpecial(MethodHandles.java:1233)
Call path from entry point to java.lang.invoke.MethodHandles$Lookup.unreflectSpecial(Method, Class):
    at java.lang.invoke.MethodHandles$Lookup.unreflectSpecial(MethodHandles.java:1231)
    at retrofit2.Platform$Java8.invokeDefaultMethod(Platform.java:102)
    at retrofit2.Retrofit$1.invoke(Retrofit.java:147)
    at com.sun.proxy.$Proxy273.toString(Unknown Source)
    at java.lang.String.valueOf(String.java:2994)
    at java.lang.StringBuilder.append(StringBuilder.java:131)
    at com.oracle.svm.core.amd64.AMD64CPUFeatureAccess.verifyHostSupportsArchitecture(AMD64CPUFeatureAccess.java:179)
    at com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:129)
    at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:186)
    at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)

This actually is not an issue with InfluxDB itself, but rather with Retrofit. So I guess it makes more sense to create a Retrofit extension instead.

Is there an extension doing similar things like Retrofit, for me to have a look at and/or steal from ;-) ?

Regards,

Minto

Loïc MATHIEU

unread,
Dec 20, 2019, 9:47:50 AM12/20/19
to mi...@xup.nl, Georgios Andrianakis, Quarkus Development mailing list
Hi,

I realy ike retrofit, and Quarkus has a rest client that works close to it API wise : https://quarkus.io/guides/rest-client
You can use it instead of retrofit.

Regards,

Loïc

Georgios Andrianakis

unread,
Dec 20, 2019, 9:50:24 AM12/20/19
to Loïc MATHIEU, mi...@xup.nl, Quarkus Development mailing list
On Fri, Dec 20, 2019 at 4:47 PM Loïc MATHIEU <loik...@gmail.com> wrote:
Hi,

I realy ike retrofit, and Quarkus has a rest client that works close to it API wise : https://quarkus.io/guides/rest-client
You can use it instead of retrofit.

The problem is that the Influx driver already uses Retrofit :)

Minto van der Sluis

unread,
Dec 20, 2019, 10:06:52 AM12/20/19
to quark...@googlegroups.com

Thanks Mathieu,

Like Georgios already said, I am using InfluxDB client with relies on Retrofit.

I will have look at rest-client.

regards,

Minto

Loïc MATHIEU

unread,
Dec 20, 2019, 10:10:25 AM12/20/19
to Georgios Andrianakis, mi...@xup.nl, Quarkus Development mailing list
Ah yes, sorry, I didn't understand this.


There also exist a vertx client but it seems to be only a proof of concept : https://github.com/vietj/vertx-influxdb-metrics


Minto van der Sluis

unread,
Dec 21, 2019, 4:03:43 AM12/21/19
to quark...@googlegroups.com

Thanks for these pointers, but both seem to be geared to sending data to InfluxDB only. Besides sending I am also querying. So I am afraid both will not work for me.

Ken Yee

unread,
Feb 29, 2020, 2:08:25 PM2/29/20
to Quarkus Development mailing list
Out of curiosity, did you get this working misl?
Also, it would make more sense to use the rxjava client (influxdb-client-reactive) I think?
It should be more efficient than the standard one...

 ken

Regards,

Loïc

To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.
-- 
Minto van der Sluis, Msc
Mobile: +31 6 26 01 45 41
Skype: mintovandersluis
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.

Minto van der Sluis

unread,
Feb 29, 2020, 3:47:10 PM2/29/20
to quark...@googlegroups.com, Ken Yee

Hi Ken,

Unfortunately I have not yet had the time. For my current project priority has shifted. We can live with JVM for the time being.

Thanks for introducing the rxjava client to me. I will most definitely have a look at it.

Regards,

Misl

To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/18b61a3c-0f5b-45e7-89f5-eab648c14bb5%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages