Skip to content

Commit

Permalink
fix npe
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaochen-zhou committed May 1, 2024
1 parent ece9580 commit ad49546
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ public StarRocksBeReadClient(String beNodeInfo, SourceConfig sourceConfig) {
}

public void openScanner(QueryPartition partition, SeaTunnelRowType seaTunnelRowType) {
this.seaTunnelRowType = seaTunnelRowType;
eos.set(false);
this.readerOffset = 0;
this.rowBatch = null;
this.seaTunnelRowType = seaTunnelRowType;
Set<Long> tabletIds = partition.getTabletIds();
TScanOpenParams params = new TScanOpenParams();
params.setTablet_ids(new ArrayList<>(tabletIds));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
public class StarRocksSource
implements SeaTunnelSource<SeaTunnelRow, StarRocksSourceSplit, StarRocksSourceState> {

private CatalogTable catalogTable;
private SourceConfig sourceConfig;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import org.apache.seatunnel.api.configuration.util.OptionRule;
import org.apache.seatunnel.api.source.SeaTunnelSource;
import org.apache.seatunnel.api.source.SourceSplit;
import org.apache.seatunnel.api.table.catalog.CatalogTable;
import org.apache.seatunnel.api.table.catalog.CatalogTableUtil;
import org.apache.seatunnel.api.table.catalog.schema.TableSchemaOptions;
import org.apache.seatunnel.api.table.connector.TableSource;
import org.apache.seatunnel.api.table.factory.Factory;
Expand Down Expand Up @@ -74,7 +72,6 @@ public Class<? extends SeaTunnelSource> getSourceClass() {
TableSource<T, SplitT, StateT> createSource(TableSourceFactoryContext context) {
ReadonlyConfig config = context.getOptions();
SourceConfig starRocksSourceConfig = new SourceConfig(config);
CatalogTable catalogTable = CatalogTableUtil.buildWithConfig(config);
return () ->
(SeaTunnelSource<T, SplitT, StateT>) new StarRocksSource(starRocksSourceConfig);
}
Expand Down

0 comments on commit ad49546

Please sign in to comment.