Struct rerun_bindings::remote::PyStorageNodeClient
source · pub struct PyStorageNodeClient {
runtime: Runtime,
client: StorageNodeClient<Channel>,
}
Expand description
A connection to a remote storage node.
Fields§
§runtime: Runtime
A tokio runtime for async operations. This connection will currently block the Python interpreter while waiting for responses. This runtime must be persisted for the lifetime of the connection.
client: StorageNodeClient<Channel>
The actual tonic connection.
Implementations§
source§impl PyStorageNodeClient
impl PyStorageNodeClient
sourcefn get_store_info(&mut self, id: &str) -> PyResult<StoreInfo>
fn get_store_info(&mut self, id: &str) -> PyResult<StoreInfo>
Get the StoreInfo
for a single recording in the storage node.
sourcepub(crate) fn exec_query(
&mut self,
id: StoreId,
query: QueryExpression,
) -> PyResult<PyArrowType<Box<dyn RecordBatchReader + Send>>>
pub(crate) fn exec_query( &mut self, id: StoreId, query: QueryExpression, ) -> PyResult<PyArrowType<Box<dyn RecordBatchReader + Send>>>
Execute a QueryExpression
for a single recording in the storage node.
source§impl PyStorageNodeClient
impl PyStorageNodeClient
sourcefn query_catalog(
&mut self,
columns: Option<Vec<String>>,
recording_ids: Option<Vec<String>>,
) -> PyResult<PyArrowType<Box<dyn RecordBatchReader + Send>>>
fn query_catalog( &mut self, columns: Option<Vec<String>>, recording_ids: Option<Vec<String>>, ) -> PyResult<PyArrowType<Box<dyn RecordBatchReader + Send>>>
sourcefn get_recording_schema(&mut self, id: String) -> PyResult<PySchema>
fn get_recording_schema(&mut self, id: String) -> PyResult<PySchema>
sourcefn register(
&mut self,
storage_url: &str,
metadata: Option<MetadataLike>,
) -> PyResult<String>
fn register( &mut self, storage_url: &str, metadata: Option<MetadataLike>, ) -> PyResult<String>
Register a recording along with some metadata.
§Parameters
storage_url : str The URL to the storage location. metadata : Optional[Table | RecordBatch] A pyarrow Table or RecordBatch containing the metadata to update. This Table must contain only a single row.
sourcefn create_vector_index(
&mut self,
entry: String,
column: PyComponentColumnSelector,
time_index: PyIndexColumnSelector,
num_partitions: u32,
num_sub_vectors: u32,
distance_metric: VectorDistanceMetricLike,
) -> PyResult<()>
fn create_vector_index( &mut self, entry: String, column: PyComponentColumnSelector, time_index: PyIndexColumnSelector, num_partitions: u32, num_sub_vectors: u32, distance_metric: VectorDistanceMetricLike, ) -> PyResult<()>
Create a vector index.
§Parameters
entry : str The name of the catalog entry to index. column : ComponentColumnSelector The component column to index. time_index : IndexColumnSelector The index column to use for the time index. num_partitions : int The number of partitions for the index. num_sub_vectors : int The number of sub-vectors for the index. distance_metric : VectorDistanceMetric The distance metric to use for the index.
sourcefn create_fts_index(
&mut self,
entry: String,
column: PyComponentColumnSelector,
time_index: PyIndexColumnSelector,
store_position: bool,
base_tokenizer: &str,
) -> PyResult<()>
fn create_fts_index( &mut self, entry: String, column: PyComponentColumnSelector, time_index: PyIndexColumnSelector, store_position: bool, base_tokenizer: &str, ) -> PyResult<()>
Create a full-text-search index.
§Parameters
entry : str The name of the catalog entry to index. column : ComponentColumnSelector The component column to index. time_index : IndexColumnSelector The index column to use for the time index. store_position : bool Whether to store the position of the token in the document. base_tokenizer : str The base tokenizer to use.
sourcefn search_vector_index(
&mut self,
entry: String,
query: VectorLike<'_>,
column: PyComponentColumnSelector,
top_k: u32,
) -> PyResult<PyArrowType<Box<dyn RecordBatchReader + Send>>>
fn search_vector_index( &mut self, entry: String, query: VectorLike<'_>, column: PyComponentColumnSelector, top_k: u32, ) -> PyResult<PyArrowType<Box<dyn RecordBatchReader + Send>>>
Search over a vector index.
§Parameters
entry : str The name of the catalog entry to search. query : VectorLike The input to search for. column : ComponentColumnSelector The component column to search over. top_k : int The number of results to return.
§Returns
pa.RecordBatchReader The results of the query.
sourcefn search_fts_index(
&mut self,
entry: String,
query: String,
column: PyComponentColumnSelector,
limit: Option<u32>,
) -> PyResult<PyArrowType<Box<dyn RecordBatchReader + Send>>>
fn search_fts_index( &mut self, entry: String, query: String, column: PyComponentColumnSelector, limit: Option<u32>, ) -> PyResult<PyArrowType<Box<dyn RecordBatchReader + Send>>>
Search over a full-text-search index.
§Parameters
entry : str The name of the catalog entry to search. query : str The input to search for. column : ComponentColumnSelector The component column to search over. limit : Optional[int] The maximum number of results to return.
§Returns
pa.RecordBatchReader The results of the query.
sourcefn update_catalog(&mut self, metadata: MetadataLike) -> PyResult<()>
fn update_catalog(&mut self, metadata: MetadataLike) -> PyResult<()>
Update the catalog metadata for one or more recordings.
The updates are provided as a pyarrow Table or RecordBatch containing the metadata to update. The Table must contain an ‘id’ column, which is used to specify the recording to update for each row.
§Parameters
metadata : Table | RecordBatch A pyarrow Table or RecordBatch containing the metadata to update.
sourcefn open_recording(slf: Bound<'_, Self>, id: &str) -> PyResult<PyRemoteRecording>
fn open_recording(slf: Bound<'_, Self>, id: &str) -> PyResult<PyRemoteRecording>
Open a [Recording
][rerun.dataframe.Recording] by id to use with the dataframe APIs.
This will run queries against the remote storage node and stream the results. Faster for small numbers of queries with small results.
§Parameters
id : str The id of the recording to open.
§Returns
Recording The opened recording.
sourcefn download_recording(&mut self, id: &str) -> PyResult<PyRecording>
fn download_recording(&mut self, id: &str) -> PyResult<PyRecording>
Trait Implementations§
source§impl IntoPy<Py<PyAny>> for PyStorageNodeClient
impl IntoPy<Py<PyAny>> for PyStorageNodeClient
source§impl PyClass for PyStorageNodeClient
impl PyClass for PyStorageNodeClient
source§impl PyClassImpl for PyStorageNodeClient
impl PyClassImpl for PyStorageNodeClient
source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
§type ThreadChecker = SendablePyClass<PyStorageNodeClient>
type ThreadChecker = SendablePyClass<PyStorageNodeClient>
§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyStorageNodeClient
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyStorageNodeClient
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut PyStorageNodeClient
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut PyStorageNodeClient
source§impl PyMethods<PyStorageNodeClient> for PyClassImplCollector<PyStorageNodeClient>
impl PyMethods<PyStorageNodeClient> for PyClassImplCollector<PyStorageNodeClient>
fn py_methods(self) -> &'static PyClassItems
source§impl PyTypeInfo for PyStorageNodeClient
impl PyTypeInfo for PyStorageNodeClient
source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
object
is an instance of this type or a subclass of this type.§fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
object
is an instance of this type.impl DerefToPyAny for PyStorageNodeClient
Auto Trait Implementations§
impl !Freeze for PyStorageNodeClient
impl !RefUnwindSafe for PyStorageNodeClient
impl Send for PyStorageNodeClient
impl Sync for PyStorageNodeClient
impl Unpin for PyStorageNodeClient
impl !UnwindSafe for PyStorageNodeClient
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> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§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 more§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 more§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
§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
§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.§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.§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.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
§impl<T> Tap for T
impl<T> Tap for T
§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 more§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 more§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 more§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 more§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 more§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 more§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.§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.§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.§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.§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.§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.§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.