github.com/pingcap/tidb-lightning@v5.0.0-rc.0.20210428090220-84b649866577+incompatible/lightning/checkpoints/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 = "checkpoints";
    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  }
    46  
    47  message EngineCheckpointModel {
    48      uint32 status = 1;
    49      // key is "$path:$offset"
    50      map<string, ChunkCheckpointModel> chunks = 2;
    51  }
    52  
    53  message ChunkCheckpointModel {
    54      string path = 1;
    55      int64 offset = 2;
    56      repeated int32 column_permutation = 12;
    57      int64 end_offset = 5;
    58      int64 pos = 6;
    59      int64 prev_rowid_max = 7;
    60      int64 rowid_max = 8;
    61      uint64 kvc_bytes = 9;
    62      uint64 kvc_kvs = 10;
    63      fixed64 kvc_checksum = 11;
    64      sfixed64 timestamp = 13;
    65      int32 type = 14;
    66      int32 compression = 15;
    67      string sort_key = 16;
    68      int64 file_size = 17;
    69  }