diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/registrycenter/repository/PipelineMetaDataProcessConfigurationGovernanceRepository.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/registrycenter/repository/PipelineMetaDataProcessConfigurationGovernanceRepository.java index cfb065eb70db5..e6f3e1ffb5803 100644 --- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/registrycenter/repository/PipelineMetaDataProcessConfigurationGovernanceRepository.java +++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/registrycenter/repository/PipelineMetaDataProcessConfigurationGovernanceRepository.java @@ -30,22 +30,22 @@ public final class PipelineMetaDataProcessConfigurationGovernanceRepository { private final ClusterPersistRepository repository; /** - * Get meta data process configuration. + * Persist meta data process configuration. * * @param jobType job type, nullable - * @return process configuration YAML text + * @param processConfigYamlText process configuration YAML text */ - public String getMetaDataProcessConfiguration(final String jobType) { - return repository.getDirectly(PipelineMetaDataNode.getMetaDataProcessConfigPath(jobType)); + public void persist(final String jobType, final String processConfigYamlText) { + repository.persist(PipelineMetaDataNode.getMetaDataProcessConfigPath(jobType), processConfigYamlText); } /** - * Persist meta data process configuration. + * Load meta data process configuration. * * @param jobType job type, nullable - * @param processConfigYamlText process configuration YAML text + * @return process configuration YAML text */ - public void persistMetaDataProcessConfiguration(final String jobType, final String processConfigYamlText) { - repository.persist(PipelineMetaDataNode.getMetaDataProcessConfigPath(jobType), processConfigYamlText); + public String load(final String jobType) { + return repository.getDirectly(PipelineMetaDataNode.getMetaDataProcessConfigPath(jobType)); } } diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/metadata/PipelineProcessConfigurationPersistService.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/metadata/PipelineProcessConfigurationPersistService.java index e6f4c93162363..b20a5e2293512 100644 --- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/metadata/PipelineProcessConfigurationPersistService.java +++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/metadata/PipelineProcessConfigurationPersistService.java @@ -34,7 +34,7 @@ public final class PipelineProcessConfigurationPersistService implements Pipelin @Override public PipelineProcessConfiguration load(final PipelineContextKey contextKey, final String jobType) { - String yamlText = PipelineAPIFactory.getGovernanceRepositoryAPI(contextKey).getMetaDataProcessConfigurationGovernanceRepository().getMetaDataProcessConfiguration(jobType); + String yamlText = PipelineAPIFactory.getGovernanceRepositoryAPI(contextKey).getMetaDataProcessConfigurationGovernanceRepository().load(jobType); if (Strings.isNullOrEmpty(yamlText)) { return null; } @@ -45,6 +45,6 @@ public PipelineProcessConfiguration load(final PipelineContextKey contextKey, fi @Override public void persist(final PipelineContextKey contextKey, final String jobType, final PipelineProcessConfiguration processConfig) { String yamlText = YamlEngine.marshal(swapper.swapToYamlConfiguration(processConfig)); - PipelineAPIFactory.getGovernanceRepositoryAPI(contextKey).getMetaDataProcessConfigurationGovernanceRepository().persistMetaDataProcessConfiguration(jobType, yamlText); + PipelineAPIFactory.getGovernanceRepositoryAPI(contextKey).getMetaDataProcessConfigurationGovernanceRepository().persist(jobType, yamlText); } }