Skip to content

Commit

Permalink
[enhancement](backup) Add build version in backup snapshot info apach…
Browse files Browse the repository at this point in the history
  • Loading branch information
xy720 authored and caiconghui1 committed Feb 22, 2024
1 parent 596534f commit 3cf6b73
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.apache.doris.catalog.Tablet;
import org.apache.doris.catalog.View;
import org.apache.doris.common.FeConstants;
import org.apache.doris.common.Version;
import org.apache.doris.common.io.Text;
import org.apache.doris.common.io.Writable;
import org.apache.doris.persist.gson.GsonUtils;
Expand Down Expand Up @@ -92,6 +93,12 @@ public class BackupJobInfo implements Writable {

@SerializedName("meta_version")
public int metaVersion;
@SerializedName("major_version")
public int majorVersion;
@SerializedName("minor_version")
public int minorVersion;
@SerializedName("patch_version")
public int patchVersion;

@SerializedName("tablet_be_map")
public Map<Long, Long> tabletBeMap = Maps.newHashMap();
Expand Down Expand Up @@ -587,6 +594,9 @@ public static BackupJobInfo fromCatalog(long backupTime, String label, String db
jobInfo.dbId = dbId;
jobInfo.metaVersion = FeConstants.meta_version;
jobInfo.content = content;
jobInfo.majorVersion = Version.DORIS_BUILD_VERSION_MAJOR;
jobInfo.minorVersion = Version.DORIS_BUILD_VERSION_MINOR;
jobInfo.patchVersion = Version.DORIS_BUILD_VERSION_PATCH;
jobInfo.tableCommitSeqMap = tableCommitSeqMap;

Collection<Table> tbls = backupMeta.getTables().values();
Expand Down

0 comments on commit 3cf6b73

Please sign in to comment.