struct MetadataObjectWriter {
file_encryptor: Option<Arc<FileEncryptor>>,
}
Fields§
§file_encryptor: Option<Arc<FileEncryptor>>
Implementations§
Source§impl MetadataObjectWriter
impl MetadataObjectWriter
fn write_object(object: &impl TSerializable, sink: impl Write) -> Result<()>
Source§impl MetadataObjectWriter
Implementations of MetadataObjectWriter
methods that rely on encryption being enabled
impl MetadataObjectWriter
Implementations of MetadataObjectWriter
methods that rely on encryption being enabled
Sourcefn with_file_encryptor(self, encryptor: Option<Arc<FileEncryptor>>) -> Self
fn with_file_encryptor(self, encryptor: Option<Arc<FileEncryptor>>) -> Self
Set the file encryptor to use
Sourcefn write_file_metadata(
&self,
file_metadata: &FileMetaData,
sink: impl Write,
) -> Result<()>
fn write_file_metadata( &self, file_metadata: &FileMetaData, sink: impl Write, ) -> Result<()>
Write FileMetaData
in Thrift format, possibly encrypting it if required
Sourcefn write_offset_index(
&self,
offset_index: &OffsetIndex,
column_chunk: &ColumnChunk,
row_group_idx: usize,
column_idx: usize,
sink: impl Write,
) -> Result<()>
fn write_offset_index( &self, offset_index: &OffsetIndex, column_chunk: &ColumnChunk, row_group_idx: usize, column_idx: usize, sink: impl Write, ) -> Result<()>
Write a column OffsetIndex
in Thrift format, possibly encrypting it if required
Sourcefn write_column_index(
&self,
column_index: &ColumnIndex,
column_chunk: &ColumnChunk,
row_group_idx: usize,
column_idx: usize,
sink: impl Write,
) -> Result<()>
fn write_column_index( &self, column_index: &ColumnIndex, column_chunk: &ColumnChunk, row_group_idx: usize, column_idx: usize, sink: impl Write, ) -> Result<()>
Write a column ColumnIndex
in Thrift format, possibly encrypting it if required
Sourcefn apply_row_group_encryption(
&self,
row_groups: Vec<RowGroup>,
) -> Result<(Vec<RowGroup>, Option<Vec<RowGroup>>)>
fn apply_row_group_encryption( &self, row_groups: Vec<RowGroup>, ) -> Result<(Vec<RowGroup>, Option<Vec<RowGroup>>)>
If encryption is enabled and configured, encrypt row group metadata. Returns a tuple of the row group metadata to write, and possibly unencrypted metadata to be returned to clients if data was encrypted.
Sourcefn get_file_magic(&self) -> &[u8; 4]
fn get_file_magic(&self) -> &[u8; 4]
Get the “magic” bytes identifying the file type
fn write_object_with_encryption( object: &impl TSerializable, sink: impl Write, file_encryptor: &FileEncryptor, column_metadata: &ColumnChunk, module_type: ModuleType, row_group_index: usize, column_index: usize, ) -> Result<()>
fn file_crypto_metadata( file_encryptor: &FileEncryptor, ) -> Result<FileCryptoMetaData>
fn encrypt_row_groups( row_groups: Vec<RowGroup>, file_encryptor: &Arc<FileEncryptor>, ) -> Result<Vec<RowGroup>>
Sourcefn encrypt_column_chunk(
column_chunk: ColumnChunk,
file_encryptor: &Arc<FileEncryptor>,
row_group_index: usize,
column_index: usize,
) -> Result<ColumnChunk>
fn encrypt_column_chunk( column_chunk: ColumnChunk, file_encryptor: &Arc<FileEncryptor>, row_group_index: usize, column_index: usize, ) -> Result<ColumnChunk>
Apply column encryption to column chunk metadata
Trait Implementations§
Source§impl Debug for MetadataObjectWriter
impl Debug for MetadataObjectWriter
Source§impl Default for MetadataObjectWriter
impl Default for MetadataObjectWriter
Source§fn default() -> MetadataObjectWriter
fn default() -> MetadataObjectWriter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MetadataObjectWriter
impl RefUnwindSafe for MetadataObjectWriter
impl Send for MetadataObjectWriter
impl Sync for MetadataObjectWriter
impl Unpin for MetadataObjectWriter
impl UnwindSafe for MetadataObjectWriter
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 more