pub struct RuntimeConf { /* private fields */ }Expand description
Runtime configuration for a Spark session.
Allows getting and setting runtime configuration parameters on the Spark server.
Mirrors pyspark.sql.conf.RuntimeConfig.
Implementations§
Source§impl RuntimeConf
impl RuntimeConf
Sourcepub fn set(&self, key: &str, value: &str) -> Result<()>
pub fn set(&self, key: &str, value: &str) -> Result<()>
Set a configuration key-value pair.
Converts boolean and integer values to strings as required by the server.
§Arguments
key- The configuration key (e.g., “spark.sql.shuffle.partitions”)value- The configuration value as a string, integer, or boolean
§Example
ⓘ
conf.set("spark.sql.shuffle.partitions", "200")?;
conf.set("spark.sql.adaptive.enabled", true)?;
conf.set("spark.sql.maxMetadataStringLength", 100)?;Sourcepub fn get_with_default(
&self,
key: &str,
default: Option<&str>,
) -> Result<Option<String>>
pub fn get_with_default( &self, key: &str, default: Option<&str>, ) -> Result<Option<String>>
Get a configuration value, returning default when the key is unset — instead of
erroring as get does for an unknown key. Uses the server’s GetWithDefault
operation, mirroring RuntimeConfig.get(key, default).
Sourcepub fn is_modifiable(&self, key: &str) -> Result<bool>
pub fn is_modifiable(&self, key: &str) -> Result<bool>
Check if a configuration key is modifiable.
Returns true if the configuration can be changed at runtime,
false if it’s read-only or cannot be modified.
§Arguments
key- The configuration key to check
§Example
ⓘ
if conf.is_modifiable("spark.sql.shuffle.partitions")? {
println!("This config can be modified");
}Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeConf
impl !UnwindSafe for RuntimeConf
impl Freeze for RuntimeConf
impl Send for RuntimeConf
impl Sync for RuntimeConf
impl Unpin for RuntimeConf
impl UnsafeUnpin for RuntimeConf
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request