#[non_exhaustive]pub struct SparkOptions {
pub connection: String,
pub runtime_version: String,
pub container_image: String,
pub properties: HashMap<String, String>,
pub main_file_uri: String,
pub py_file_uris: Vec<String>,
pub jar_uris: Vec<String>,
pub file_uris: Vec<String>,
pub archive_uris: Vec<String>,
pub main_class: String,
/* private fields */
}Expand description
Options for a user-defined Spark routine.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.connection: StringFully qualified name of the user-provided Spark connection object. Format:
"projects/{project_id}/locations/{location_id}/connections/{connection_id}"
runtime_version: StringRuntime version. If not specified, the default runtime version is used.
container_image: StringCustom container image for the runtime environment.
properties: HashMap<String, String>Configuration properties as a set of key/value pairs, which will be passed on to the Spark application. For more information, see Apache Spark and the procedure option list.
main_file_uri: StringThe main file/jar URI of the Spark application. Exactly one of the definition_body field and the main_file_uri field must be set for Python. Exactly one of main_class and main_file_uri field should be set for Java/Scala language type.
py_file_uris: Vec<String>Python files to be placed on the PYTHONPATH for PySpark application.
Supported file types: .py, .egg, and .zip. For more information
about Apache Spark, see
Apache Spark.
jar_uris: Vec<String>JARs to include on the driver and executor CLASSPATH. For more information about Apache Spark, see Apache Spark.
file_uris: Vec<String>Files to be placed in the working directory of each executor. For more information about Apache Spark, see Apache Spark.
archive_uris: Vec<String>Archive files to be extracted into the working directory of each executor. For more information about Apache Spark, see Apache Spark.
main_class: StringThe fully qualified name of a class in jar_uris, for example, com.example.wordcount. Exactly one of main_class and main_jar_uri field should be set for Java/Scala language type.
Implementations§
Source§impl SparkOptions
impl SparkOptions
Sourcepub fn set_connection<T: Into<String>>(self, v: T) -> Self
pub fn set_connection<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_runtime_version<T: Into<String>>(self, v: T) -> Self
pub fn set_runtime_version<T: Into<String>>(self, v: T) -> Self
Sets the value of runtime_version.
§Example
let x = SparkOptions::new().set_runtime_version("example");Sourcepub fn set_container_image<T: Into<String>>(self, v: T) -> Self
pub fn set_container_image<T: Into<String>>(self, v: T) -> Self
Sets the value of container_image.
§Example
let x = SparkOptions::new().set_container_image("example");Sourcepub fn set_properties<T, K, V>(self, v: T) -> Self
pub fn set_properties<T, K, V>(self, v: T) -> Self
Sets the value of properties.
§Example
let x = SparkOptions::new().set_properties([
("key0", "abc"),
("key1", "xyz"),
]);Sourcepub fn set_main_file_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_main_file_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of main_file_uri.
§Example
let x = SparkOptions::new().set_main_file_uri("example");Sourcepub fn set_py_file_uris<T, V>(self, v: T) -> Self
pub fn set_py_file_uris<T, V>(self, v: T) -> Self
Sets the value of py_file_uris.
§Example
let x = SparkOptions::new().set_py_file_uris(["a", "b", "c"]);Sourcepub fn set_jar_uris<T, V>(self, v: T) -> Self
pub fn set_jar_uris<T, V>(self, v: T) -> Self
Sourcepub fn set_file_uris<T, V>(self, v: T) -> Self
pub fn set_file_uris<T, V>(self, v: T) -> Self
Sourcepub fn set_archive_uris<T, V>(self, v: T) -> Self
pub fn set_archive_uris<T, V>(self, v: T) -> Self
Sets the value of archive_uris.
§Example
let x = SparkOptions::new().set_archive_uris(["a", "b", "c"]);Sourcepub fn set_main_class<T: Into<String>>(self, v: T) -> Self
pub fn set_main_class<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for SparkOptions
impl Clone for SparkOptions
Source§fn clone(&self) -> SparkOptions
fn clone(&self) -> SparkOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SparkOptions
impl Debug for SparkOptions
Source§impl Default for SparkOptions
impl Default for SparkOptions
Source§fn default() -> SparkOptions
fn default() -> SparkOptions
Source§impl Message for SparkOptions
impl Message for SparkOptions
Source§impl PartialEq for SparkOptions
impl PartialEq for SparkOptions
impl StructuralPartialEq for SparkOptions
Auto Trait Implementations§
impl Freeze for SparkOptions
impl RefUnwindSafe for SparkOptions
impl Send for SparkOptions
impl Sync for SparkOptions
impl Unpin for SparkOptions
impl UnsafeUnpin for SparkOptions
impl UnwindSafe for SparkOptions
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
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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>
T in a tonic::Request