Skip to content

Commit

Permalink
Rename DumperCommonContext
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Nov 3, 2023
1 parent ef2647e commit a47c1bc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
@Getter
@Setter
@ToString(exclude = {"dataSourceConfig", "tableNameSchemaNameMapping"})
public abstract class BaseDumperContext {
public abstract class DumperCommonContext {

private String dataSourceName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@Getter
@Setter
@ToString(callSuper = true)
public class IncrementalDumperContext extends BaseDumperContext {
public final class IncrementalDumperContext extends DumperCommonContext {

private String jobId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
@Getter
@Setter
@ToString(callSuper = true)
public final class InventoryDumperContext extends BaseDumperContext {
public final class InventoryDumperContext extends DumperCommonContext {

private String actualTableName;

Expand All @@ -51,7 +51,7 @@ public final class InventoryDumperContext extends BaseDumperContext {

private JobRateLimitAlgorithm rateLimitAlgorithm;

public InventoryDumperContext(final BaseDumperContext dumperContext) {
public InventoryDumperContext(final DumperCommonContext dumperContext) {
setDataSourceName(dumperContext.getDataSourceName());
setDataSourceConfig(dumperContext.getDataSourceConfig());
setTableNameMap(dumperContext.getTableNameMap());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.shardingsphere.test.it.data.pipeline.core.prepare;

import org.apache.shardingsphere.data.pipeline.api.context.ingest.BaseDumperContext;
import org.apache.shardingsphere.data.pipeline.api.context.ingest.DumperCommonContext;
import org.apache.shardingsphere.data.pipeline.api.context.ingest.InventoryDumperContext;
import org.apache.shardingsphere.data.pipeline.api.metadata.model.PipelineColumnMetaData;
import org.apache.shardingsphere.data.pipeline.common.datasource.PipelineDataSourceManager;
Expand Down Expand Up @@ -143,7 +143,7 @@ void assertSplitInventoryDataWithoutPrimaryAndUniqueIndex() throws SQLException
}
}

private void initEmptyTablePrimaryEnvironment(final BaseDumperContext dumperContext) throws SQLException {
private void initEmptyTablePrimaryEnvironment(final DumperCommonContext dumperContext) throws SQLException {
DataSource dataSource = dataSourceManager.getDataSource(dumperContext.getDataSourceConfig());
try (
Connection connection = dataSource.getConnection();
Expand All @@ -153,7 +153,7 @@ private void initEmptyTablePrimaryEnvironment(final BaseDumperContext dumperCont
}
}

private void initIntPrimaryEnvironment(final BaseDumperContext dumperContext) throws SQLException {
private void initIntPrimaryEnvironment(final DumperCommonContext dumperContext) throws SQLException {
DataSource dataSource = dataSourceManager.getDataSource(dumperContext.getDataSourceConfig());
try (
Connection connection = dataSource.getConnection();
Expand All @@ -166,7 +166,7 @@ private void initIntPrimaryEnvironment(final BaseDumperContext dumperContext) th
}
}

private void initCharPrimaryEnvironment(final BaseDumperContext dumperContext) throws SQLException {
private void initCharPrimaryEnvironment(final DumperCommonContext dumperContext) throws SQLException {
DataSource dataSource = dataSourceManager.getDataSource(dumperContext.getDataSourceConfig());
try (
Connection connection = dataSource.getConnection();
Expand All @@ -177,7 +177,7 @@ private void initCharPrimaryEnvironment(final BaseDumperContext dumperContext) t
}
}

private void initUnionPrimaryEnvironment(final BaseDumperContext dumperContext) throws SQLException {
private void initUnionPrimaryEnvironment(final DumperCommonContext dumperContext) throws SQLException {
DataSource dataSource = dataSourceManager.getDataSource(dumperContext.getDataSourceConfig());
try (
Connection connection = dataSource.getConnection();
Expand All @@ -188,7 +188,7 @@ private void initUnionPrimaryEnvironment(final BaseDumperContext dumperContext)
}
}

private void initNoPrimaryEnvironment(final BaseDumperContext dumperContext) throws SQLException {
private void initNoPrimaryEnvironment(final DumperCommonContext dumperContext) throws SQLException {
DataSource dataSource = dataSourceManager.getDataSource(dumperContext.getDataSourceConfig());
try (
Connection connection = dataSource.getConnection();
Expand All @@ -199,7 +199,7 @@ private void initNoPrimaryEnvironment(final BaseDumperContext dumperContext) thr
}
}

private void initUniqueIndexOnNotNullColumnEnvironment(final BaseDumperContext dumperContext) throws SQLException {
private void initUniqueIndexOnNotNullColumnEnvironment(final DumperCommonContext dumperContext) throws SQLException {
DataSource dataSource = dataSourceManager.getDataSource(dumperContext.getDataSourceConfig());
try (
Connection connection = dataSource.getConnection();
Expand Down

0 comments on commit a47c1bc

Please sign in to comment.