diff --git a/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/JdbcOperator.java b/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/JdbcOperator.java index dfb297a6a6..5129a89232 100644 --- a/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/JdbcOperator.java +++ b/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/JdbcOperator.java @@ -70,9 +70,9 @@ public class JdbcOperator { return id; } jdbcRegistryData = JdbcRegistryData.builder() - .key(key) - .data(value) - .type(DataType.EPHEMERAL.getTypeValue()) + .dataKey(key) + .dataValue(value) + .dataType(DataType.EPHEMERAL.getTypeValue()) .lastTerm(System.currentTimeMillis()) .build(); jdbcRegistryDataMapper.insert(jdbcRegistryData); @@ -89,9 +89,9 @@ public class JdbcOperator { return id; } jdbcRegistryData = JdbcRegistryData.builder() - .key(key) - .data(value) - .type(DataType.PERSISTENT.getTypeValue()) + .dataKey(key) + .dataValue(value) + .dataType(DataType.PERSISTENT.getTypeValue()) .lastTerm(System.currentTimeMillis()) .build(); jdbcRegistryDataMapper.insert(jdbcRegistryData); @@ -122,7 +122,7 @@ public class JdbcOperator { public List getChildren(String key) throws SQLException { return jdbcRegistryDataMapper.fuzzyQueryByKey(key) .stream() - .map(JdbcRegistryData::getKey) + .map(JdbcRegistryData::getDataKey) .filter(fullPath -> fullPath.length() > key.length()) .map(fullPath -> StringUtils.substringBefore(fullPath.substring(key.length() + 1), "/")) .collect(Collectors.toList()); @@ -139,7 +139,7 @@ public class JdbcOperator { @SuppressWarnings("checkstyle:IllegalCatch") public JdbcRegistryLock tryToAcquireLock(String key) throws SQLException { JdbcRegistryLock jdbcRegistryLock = JdbcRegistryLock.builder() - .key(key) + .lockKey(key) .lockOwner(JdbcRegistryConstant.LOCK_OWNER) .lastTerm(System.currentTimeMillis()) .build(); diff --git a/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/mapper/JdbcRegistryDataMapper.java b/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/mapper/JdbcRegistryDataMapper.java index 83eb0aab43..701f2e7310 100644 --- a/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/mapper/JdbcRegistryDataMapper.java +++ b/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/mapper/JdbcRegistryDataMapper.java @@ -34,19 +34,19 @@ public interface JdbcRegistryDataMapper extends BaseMapper { @Select("select * from t_ds_jdbc_registry_data") List selectAll(); - @Select("select * from t_ds_jdbc_registry_data where key = #{key}") + @Select("select * from t_ds_jdbc_registry_data where data_key = #{key}") JdbcRegistryData selectByKey(@Param("key") String key); - @Select("select * from t_ds_jdbc_registry_data where key like CONCAT (#{key}, '%')") + @Select("select * from t_ds_jdbc_registry_data where data_key like CONCAT (#{key}, '%')") List fuzzyQueryByKey(@Param("key") String key); - @Update("update t_ds_jdbc_registry_data set data = #{data}, last_term = #{term} where id = #{id}") + @Update("update t_ds_jdbc_registry_data set data_value = #{data}, last_term = #{term} where id = #{id}") int updateDataAndTermById(@Param("id") long id, @Param("data") String data, @Param("term") long term); - @Delete("delete from t_ds_jdbc_registry_data where key = #{key}") + @Delete("delete from t_ds_jdbc_registry_data where data_key = #{key}") void deleteByKey(@Param("key") String key); - @Delete("delete from t_ds_jdbc_registry_data where last_term < #{term} and type = #{type}") + @Delete("delete from t_ds_jdbc_registry_data where last_term < #{term} and data_type = #{type}") void clearExpireEphemeralDate(@Param("term") long term, @Param("type") int type); @Update({"