feat(configuration): 补充去重条件

This commit is contained in:
2024-01-24 18:22:38 +08:00
parent f4f713130a
commit dfb4221bdd
2 changed files with 45 additions and 3 deletions

View File

@@ -34,11 +34,29 @@ public class JobIdAndAlias {
this.alias = alias;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
JobIdAndAlias that = (JobIdAndAlias) o;
if (!id.equals(that.id)) return false;
return alias.equals(that.alias);
}
@Override
public int hashCode() {
int result = id.hashCode();
result = 31 * result + alias.hashCode();
return result;
}
@Override
public String toString() {
return "JobIdAndAlias{" +
"id=" + id +
", alias='" + alias + '\'' +
'}';
"id=" + id +
", alias='" + alias + '\'' +
'}';
}
}

View File

@@ -64,6 +64,30 @@ public class TableInfoSearchCache {
this.topic = topic;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TableInfoSearchCache that = (TableInfoSearchCache) o;
if (!flinkJobId.equals(that.flinkJobId)) return false;
if (!alias.equals(that.alias)) return false;
if (!hdfs.equals(that.hdfs)) return false;
if (!pulsar.equals(that.pulsar)) return false;
return topic.equals(that.topic);
}
@Override
public int hashCode() {
int result = flinkJobId.hashCode();
result = 31 * result + alias.hashCode();
result = 31 * result + hdfs.hashCode();
result = 31 * result + pulsar.hashCode();
result = 31 * result + topic.hashCode();
return result;
}
@Override
public String toString() {
return "TableInfoSearchCache{" +