Skip to content

Commit

Permalink
Rename GovernanceRepositoryAPI.updateJobItemErrorMessage()
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Nov 21, 2023
1 parent e9ebe05 commit fbc262e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,13 @@ public interface GovernanceRepositoryAPI {
void persist(String key, String value);

/**
* Update data.
* Update job item error message.
*
* @param key key of data
* @param value value of data
* @param jobId job ID
* @param shardingItem sharding item
* @param errorMessage error message
*/
void update(String key, String value);
void updateJobItemErrorMessage(String jobId, int shardingItem, String errorMessage);

/**
* Get sharding items of job.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ public void persist(final String key, final String value) {
}

@Override
public void update(final String key, final String value) {
repository.update(key, value);
public void updateJobItemErrorMessage(final String jobId, final int shardingItem, final String errorMessage) {
repository.update(PipelineMetaDataNode.getJobItemErrorMessagePath(jobId, shardingItem), errorMessage);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public String getErrorMessage() {
* @param error error
*/
public void updateErrorMessage(final Object error) {
governanceRepositoryAPI.update(PipelineMetaDataNode.getJobItemErrorMessagePath(jobId, shardingItem), null == error ? "" : buildErrorMessage(error));
governanceRepositoryAPI.updateJobItemErrorMessage(jobId, shardingItem, null == error ? "" : buildErrorMessage(error));
}

private String buildErrorMessage(final Object error) {
Expand Down

0 comments on commit fbc262e

Please sign in to comment.