pub struct FlussAdmin { /* private fields */ }Implementations§
Source§impl FlussAdmin
impl FlussAdmin
pub fn new(connections: Arc<RpcClient>, metadata: Arc<Metadata>) -> Self
pub async fn create_database( &self, database_name: &str, database_descriptor: Option<&DatabaseDescriptor>, ignore_if_exists: bool, ) -> Result<()>
pub async fn create_table( &self, table_path: &TablePath, table_descriptor: &TableDescriptor, ignore_if_exists: bool, ) -> Result<()>
pub async fn drop_table( &self, table_path: &TablePath, ignore_if_not_exists: bool, ) -> Result<()>
pub async fn get_table_info(&self, table_path: &TablePath) -> Result<TableInfo>
Sourcepub async fn list_tables(&self, database_name: &str) -> Result<Vec<String>>
pub async fn list_tables(&self, database_name: &str) -> Result<Vec<String>>
List all tables in the given database
Sourcepub async fn list_partition_infos(
&self,
table_path: &TablePath,
) -> Result<Vec<PartitionInfo>>
pub async fn list_partition_infos( &self, table_path: &TablePath, ) -> Result<Vec<PartitionInfo>>
List all partitions in the given table.
Sourcepub async fn list_partition_infos_with_spec(
&self,
table_path: &TablePath,
partial_partition_spec: Option<&PartitionSpec>,
) -> Result<Vec<PartitionInfo>>
pub async fn list_partition_infos_with_spec( &self, table_path: &TablePath, partial_partition_spec: Option<&PartitionSpec>, ) -> Result<Vec<PartitionInfo>>
List partitions in the given table that match the partial partition spec.
Sourcepub async fn create_partition(
&self,
table_path: &TablePath,
partition_spec: &PartitionSpec,
ignore_if_exists: bool,
) -> Result<()>
pub async fn create_partition( &self, table_path: &TablePath, partition_spec: &PartitionSpec, ignore_if_exists: bool, ) -> Result<()>
Create a new partition for a partitioned table.
Sourcepub async fn drop_partition(
&self,
table_path: &TablePath,
partition_spec: &PartitionSpec,
ignore_if_not_exists: bool,
) -> Result<()>
pub async fn drop_partition( &self, table_path: &TablePath, partition_spec: &PartitionSpec, ignore_if_not_exists: bool, ) -> Result<()>
Drop a partition from a partitioned table.
Sourcepub async fn table_exists(&self, table_path: &TablePath) -> Result<bool>
pub async fn table_exists(&self, table_path: &TablePath) -> Result<bool>
Check if a table exists
Sourcepub async fn drop_database(
&self,
database_name: &str,
ignore_if_not_exists: bool,
cascade: bool,
) -> Result<()>
pub async fn drop_database( &self, database_name: &str, ignore_if_not_exists: bool, cascade: bool, ) -> Result<()>
Drop a database
Sourcepub async fn list_databases(&self) -> Result<Vec<String>>
pub async fn list_databases(&self) -> Result<Vec<String>>
List all databases
Sourcepub async fn database_exists(&self, database_name: &str) -> Result<bool>
pub async fn database_exists(&self, database_name: &str) -> Result<bool>
Check if a database exists
Sourcepub async fn get_database_info(
&self,
database_name: &str,
) -> Result<DatabaseInfo>
pub async fn get_database_info( &self, database_name: &str, ) -> Result<DatabaseInfo>
Get database information
Sourcepub async fn get_server_nodes(&self) -> Result<Vec<ServerNode>>
pub async fn get_server_nodes(&self) -> Result<Vec<ServerNode>>
Get all alive server nodes in the cluster, including the coordinator and all tablet servers. Refreshes cluster metadata before returning.
Sourcepub async fn get_latest_lake_snapshot(
&self,
table_path: &TablePath,
) -> Result<LakeSnapshot>
pub async fn get_latest_lake_snapshot( &self, table_path: &TablePath, ) -> Result<LakeSnapshot>
Get the latest lake snapshot for a table
Sourcepub async fn list_offsets(
&self,
table_path: &TablePath,
buckets_id: &[BucketId],
offset_spec: OffsetSpec,
) -> Result<HashMap<i32, i64>>
pub async fn list_offsets( &self, table_path: &TablePath, buckets_id: &[BucketId], offset_spec: OffsetSpec, ) -> Result<HashMap<i32, i64>>
List offset for the specified buckets. This operation enables to find the beginning offset, end offset as well as the offset matching a timestamp in buckets.
Sourcepub async fn list_partition_offsets(
&self,
table_path: &TablePath,
partition_name: &str,
buckets_id: &[BucketId],
offset_spec: OffsetSpec,
) -> Result<HashMap<i32, i64>>
pub async fn list_partition_offsets( &self, table_path: &TablePath, partition_name: &str, buckets_id: &[BucketId], offset_spec: OffsetSpec, ) -> Result<HashMap<i32, i64>>
List offset for the specified buckets in a partition. This operation enables to find the beginning offset, end offset as well as the offset matching a timestamp in buckets.
Auto Trait Implementations§
impl Freeze for FlussAdmin
impl !RefUnwindSafe for FlussAdmin
impl Send for FlussAdmin
impl Sync for FlussAdmin
impl Unpin for FlussAdmin
impl UnsafeUnpin for FlussAdmin
impl !UnwindSafe for FlussAdmin
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.