adnanhemani commented on code in PR #4667:
URL: https://github.com/apache/polaris/pull/4667#discussion_r3416670006


##########
api/openlineage-service/src/main/java/org/apache/polaris/service/lineage/api/PolarisOpenLineageApiService.java:
##########
@@ -0,0 +1,43 @@
+/*
+ * 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 jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.SecurityContext;
+import org.apache.polaris.core.context.RealmContext;
+
+/**
+ * Service interface implemented by the runtime to handle OpenLineage ingest. 
Mirrors the pattern
+ * used by other Polaris API modules where the JAX-RS resource sits in the API 
module and
+ * delegates to a CDI-scoped service implementation in {@code 
polaris-runtime-service}.

Review Comment:
   Agreed — this should stay as the API/runtime delegation layer, not the 
provider contract. Will introduce `OpenLineageIngestProvider` behind it so this 
interface remains the HTTP/runtime seam and the provider seam is the extension 
point.



##########
api/openlineage-service/src/main/java/org/apache/polaris/service/lineage/api/PolarisOpenLineageApiService.java:
##########
@@ -0,0 +1,43 @@
+/*
+ * 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 jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.SecurityContext;
+import org.apache.polaris.core.context.RealmContext;
+
+/**
+ * Service interface implemented by the runtime to handle OpenLineage ingest. 
Mirrors the pattern
+ * used by other Polaris API modules where the JAX-RS resource sits in the API 
module and
+ * delegates to a CDI-scoped service implementation in {@code 
polaris-runtime-service}.
+ */
+public interface PolarisOpenLineageApiService {
+
+  /**
+   * Handle an OpenLineage event accepted at the ingest endpoint.
+   *
+   * @param event the parsed OpenLineage event, dispatched to the correct 
{@code RunEvent}, {@code
+   *     JobEvent}, or {@code DatasetEvent} variant by Jackson based on the 
{@code schemaURL}
+   *     field.
+   * @return the JAX-RS response. OpenLineage clients expect {@code 201 
Created} with no body on
+   *     success.
+   */
+  Response sendLineageEvent(

Review Comment:
   Yes, this is the right split. Will add `OpenLineageIngestRequest` (typed OL 
event + realm id as a plain string) and `OpenLineageIngestResult` 
(accept/reject/unavailable). This service maps the request context to an 
`OpenLineageIngestRequest`, calls the provider, then maps the result back to 
`Response`. Provider implementations never see `SecurityContext` or `Response`.
   
   Keeping `OpenLineageIngestRequest` deliberately thin for now — no 
persistence-shaped fields since there's no persistence yet.



-- 
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