From 4ef1787ecb571c4c246c8cc38f91f1e692c685c7 Mon Sep 17 00:00:00 2001 From: Esteban Zimanyi Date: Sat, 12 Sep 2026 13:52:37 +0200 Subject: [PATCH 1/2] Name every facade method by the class the catalog puts it in The MeosOps* facades are grouped by the catalog's object model, which gives a class to every base value MEOS passes by reference: geom_in belongs to Geometry, the cbuffer, npoint and pose constructors and accessors to Cbuffer, Npoint and Pose, geo_as_text to Geo. The smoke tests call those methods on the free-function classes, MeosOpsFreeGeo, MeosOpsFreeCbuffer, MeosOpsFreeNpoint and MeosOpsFreePose, which hold none of them, so the binding module's tests do not compile against facades generated from the current catalog. Each call names the class that holds the method. The wiring javadoc names methods the same way: edwithin_tgeo_tgeo is on MeosOpsFreeGeo, and the windowed-tier examples use tpoint_length and tnumber_twavg, the MEOS functions for a trajectory's length and a temporal number's time-weighted average. --- .../kafka/meos/wirings/MeosCrossStreamJoiner.java | 4 ++-- .../kafka/meos/wirings/MeosWindowedAggregator.java | 4 ++-- .../org/mobilitydb/kafka/meos/MeosCbufferSmokeTest.java | 6 +++--- .../java/org/mobilitydb/kafka/meos/MeosFacadeSmokeTest.java | 4 ++-- .../java/org/mobilitydb/kafka/meos/MeosNpointSmokeTest.java | 6 +++--- .../java/org/mobilitydb/kafka/meos/MeosPoseSmokeTest.java | 6 +++--- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/binding/src/main/java/org/mobilitydb/kafka/meos/wirings/MeosCrossStreamJoiner.java b/binding/src/main/java/org/mobilitydb/kafka/meos/wirings/MeosCrossStreamJoiner.java index 7583304..56b2cc1 100644 --- a/binding/src/main/java/org/mobilitydb/kafka/meos/wirings/MeosCrossStreamJoiner.java +++ b/binding/src/main/java/org/mobilitydb/kafka/meos/wirings/MeosCrossStreamJoiner.java @@ -49,7 +49,7 @@ * *

Typical usage — per-vehicle-pair "did they come within * 100m of each other in the last 5 minutes?" via - * {@code MeosOpsTGeo.edwithin_tgeo_tgeo}: + * {@code MeosOpsFreeGeo.edwithin_tgeo_tgeo}: * *

{@code
  * KStream a = ...;   // keyed by regionId
@@ -60,7 +60,7 @@
  *     MeosCrossStreamJoiner.joiner((left, right) -> {
  *         Pointer leftT  = left.toTGeoPointer();
  *         Pointer rightT = right.toTGeoPointer();
- *         if (MeosOpsTGeo.edwithin_tgeo_tgeo(leftT, rightT, 100.0) != 0) {
+ *         if (MeosOpsFreeGeo.edwithin_tgeo_tgeo(leftT, rightT, 100.0) != 0) {
  *             return new MeetingEvent(left.id(), right.id(), System.currentTimeMillis());
  *         }
  *         return null;  // joined out
diff --git a/binding/src/main/java/org/mobilitydb/kafka/meos/wirings/MeosWindowedAggregator.java b/binding/src/main/java/org/mobilitydb/kafka/meos/wirings/MeosWindowedAggregator.java
index 9d719e2..be3f8a8 100644
--- a/binding/src/main/java/org/mobilitydb/kafka/meos/wirings/MeosWindowedAggregator.java
+++ b/binding/src/main/java/org/mobilitydb/kafka/meos/wirings/MeosWindowedAggregator.java
@@ -36,8 +36,8 @@
  *
  * 

The {@code windowed} tier (per the v4 baseline: 161 of 2,097 * emitted methods) emits one MEOS-derived value per window. Canonical - * examples are {@code temporal_length(tgeo)} (one length per - * trajectory window) and {@code temporal_twavg(tnumber)} (one + * examples are {@code tpoint_length(tpoint)} (one length per + * trajectory window) and {@code tnumber_twavg(tnumber)} (one * time-weighted average per window). * *

Kafka Streams' {@code KStream.groupByKey().windowedBy(...).aggregate( diff --git a/binding/src/test/java/org/mobilitydb/kafka/meos/MeosCbufferSmokeTest.java b/binding/src/test/java/org/mobilitydb/kafka/meos/MeosCbufferSmokeTest.java index 7f87be4..4ee37dc 100644 --- a/binding/src/test/java/org/mobilitydb/kafka/meos/MeosCbufferSmokeTest.java +++ b/binding/src/test/java/org/mobilitydb/kafka/meos/MeosCbufferSmokeTest.java @@ -59,9 +59,9 @@ static void finalizeMeos() { @Test void cbuffer() { - Pointer cb = MeosOpsFreeCbuffer.cbuffer_make(MeosOpsFreeGeo.geom_in("POINT(1 1)", 0), 0.5); + Pointer cb = MeosOpsCbuffer.cbuffer_make(MeosOpsGeometry.geom_in("POINT(1 1)", 0), 0.5); assertNotNull(cb); - assertEquals(0.5, MeosOpsFreeCbuffer.cbuffer_radius(cb), 1e-9); - assertNotNull(MeosOpsFreeCbuffer.cbuffer_out(cb, 6)); + assertEquals(0.5, MeosOpsCbuffer.cbuffer_radius(cb), 1e-9); + assertNotNull(MeosOpsCbuffer.cbuffer_out(cb, 6)); } } diff --git a/binding/src/test/java/org/mobilitydb/kafka/meos/MeosFacadeSmokeTest.java b/binding/src/test/java/org/mobilitydb/kafka/meos/MeosFacadeSmokeTest.java index 8c10499..cf2f389 100644 --- a/binding/src/test/java/org/mobilitydb/kafka/meos/MeosFacadeSmokeTest.java +++ b/binding/src/test/java/org/mobilitydb/kafka/meos/MeosFacadeSmokeTest.java @@ -86,8 +86,8 @@ void geoStbox() { @Test void geoGeometry() { - Pointer geom = MeosOpsFreeGeo.geom_in("POINT(1 1)", 0); + Pointer geom = MeosOpsGeometry.geom_in("POINT(1 1)", 0); assertNotNull(geom); - assertTrue(MeosOpsFreeGeo.geo_as_text(geom, 6).toUpperCase().contains("POINT")); + assertTrue(MeosOpsGeo.geo_as_text(geom, 6).toUpperCase().contains("POINT")); } } diff --git a/binding/src/test/java/org/mobilitydb/kafka/meos/MeosNpointSmokeTest.java b/binding/src/test/java/org/mobilitydb/kafka/meos/MeosNpointSmokeTest.java index 3e3b7f0..99e7b95 100644 --- a/binding/src/test/java/org/mobilitydb/kafka/meos/MeosNpointSmokeTest.java +++ b/binding/src/test/java/org/mobilitydb/kafka/meos/MeosNpointSmokeTest.java @@ -58,9 +58,9 @@ static void finalizeMeos() { @Test void npoint() { - Pointer np = MeosOpsFreeNpoint.npoint_make(1, 0.5); + Pointer np = MeosOpsNpoint.npoint_make(1, 0.5); assertNotNull(np); - assertEquals(1, MeosOpsFreeNpoint.npoint_route(np)); - assertEquals(0.5, MeosOpsFreeNpoint.npoint_position(np), 1e-9); + assertEquals(1, MeosOpsNpoint.npoint_route(np)); + assertEquals(0.5, MeosOpsNpoint.npoint_position(np), 1e-9); } } diff --git a/binding/src/test/java/org/mobilitydb/kafka/meos/MeosPoseSmokeTest.java b/binding/src/test/java/org/mobilitydb/kafka/meos/MeosPoseSmokeTest.java index 61395da..52bd083 100644 --- a/binding/src/test/java/org/mobilitydb/kafka/meos/MeosPoseSmokeTest.java +++ b/binding/src/test/java/org/mobilitydb/kafka/meos/MeosPoseSmokeTest.java @@ -59,9 +59,9 @@ static void finalizeMeos() { @Test void pose() { - Pointer pose = MeosOpsFreePose.pose_in("Pose(Point(1 1), 0.5)"); + Pointer pose = MeosOpsPose.pose_in("Pose(Point(1 1), 0.5)"); assertNotNull(pose); - assertNotNull(MeosOpsFreePose.pose_out(pose, 6)); - assertEquals(0.5, MeosOpsFreePose.pose_yaw(pose), 1e-9); + assertNotNull(MeosOpsPose.pose_out(pose, 6)); + assertEquals(0.5, MeosOpsPose.pose_yaw(pose), 1e-9); } } From 8dba6a07e9c497cebeeb73ba474e6d913318f34d Mon Sep 17 00:00:00 2001 From: Esteban Zimanyi Date: Sat, 12 Sep 2026 14:01:28 +0200 Subject: [PATCH 2/2] Run every MEOS test in every build Five test classes carried @EnabledIfSystemProperty(named = "meos.enabled"), so a build without the property reported each of them as skipped under a green conclusion. Each class runs in every build and needs a libmeos on the load path, which CI and tools/refresh-from-master.sh both supply. The meos.enabled property gated nothing but those classes and the full-matrix test's choice of Q5 count, so it leaves the pom with them: the three Q5 expectations are the MEOS geodetic engine's answer, 0, and the comment keeps the pure-Java scaffold's counts beside the open reconciliation. The demo topology and the wiring README name the switch the generated runtime reads, mobilitykafka.meos.enabled (MeosOpsRuntime). The facade smoke test said the family smoke tests compile only under family build flags that nothing implements; that statement goes. --- .../java/berlinmod/BerlinMODFullMatrixTest.java | 17 ++++++++--------- .../java/berlinmod/BerlinMODSetSetJoinTest.java | 5 +---- .../org/mobilitydb/kafka/meos/wirings/README.md | 2 +- .../kafka/meos/MeosCbufferSmokeTest.java | 2 -- .../kafka/meos/MeosFacadeSmokeTest.java | 10 +++------- .../kafka/meos/MeosNpointSmokeTest.java | 2 -- .../kafka/meos/MeosPoseSmokeTest.java | 2 -- .../wirings/demo/MeosWiringsDemoTopology.java | 4 ++-- pom.xml | 4 ---- 9 files changed, 15 insertions(+), 33 deletions(-) diff --git a/benchmark/src/test/java/berlinmod/BerlinMODFullMatrixTest.java b/benchmark/src/test/java/berlinmod/BerlinMODFullMatrixTest.java index dfa8114..b9bfa66 100644 --- a/benchmark/src/test/java/berlinmod/BerlinMODFullMatrixTest.java +++ b/benchmark/src/test/java/berlinmod/BerlinMODFullMatrixTest.java @@ -74,12 +74,11 @@ void fullMatrix() { } // Q5 ("pairs of vehicles meeting near P") is the one cell whose count - // differs between the pure-Java Haversine approximation (scaffold) and - // the MEOS geodetic engine (integration): the MEOS pair-meeting path - // emits none under these params while the planar approximation is more - // permissive. The other 26 cells are engine-invariant. TODO(meos): - // reconcile the Q5 pair-meeting semantics across the two engines. - boolean meos = Boolean.getBoolean("meos.enabled"); + // depends on the engine: the MEOS geodetic pair-meeting path emits none + // under these params, where the pure-Java Haversine scaffold emits 199 + // continuous, 7 windowed and 28 snapshot pairs. The other 26 cells are + // engine-invariant. TODO(meos): reconcile the Q5 pair-meeting semantics + // across the two engines. // ---- continuous outputs ---- assertCount(driver, BerlinMODTopology.Q1_CONTINUOUS_OUTPUT, "Q1-continuous", 5, @@ -90,7 +89,7 @@ void fullMatrix() { Serdes.Integer().deserializer(), new BooleanDeserializer()); assertCount(driver, BerlinMODTopology.Q4_CONTINUOUS_OUTPUT, "Q4-continuous", 2, Serdes.Integer().deserializer(), new LongDeserializer()); - assertCount(driver, BerlinMODTopology.Q5_CONTINUOUS_OUTPUT, "Q5-continuous", meos ? 0 : 199, + assertCount(driver, BerlinMODTopology.Q5_CONTINUOUS_OUTPUT, "Q5-continuous", 0, new StringDeserializer(), new DoubleDeserializer()); assertCount(driver, BerlinMODTopology.Q6_CONTINUOUS_OUTPUT, "Q6-continuous", 200, Serdes.Integer().deserializer(), new DoubleDeserializer()); @@ -110,7 +109,7 @@ void fullMatrix() { new LongDeserializer(), new LongDeserializer()); assertCount(driver, BerlinMODTopology.Q4_WINDOWED_OUTPUT, "Q4-windowed", 21, new LongDeserializer(), new StringDeserializer()); - assertCount(driver, BerlinMODTopology.Q5_WINDOWED_OUTPUT, "Q5-windowed", meos ? 0 : 7, + assertCount(driver, BerlinMODTopology.Q5_WINDOWED_OUTPUT, "Q5-windowed", 0, new StringDeserializer(), new DoubleDeserializer()); assertCount(driver, BerlinMODTopology.Q6_WINDOWED_OUTPUT, "Q6-windowed", 46, new LongDeserializer(), new StringDeserializer()); @@ -130,7 +129,7 @@ void fullMatrix() { new LongDeserializer(), new IntegerDeserializer()); assertCount(driver, BerlinMODTopology.Q4_SNAPSHOT_OUTPUT, "Q4-snapshot", 57, new LongDeserializer(), new StringDeserializer()); - assertCount(driver, BerlinMODTopology.Q5_SNAPSHOT_OUTPUT, "Q5-snapshot", meos ? 0 : 28, + assertCount(driver, BerlinMODTopology.Q5_SNAPSHOT_OUTPUT, "Q5-snapshot", 0, new StringDeserializer(), new DoubleDeserializer()); assertCount(driver, BerlinMODTopology.Q6_SNAPSHOT_OUTPUT, "Q6-snapshot", 141, new LongDeserializer(), new StringDeserializer()); diff --git a/benchmark/src/test/java/berlinmod/BerlinMODSetSetJoinTest.java b/benchmark/src/test/java/berlinmod/BerlinMODSetSetJoinTest.java index f162780..c4b44a6 100644 --- a/benchmark/src/test/java/berlinmod/BerlinMODSetSetJoinTest.java +++ b/benchmark/src/test/java/berlinmod/BerlinMODSetSetJoinTest.java @@ -29,7 +29,6 @@ import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.EnabledIfSystemProperty; import org.mobilitydb.meos.MeosOpsFreeGeo; import java.util.HashSet; @@ -43,10 +42,8 @@ * {@link MeosOpsFreeGeo} set-set family) against an independent per-pair scalar * baseline ({@code edwithin_tgeo_tgeo} / {@code eintersects_tgeo_tgeo}). The two * code paths must agree exactly on which trip pairs ever meet / are always - * disjoint. Runs only with {@code -Dmeos.enabled=true} and an extended libmeos - * on the library path. + * disjoint. It needs an extended libmeos on the library path. */ -@EnabledIfSystemProperty(named = "meos.enabled", matches = "true") class BerlinMODSetSetJoinTest { // Four trajectory trips: T1 crosses T0's path mid-window; T3 coincides with diff --git a/binding/src/main/java/org/mobilitydb/kafka/meos/wirings/README.md b/binding/src/main/java/org/mobilitydb/kafka/meos/wirings/README.md index fb4a855..35434d7 100644 --- a/binding/src/main/java/org/mobilitydb/kafka/meos/wirings/README.md +++ b/binding/src/main/java/org/mobilitydb/kafka/meos/wirings/README.md @@ -75,7 +75,7 @@ Run with: ```bash mvn -q exec:java \ -Dexec.mainClass=org.mobilitydb.kafka.meos.wirings.demo.MeosWiringsDemoTopology \ - -Dmeos.enabled=true + -Dmobilitykafka.meos.enabled=true ``` The demo uses `TopologyTestDriver` (kafka-streams-test-utils) — no diff --git a/binding/src/test/java/org/mobilitydb/kafka/meos/MeosCbufferSmokeTest.java b/binding/src/test/java/org/mobilitydb/kafka/meos/MeosCbufferSmokeTest.java index 4ee37dc..b4f58e4 100644 --- a/binding/src/test/java/org/mobilitydb/kafka/meos/MeosCbufferSmokeTest.java +++ b/binding/src/test/java/org/mobilitydb/kafka/meos/MeosCbufferSmokeTest.java @@ -32,7 +32,6 @@ import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.EnabledIfSystemProperty; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -43,7 +42,6 @@ * family ({@code -DCBUFFER=ON}); the family requires a libmeos built with * {@code -DCBUFFER=ON}. */ -@EnabledIfSystemProperty(named = "meos.enabled", matches = "true") class MeosCbufferSmokeTest { @BeforeAll diff --git a/binding/src/test/java/org/mobilitydb/kafka/meos/MeosFacadeSmokeTest.java b/binding/src/test/java/org/mobilitydb/kafka/meos/MeosFacadeSmokeTest.java index cf2f389..920913a 100644 --- a/binding/src/test/java/org/mobilitydb/kafka/meos/MeosFacadeSmokeTest.java +++ b/binding/src/test/java/org/mobilitydb/kafka/meos/MeosFacadeSmokeTest.java @@ -32,7 +32,6 @@ import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.EnabledIfSystemProperty; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -40,14 +39,11 @@ /** * Runtime check that the always-built MEOS facade families (core and geo) call * into libmeos and return correct results. Each constructs a value through a - * {@code MeosOps*} facade method and reads it back. Runs only with - * {@code -Dmeos.enabled=true} and a libmeos on the load path. The - * optional families have their own gated smoke tests + * {@code MeosOps*} facade method and reads it back, against a libmeos on the + * load path. The optional families have their own smoke tests * ({@link MeosCbufferSmokeTest}, {@link MeosNpointSmokeTest}, - * {@link MeosPoseSmokeTest}), each compiled only when its build flag includes - * the family. + * {@link MeosPoseSmokeTest}). */ -@EnabledIfSystemProperty(named = "meos.enabled", matches = "true") class MeosFacadeSmokeTest { @BeforeAll diff --git a/binding/src/test/java/org/mobilitydb/kafka/meos/MeosNpointSmokeTest.java b/binding/src/test/java/org/mobilitydb/kafka/meos/MeosNpointSmokeTest.java index 99e7b95..6af7b13 100644 --- a/binding/src/test/java/org/mobilitydb/kafka/meos/MeosNpointSmokeTest.java +++ b/binding/src/test/java/org/mobilitydb/kafka/meos/MeosNpointSmokeTest.java @@ -32,7 +32,6 @@ import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.EnabledIfSystemProperty; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -42,7 +41,6 @@ * correct results. Compiled and run when the build includes the npoint family * (the default; dropped with {@code -DNPOINT=OFF}). */ -@EnabledIfSystemProperty(named = "meos.enabled", matches = "true") class MeosNpointSmokeTest { @BeforeAll diff --git a/binding/src/test/java/org/mobilitydb/kafka/meos/MeosPoseSmokeTest.java b/binding/src/test/java/org/mobilitydb/kafka/meos/MeosPoseSmokeTest.java index 52bd083..25369a3 100644 --- a/binding/src/test/java/org/mobilitydb/kafka/meos/MeosPoseSmokeTest.java +++ b/binding/src/test/java/org/mobilitydb/kafka/meos/MeosPoseSmokeTest.java @@ -32,7 +32,6 @@ import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.EnabledIfSystemProperty; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -43,7 +42,6 @@ * family ({@code -DPOSE=ON}); the family requires a libmeos built with * {@code -DPOSE=ON}. */ -@EnabledIfSystemProperty(named = "meos.enabled", matches = "true") class MeosPoseSmokeTest { @BeforeAll diff --git a/binding/src/test/java/org/mobilitydb/kafka/meos/wirings/demo/MeosWiringsDemoTopology.java b/binding/src/test/java/org/mobilitydb/kafka/meos/wirings/demo/MeosWiringsDemoTopology.java index 981f4c8..30d259c 100644 --- a/binding/src/test/java/org/mobilitydb/kafka/meos/wirings/demo/MeosWiringsDemoTopology.java +++ b/binding/src/test/java/org/mobilitydb/kafka/meos/wirings/demo/MeosWiringsDemoTopology.java @@ -97,7 +97,7 @@ *

{@code
  * mvn -q exec:java \
  *     -Dexec.mainClass=org.mobilitydb.kafka.meos.wirings.demo.MeosWiringsDemoTopology \
- *     -Dmeos.enabled=true
+ *     -Dmobilitykafka.meos.enabled=true
  * }
*/ public final class MeosWiringsDemoTopology { @@ -191,7 +191,7 @@ public static void main(String[] args) { if (!MeosOpsRuntime.MEOS_AVAILABLE) { LOG.warn("MEOS not available — topology built but not executed. " - + "Set -Dmeos.enabled=true and ensure libmeos is loadable to run."); + + "Set -Dmobilitykafka.meos.enabled=true and ensure libmeos is loadable to run."); return; } diff --git a/pom.xml b/pom.xml index 5f44127..7214b5d 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,6 @@ 5.11.4 1.0 2.1.10 - true /usr/local/lib @@ -48,9 +47,6 @@ 3.2.5 false - - ${meos.enabled} - ${meos.lib.dir}