huzk8 commented on a change in pull request #1088:
URL:
https://github.com/apache/incubator-seatunnel/pull/1088#discussion_r787529762
##########
File path:
seatunnel-apis/seatunnel-api-spark/src/main/scala/org/apache/seatunnel/spark/BaseSparkSink.java
##########
@@ -14,19 +14,28 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.seatunnel.spark
-import org.apache.seatunnel.apis.BaseSource
-import org.apache.seatunnel.shade.com.typesafe.config.{Config, ConfigFactory}
+package org.apache.seatunnel.spark;
-trait BaseSparkSource[Data] extends BaseSource[SparkEnvironment] {
+import org.apache.seatunnel.apis.BaseSink;
+import org.apache.seatunnel.shade.com.typesafe.config.Config;
+import org.apache.seatunnel.shade.com.typesafe.config.ConfigFactory;
+import org.apache.spark.sql.Dataset;
+import org.apache.spark.sql.Row;
- protected var config: Config = ConfigFactory.empty()
+public abstract class BaseSparkSink<OUT> implements
BaseSink<SparkEnvironment> {
+ protected Config config = ConfigFactory.empty();
- override def setConfig(config: Config): Unit = this.config = config
+ @Override
+ public void setConfig(Config config){
+ this.config = config;
+ }
- override def getConfig: Config = config
+ @Override
+ public Config getConfig(){
+ return config;
+ }
- def getData(env: SparkEnvironment): Data;
+ public abstract OUT output(Dataset<Row> data, SparkEnvironment env);
Review comment:
the origin code is below.
```
def output(data: Dataset[Row], env: SparkEnvironment): OUT;
```
Could you describe more detial?
--
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]