Skip to content

Commit

Permalink
[Feature][Connector-V2][Tablestore] Support Source connector for Tab…
Browse files Browse the repository at this point in the history
…lestore apache#7448
  • Loading branch information
tanzhiqiang committed Aug 26, 2024
1 parent 542d5b4 commit 8a21383
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import org.apache.seatunnel.api.source.SourceSplitEnumerator;
import org.apache.seatunnel.api.source.SupportColumnProjection;
import org.apache.seatunnel.api.source.SupportParallelism;
import org.apache.seatunnel.api.table.catalog.CatalogTable;
import org.apache.seatunnel.api.table.catalog.CatalogTableUtil;
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.common.constants.JobMode;
Expand All @@ -35,6 +35,9 @@
import com.google.auto.service.AutoService;
import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.List;

@Slf4j
@AutoService(SeaTunnelSource.class)
public class TableStoreDBSource
Expand All @@ -51,6 +54,13 @@ public String getPluginName() {
return "Tablestore";
}

@Override
public List<CatalogTable> getProducedCatalogTables() {
List<CatalogTable> list = new ArrayList<>();

return SeaTunnelSource.super.getProducedCatalogTables();
}

public TableStoreDBSource(ReadonlyConfig config) {
this.tablestoreOptions = TablestoreOptions.of(config);
CatalogTableUtil.buildWithConfig(config);
Expand All @@ -64,11 +74,6 @@ public Boundedness getBoundedness() {
: Boundedness.UNBOUNDED;
}

@Override
public SeaTunnelDataType<SeaTunnelRow> getProducedType() {
return this.typeInfo;
}

@Override
public SourceReader<SeaTunnelRow, TableStoreDBSourceSplit> createReader(Context readerContext)
throws Exception {
Expand Down

0 comments on commit 8a21383

Please sign in to comment.