cherry pick from #50850, #50337 --------- Co-authored-by: Uniqueyou <wangyixuan@selectdb.com>
This commit is contained in:
@ -183,6 +183,22 @@ public class RollupJobV2 extends AlterJobV2 implements GsonPostProcessable {
|
||||
this.storageFormat = storageFormat;
|
||||
}
|
||||
|
||||
public long getRollupIndexId() {
|
||||
return rollupIndexId;
|
||||
}
|
||||
|
||||
public String getRollupIndexName() {
|
||||
return rollupIndexName;
|
||||
}
|
||||
|
||||
public long getBaseIndexId() {
|
||||
return baseIndexId;
|
||||
}
|
||||
|
||||
public String getBaseIndexName() {
|
||||
return baseIndexName;
|
||||
}
|
||||
|
||||
private void initAnalyzer() throws AnalysisException {
|
||||
ConnectContext connectContext = new ConnectContext();
|
||||
Database db;
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
package org.apache.doris.binlog;
|
||||
|
||||
import org.apache.doris.alter.AlterJobV2;
|
||||
import org.apache.doris.alter.RollupJobV2;
|
||||
import org.apache.doris.alter.SchemaChangeJobV2;
|
||||
import org.apache.doris.persist.gson.GsonUtils;
|
||||
|
||||
@ -42,8 +43,18 @@ public class AlterJobRecord {
|
||||
private AlterJobV2.JobState jobState;
|
||||
@SerializedName(value = "rawSql")
|
||||
private String rawSql;
|
||||
// for schema change
|
||||
@SerializedName(value = "iim")
|
||||
private Map<Long, Long> indexIdMap;
|
||||
// for rollup
|
||||
@SerializedName(value = "rollupIndexId")
|
||||
private long rollupIndexId;
|
||||
@SerializedName(value = "rollUpIndexName")
|
||||
private String rollUpIndexName;
|
||||
@SerializedName(value = "baseIndexId")
|
||||
private long baseIndexId;
|
||||
@SerializedName(value = "baseIndexName")
|
||||
private String baseIndexName;
|
||||
|
||||
public AlterJobRecord(AlterJobV2 job) {
|
||||
this.type = job.getType();
|
||||
@ -55,6 +66,12 @@ public class AlterJobRecord {
|
||||
this.rawSql = job.getRawSql();
|
||||
if (type == AlterJobV2.JobType.SCHEMA_CHANGE && job instanceof SchemaChangeJobV2) {
|
||||
this.indexIdMap = ((SchemaChangeJobV2) job).getIndexIdMap();
|
||||
} else if (type == AlterJobV2.JobType.ROLLUP && job instanceof RollupJobV2) {
|
||||
RollupJobV2 rollupJob = (RollupJobV2) job;
|
||||
this.rollupIndexId = rollupJob.getRollupIndexId();
|
||||
this.rollUpIndexName = rollupJob.getRollupIndexName();
|
||||
this.baseIndexId = rollupJob.getBaseIndexId();
|
||||
this.baseIndexName = rollupJob.getBaseIndexName();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user