fix(yarn-query): 修复 cache key 语法错误

This commit is contained in:
2023-06-02 17:32:48 +08:00
parent 7793deac4b
commit ca30543132

View File

@@ -40,7 +40,7 @@ public class JobServiceImpl implements JobService {
this.mapper = builder.build(); this.mapper = builder.build();
} }
@Cacheable(value = "job-list", sync = true, key = "#cluster") @Cacheable(value = "job-list", sync = true)
@Retryable(Throwable.class) @Retryable(Throwable.class)
@Override @Override
public ImmutableList<YarnApplication> list(String cluster) throws JsonProcessingException { public ImmutableList<YarnApplication> list(String cluster) throws JsonProcessingException {
@@ -50,14 +50,14 @@ public class JobServiceImpl implements JobService {
} }
} }
@Cacheable(value = "job-list", sync = true, key = "#{methodName+cluster+name}") @Cacheable(value = "job-list", sync = true, key = "#methodName+#cluster+#name")
@Retryable(Throwable.class) @Retryable(Throwable.class)
@Override @Override
public ImmutableList<YarnApplication> listEquals(String cluster, String name) throws JsonProcessingException { public ImmutableList<YarnApplication> listEquals(String cluster, String name) throws JsonProcessingException {
return list(cluster).select(app -> StrUtil.equals(app.getName(), name)); return list(cluster).select(app -> StrUtil.equals(app.getName(), name));
} }
@Cacheable(value = "job-list", sync = true, key = "#{methodName+cluster+name}") @Cacheable(value = "job-list", sync = true, key = "#methodName+#cluster+#name")
@Retryable(Throwable.class) @Retryable(Throwable.class)
@Override @Override
public ImmutableList<YarnApplication> listLike(String cluster, String name) throws JsonProcessingException { public ImmutableList<YarnApplication> listLike(String cluster, String name) throws JsonProcessingException {