Struct tikv::import::sst_service::ImportSSTService [−][src]
ImportSSTService provides tikv-server with the ability to ingest SST files.
It saves the SST sent from client to a file and then sends a command to raftstore to trigger the ingest process.
Fields
cfg: Config
engine: E
router: Router
threads: ThreadPool
importer: Arc<SSTImporter>
limiter: Limiter
task_slots: Arc<Mutex<HashSet<PathBuf>>>
Implementations
impl<E, Router> ImportSSTService<E, Router> where
E: KvEngine,
Router: 'static + RaftStoreRouter<E>,
[src]
E: KvEngine,
Router: 'static + RaftStoreRouter<E>,
pub fn new(
cfg: Config,
router: Router,
engine: E,
importer: Arc<SSTImporter>
) -> ImportSSTService<E, Router>
[src]
cfg: Config,
router: Router,
engine: E,
importer: Arc<SSTImporter>
) -> ImportSSTService<E, Router>
fn acquire_lock(
task_slots: &Arc<Mutex<HashSet<PathBuf>>>,
meta: &SstMeta
) -> Result<bool>
[src]
task_slots: &Arc<Mutex<HashSet<PathBuf>>>,
meta: &SstMeta
) -> Result<bool>
fn release_lock(
task_slots: &Arc<Mutex<HashSet<PathBuf>>>,
meta: &SstMeta
) -> Result<bool>
[src]
task_slots: &Arc<Mutex<HashSet<PathBuf>>>,
meta: &SstMeta
) -> Result<bool>
fn check_write_stall(&self) -> Option<Error>
[src]
fn ingest_files(
&self,
context: Context,
label: &'static str,
ssts: Vec<SstMeta>
) -> impl Future<Output = Result<IngestResponse>>
[src]
&self,
context: Context,
label: &'static str,
ssts: Vec<SstMeta>
) -> impl Future<Output = Result<IngestResponse>>
Trait Implementations
impl<E: Clone, Router: Clone> Clone for ImportSSTService<E, Router> where
E: KvEngine,
[src]
E: KvEngine,
fn clone(&self) -> ImportSSTService<E, Router>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<E, Router> ImportSst for ImportSSTService<E, Router> where
E: KvEngine,
Router: 'static + RaftStoreRouter<E>,
[src]
E: KvEngine,
Router: 'static + RaftStoreRouter<E>,
fn switch_mode(
&mut self,
ctx: RpcContext<'_>,
req: SwitchModeRequest,
sink: UnarySink<SwitchModeResponse>
)
[src]
&mut self,
ctx: RpcContext<'_>,
req: SwitchModeRequest,
sink: UnarySink<SwitchModeResponse>
)
fn upload(
&mut self,
_ctx: RpcContext<'_>,
stream: RequestStream<UploadRequest>,
sink: ClientStreamingSink<UploadResponse>
)
[src]
&mut self,
_ctx: RpcContext<'_>,
stream: RequestStream<UploadRequest>,
sink: ClientStreamingSink<UploadResponse>
)
Receive SST from client and save the file for later ingesting.
fn download(
&mut self,
_ctx: RpcContext<'_>,
req: DownloadRequest,
sink: UnarySink<DownloadResponse>
)
[src]
&mut self,
_ctx: RpcContext<'_>,
req: DownloadRequest,
sink: UnarySink<DownloadResponse>
)
Downloads the file and performs key-rewrite for later ingesting.
fn ingest(
&mut self,
ctx: RpcContext<'_>,
req: IngestRequest,
sink: UnarySink<IngestResponse>
)
[src]
&mut self,
ctx: RpcContext<'_>,
req: IngestRequest,
sink: UnarySink<IngestResponse>
)
Ingest the file by sending a raft command to raftstore.
If the ingestion fails because the region is not found or the epoch does not match, the remaining files will eventually be cleaned up by CleanupSSTWorker.
fn multi_ingest(
&mut self,
ctx: RpcContext<'_>,
req: MultiIngestRequest,
sink: UnarySink<IngestResponse>
)
[src]
&mut self,
ctx: RpcContext<'_>,
req: MultiIngestRequest,
sink: UnarySink<IngestResponse>
)
Ingest multiple files by sending a raft command to raftstore.
fn compact(
&mut self,
_ctx: RpcContext<'_>,
req: CompactRequest,
sink: UnarySink<CompactResponse>
)
[src]
&mut self,
_ctx: RpcContext<'_>,
req: CompactRequest,
sink: UnarySink<CompactResponse>
)
fn set_download_speed_limit(
&mut self,
ctx: RpcContext<'_>,
req: SetDownloadSpeedLimitRequest,
sink: UnarySink<SetDownloadSpeedLimitResponse>
)
[src]
&mut self,
ctx: RpcContext<'_>,
req: SetDownloadSpeedLimitRequest,
sink: UnarySink<SetDownloadSpeedLimitResponse>
)
fn write(
&mut self,
_ctx: RpcContext<'_>,
stream: RequestStream<WriteRequest>,
sink: ClientStreamingSink<WriteResponse>
)
[src]
&mut self,
_ctx: RpcContext<'_>,
stream: RequestStream<WriteRequest>,
sink: ClientStreamingSink<WriteResponse>
)
Auto Trait Implementations
impl<E, Router> !RefUnwindSafe for ImportSSTService<E, Router>
impl<E, Router> Send for ImportSSTService<E, Router> where
Router: Send,
Router: Send,
impl<E, Router> Sync for ImportSSTService<E, Router> where
Router: Sync,
Router: Sync,
impl<E, Router> Unpin for ImportSSTService<E, Router> where
Router: Unpin,
Router: Unpin,
impl<E, Router> !UnwindSafe for ImportSSTService<E, Router>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<V, W> ConvertFrom<W> for V where
W: ConvertTo<V>,
[src]
W: ConvertTo<V>,
pub fn convert_from(ctx: &mut EvalContext, from: W) -> Result<V, Error>
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,