adnanhemani commented on code in PR #4667: URL: https://github.com/apache/polaris/pull/4667#discussion_r3416673463
########## runtime/service/src/main/java/org/apache/polaris/service/lineage/OpenLineageAdapter.java: ########## @@ -0,0 +1,42 @@ +/* + * 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; + +import jakarta.enterprise.context.RequestScoped; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.SecurityContext; +import org.apache.polaris.core.context.RealmContext; +import org.apache.polaris.service.lineage.api.PolarisLineageEvent; +import org.apache.polaris.service.lineage.api.PolarisOpenLineageApiService; + +/** + * No-op implementation of the OpenLineage ingest endpoint. + * + * <p>Accepts and discards events. Persistence, dataset resolution, and downstream forwarding will + * land in follow-up PRs as described in the Polaris OpenLineage proposal. + */ +@RequestScoped +public class OpenLineageAdapter implements PolarisOpenLineageApiService { Review Comment: Agreed — will inject `OpenLineageIngestProvider` here and have the adapter call it. `NoOpOpenLineageIngestProvider` becomes the default CDI bean. Future persistence/forwarding PRs swap in a real provider without touching this adapter. ########## runtime/service/src/main/java/org/apache/polaris/service/lineage/OpenLineageAdapter.java: ########## @@ -0,0 +1,42 @@ +/* + * 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; + +import jakarta.enterprise.context.RequestScoped; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.SecurityContext; +import org.apache.polaris.core.context.RealmContext; +import org.apache.polaris.service.lineage.api.PolarisLineageEvent; +import org.apache.polaris.service.lineage.api.PolarisOpenLineageApiService; + +/** + * No-op implementation of the OpenLineage ingest endpoint. + * + * <p>Accepts and discards events. Persistence, dataset resolution, and downstream forwarding will + * land in follow-up PRs as described in the Polaris OpenLineage proposal. + */ +@RequestScoped +public class OpenLineageAdapter implements PolarisOpenLineageApiService { + + @Override + public Response sendLineageEvent( + PolarisLineageEvent event, RealmContext realmContext, SecurityContext securityContext) { + return Response.status(Response.Status.CREATED).build(); Review Comment: Yes — will change this to `OpenLineageIngestResult result = provider.ingest(request); return toResponse(result);`. The no-op provider returns accepted, this adapter maps it to `201`. Accept/reject stays in the provider; HTTP semantics stay here. -- 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]
