github.com/pingcap/br@v5.3.0-alpha.0.20220125034240-ec59c7b6ce30+incompatible/pkg/lightning/checkpoints/checkpointspb/file_checkpoints.proto (about)

     1  // Copyright 2019 PingCAP, Inc.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // See the License for the specific language governing permissions and
    12  // limitations under the License.
    13  
    14  syntax = "proto3";
    15  
    16  import "github.com/gogo/protobuf/gogoproto/gogo.proto";
    17  
    18  option go_package = "checkpointspb";
    19  option (gogoproto.goproto_getters_all) = false;
    20  
    21  message CheckpointsModel {
    22      // key is table_name
    23      map<string, TableCheckpointModel> checkpoints = 1;
    24      TaskCheckpointModel task_checkpoint = 2;
    25  }
    26  
    27  message TaskCheckpointModel {
    28      int64 task_id = 1;
    29      string source_dir = 2;
    30      string backend = 3;
    31      string importer_addr = 4;
    32      string tidb_host = 5;
    33      int32 tidb_port = 6;
    34      string pd_addr = 7;
    35      string sorted_kv_dir = 8;
    36      string lightning_ver = 9;
    37  }
    38  
    39  message TableCheckpointModel {
    40      bytes hash = 1;
    41      uint32 status = 3;
    42      int64 alloc_base = 4;
    43      map<sint32, EngineCheckpointModel> engines = 8;
    44      int64 tableID = 9;
    45      uint64 kv_bytes = 10;
    46      uint64 kv_kvs = 11;
    47      fixed64 kv_checksum = 12;
    48  }
    49  
    50  message EngineCheckpointModel {
    51      uint32 status = 1;
    52      // key is "$path:$offset"
    53      map<string, ChunkCheckpointModel> chunks = 2;
    54  }
    55  
    56  message ChunkCheckpointModel {
    57      string path = 1;
    58      int64 offset = 2;
    59      repeated int32 column_permutation = 12;
    60      int64 end_offset = 5;
    61      int64 pos = 6;
    62      int64 prev_rowid_max = 7;
    63      int64 rowid_max = 8;
    64      uint64 kvc_bytes = 9;
    65      uint64 kvc_kvs = 10;
    66      fixed64 kvc_checksum = 11;
    67      sfixed64 timestamp = 13;
    68      int32 type = 14;
    69      int32 compression = 15;
    70      string sort_key = 16;
    71      int64 file_size = 17;
    72  }