zhztheplayer commented on code in PR #8143: URL: https://github.com/apache/incubator-gluten/pull/8143#discussion_r1872463510
########## gluten-core/src/main/scala/org/apache/gluten/backend/Component.scala: ########## @@ -0,0 +1,248 @@ +/* + * 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.gluten.backend + +import org.apache.gluten.extension.columnar.transition.ConventionFunc +import org.apache.gluten.extension.injector.Injector + +import org.apache.spark.SparkContext +import org.apache.spark.annotation.Experimental +import org.apache.spark.api.plugin.PluginContext + +import java.util.concurrent.atomic.{AtomicBoolean, AtomicInteger} + +import scala.collection.mutable + +/** + * The base API to inject user-defined logic to Gluten. To register a component, its implementations + * should be placed to Gluten's classpath with a Java service file. Gluten will discover all the Review Comment: > Maybe, better to place such interface code in a new module If you think the APIs can be isolated from concrete implementations, this is actually what I have been doing for long time on the module `gluten-core`. You can refer to `gluten-core`'s latest code structure [here](https://github.com/apache/incubator-gluten/tree/main/gluten-core/src/main/scala/org/apache/gluten) to see if we are aligned already. `gluten-core` will become the thin bridge between Gluten backends and Spark's plugin API, with all the predefined arch level features including the enhanced query optimizer and other runtime essentials. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
