#[non_exhaustive]pub struct SparkBatch {
pub args: Vec<String>,
pub jar_file_uris: Vec<String>,
pub file_uris: Vec<String>,
pub archive_uris: Vec<String>,
pub driver: Option<Driver>,
/* private fields */
}Expand description
A configuration for running an Apache Spark batch workload.
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.args: Vec<String>Optional. The arguments to pass to the driver. Do not include arguments
that can be set as batch properties, such as --conf, since a collision
can occur that causes an incorrect batch submission.
jar_file_uris: Vec<String>Optional. HCFS URIs of jar files to add to the classpath of the Spark driver and tasks.
file_uris: Vec<String>Optional. HCFS URIs of files to be placed in the working directory of each executor.
archive_uris: Vec<String>Optional. HCFS URIs of archives to be extracted into the working directory
of each executor. Supported file types:
.jar, .tar, .tar.gz, .tgz, and .zip.
driver: Option<Driver>The specification of the main method to call to drive the Spark
workload. Specify either the jar file that contains the main class or the
main class name. To pass both a main jar and a main class in that jar, add
the jar to jar_file_uris, and then specify the main class
name in main_class.
Implementations§
Source§impl SparkBatch
impl SparkBatch
pub fn new() -> Self
Sourcepub fn set_jar_file_uris<T, V>(self, v: T) -> Self
pub fn set_jar_file_uris<T, V>(self, v: T) -> Self
Sets the value of jar_file_uris.
Sourcepub fn set_file_uris<T, V>(self, v: T) -> Self
pub fn set_file_uris<T, V>(self, v: T) -> Self
Sets the value of file_uris.
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.
Sourcepub fn set_driver<T: Into<Option<Driver>>>(self, v: T) -> Self
pub fn set_driver<T: Into<Option<Driver>>>(self, v: T) -> Self
Sets the value of driver.
Note that all the setters affecting driver are mutually
exclusive.
Sourcepub fn main_jar_file_uri(&self) -> Option<&String>
pub fn main_jar_file_uri(&self) -> Option<&String>
The value of driver
if it holds a MainJarFileUri, None if the field is not set or
holds a different branch.
Sourcepub fn main_class(&self) -> Option<&String>
pub fn main_class(&self) -> Option<&String>
The value of driver
if it holds a MainClass, None if the field is not set or
holds a different branch.
Sourcepub fn set_main_jar_file_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_main_jar_file_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of driver
to hold a MainJarFileUri.
Note that all the setters affecting driver are
mutually exclusive.
Sourcepub fn set_main_class<T: Into<String>>(self, v: T) -> Self
pub fn set_main_class<T: Into<String>>(self, v: T) -> Self
Sets the value of driver
to hold a MainClass.
Note that all the setters affecting driver are
mutually exclusive.
Trait Implementations§
Source§impl Clone for SparkBatch
impl Clone for SparkBatch
Source§fn clone(&self) -> SparkBatch
fn clone(&self) -> SparkBatch
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more