/
mod.rs
47 lines (43 loc) · 1.49 KB
/
mod.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright 2018 TiKV Project Authors. Licensed under Apache-2.0.
//! This mod contains components to support rapid data import with the project
//! `tidb-lightning`.
//!
//! It mainly exposes 2 types of services:
//!
//! The `ImportKVService` is used to convert key-value pairs data to TiKV
//! compatible RocksDB SST file format for subsequent ingesting. The conversion
//! is done by writing data to a temporary created RocksDB instance. The service
//! is usually run independently of TiKV.
//!
//! The `ImportSSTService` is used to ingest the generated SST files into TiKV's
//! RocksDB instance. The ingesting process: `tidb-lightning` first uploads SST
//! files to the host where TiKV is located, and then calls the `Ingest` RPC.
//! After `ImportSSTService` receives the RPC, it sends a message to raftstore
//! thread to notify it of the ingesting operation. This service is running
//! inside TiKV because it needs to interact with raftstore.
mod client;
mod common;
mod config;
mod engine;
mod errors;
mod import;
mod metrics;
mod prepare;
mod stream;
#[macro_use]
mod service;
mod import_mode;
mod kv_importer;
mod kv_server;
mod kv_service;
mod speed_limiter;
mod sst_importer;
mod sst_service;
pub mod test_helpers;
pub use self::config::Config;
pub use self::errors::{error_inc, Error, Result};
pub use self::kv_importer::KVImporter;
pub use self::kv_server::ImportKVServer;
pub use self::kv_service::ImportKVService;
pub use self::sst_importer::SSTImporter;
pub use self::sst_service::ImportSSTService;