How to create a new connector-v2 #2537
chocolateBlack
started this conversation in
General
Replies: 1 comment 2 replies
-
@Hisoka-X @ruanwenjun |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to add a new connector in a right way
I want to add a sink connector named TestSink, I do the follow job, but error was report .
Exception in thread "main" java.lang.RuntimeException: Plugin PluginIdentifier{engineType='seatunnel', pluginType='sink', pluginName='TestSink'} not found. at org.apache.seatunnel.plugin.discovery.AbstractPluginDiscovery.createPluginInstance(AbstractPluginDiscovery.java:123) at org.apache.seatunnel.core.starter.flink.execution.SinkExecuteProcessor.lambda$initializePlugins$0(SinkExecuteProcessor.java:61) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) at org.apache.seatunnel.core.starter.flink.execution.SinkExecuteProcessor.initializePlugins(SinkExecuteProcessor.java:65) at org.apache.seatunnel.core.starter.flink.execution.AbstractPluginExecuteProcessor.<init>(AbstractPluginExecuteProcessor.java:63) at org.apache.seatunnel.core.starter.flink.execution.SinkExecuteProcessor.<init>(SinkExecuteProcessor.java:50) at org.apache.seatunnel.core.starter.flink.execution.FlinkExecution.<init>(FlinkExecution.java:56) at org.apache.seatunnel.core.starter.flink.command.FlinkApiTaskExecuteCommand.execute(FlinkApiTaskExecuteCommand.java:53) at org.apache.seatunnel.core.starter.Seatunnel.run(Seatunnel.java:40) at org.apache.seatunnel.example.flink.v2.SeaTunnelApiExample.main(SeaTunnelApiExample.java:42)
1.create a module named connector-testsink
2.new a TestSink in the directory "com.apache.seatunnel.connectors.seatunnel.testsink.sink"
`
package com.apache.seatunnel.connectors.seatunnel.testsink.sink;
import com.google.auto.service.AutoService;
import org.apache.seatunnel.api.sink.SeaTunnelSink;
import org.apache.seatunnel.api.sink.SinkWriter;
import org.apache.seatunnel.api.table.type.SeaTunnelDataType;
import org.apache.seatunnel.api.table.type.SeaTunnelRow;
import org.apache.seatunnel.api.table.type.SeaTunnelRowType;
import org.apache.seatunnel.connectors.seatunnel.common.sink.AbstractSimpleSink;
import org.apache.seatunnel.connectors.seatunnel.common.sink.AbstractSinkWriter;
import org.apache.seatunnel.shade.com.typesafe.config.Config;
@autoservice(SeaTunnelSink.class)
public class TestSink extends AbstractSimpleSink<SeaTunnelRow, Void> {
}
`
3. add dependency jar in pom.xml
Beta Was this translation helpful? Give feedback.
All reactions