dimas-b commented on code in PR #4667:
URL: https://github.com/apache/polaris/pull/4667#discussion_r3444207332


##########
api/openlineage-service/src/main/java/org/apache/polaris/service/lineage/api/PolarisOpenLineageApi.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.polaris.service.lineage.api;
+
+import io.micrometer.core.annotation.Timed;
+import io.micrometer.core.aop.MeterTag;
+import jakarta.annotation.security.RolesAllowed;
+import jakarta.inject.Inject;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotNull;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.SecurityContext;
+import org.apache.polaris.core.context.RealmContext;
+import org.eclipse.microprofile.faulttolerance.Timeout;
+
+/**
+ * JAX-RS resource for the OpenLineage ingest endpoint.
+ *
+ * <p>Mounted at the standard OpenLineage path ({@code POST /api/v1/lineage}) 
so that any engine
+ * already using the OpenLineage HTTP transport (Spark, Flink, Airflow, Trino, 
dbt) can target
+ * Polaris by URL change alone — no client-side rewriting.
+ *
+ * <p>The body is parsed into a {@link PolarisLineageEvent} which Jackson 
resolves to one of {@code
+ * OfRunEvent} / {@code OfJobEvent} / {@code OfDatasetEvent} based on the 
{@code schemaURL} field.
+ * Unrecognized {@code schemaURL} values fall back to {@code RunEvent}, 
matching Marquez behavior.
+ *
+ * <p>This resource is hand-written rather than generated from the OpenLineage 
JSON Schema because
+ * the OpenAPI generator's Java template does not faithfully translate the 
spec's {@code oneOf}
+ * over event variants.
+ */
+@Path("/api/v1/lineage")

Review Comment:
   > From recent community discussions, Polaris is trying to be a platform with 
replaceable capabilities, not just an opinionated OpenLineage receiver.
   
   I support this statement.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to