#[non_exhaustive]pub struct PigJob {
pub continue_on_failure: bool,
pub script_variables: HashMap<String, String>,
pub properties: HashMap<String, String>,
pub jar_file_uris: Vec<String>,
pub logging_config: Option<LoggingConfig>,
pub queries: Option<Queries>,
/* private fields */
}Expand description
A Dataproc job for running Apache Pig queries on YARN.
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.continue_on_failure: boolOptional. Whether to continue executing queries if a query fails.
The default value is false. Setting to true can be useful when
executing independent parallel queries.
script_variables: HashMap<String, String>Optional. Mapping of query variable names to values (equivalent to the Pig
command: name=[value]).
properties: HashMap<String, String>Optional. A mapping of property names to values, used to configure Pig.
Properties that conflict with values set by the Dataproc API might be
overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
/etc/pig/conf/pig.properties, and classes in user code.
jar_file_uris: Vec<String>Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
logging_config: Option<LoggingConfig>Optional. The runtime log config for job execution.
queries: Option<Queries>Required. The sequence of Pig queries to execute, specified as an HCFS file URI or a list of queries.
Implementations§
Source§impl PigJob
impl PigJob
Sourcepub fn set_continue_on_failure<T: Into<bool>>(self, v: T) -> Self
pub fn set_continue_on_failure<T: Into<bool>>(self, v: T) -> Self
Sets the value of continue_on_failure.
§Example
let x = PigJob::new().set_continue_on_failure(true);Sourcepub fn set_script_variables<T, K, V>(self, v: T) -> Self
pub fn set_script_variables<T, K, V>(self, v: T) -> Self
Sets the value of script_variables.
§Example
let x = PigJob::new().set_script_variables([
("key0", "abc"),
("key1", "xyz"),
]);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 = PigJob::new().set_properties([
("key0", "abc"),
("key1", "xyz"),
]);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.
§Example
let x = PigJob::new().set_jar_file_uris(["a", "b", "c"]);Sourcepub fn set_logging_config<T>(self, v: T) -> Selfwhere
T: Into<LoggingConfig>,
pub fn set_logging_config<T>(self, v: T) -> Selfwhere
T: Into<LoggingConfig>,
Sets the value of logging_config.
§Example
use google_cloud_dataproc_v1::model::LoggingConfig;
let x = PigJob::new().set_logging_config(LoggingConfig::default()/* use setters */);Sourcepub fn set_or_clear_logging_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<LoggingConfig>,
pub fn set_or_clear_logging_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<LoggingConfig>,
Sets or clears the value of logging_config.
§Example
use google_cloud_dataproc_v1::model::LoggingConfig;
let x = PigJob::new().set_or_clear_logging_config(Some(LoggingConfig::default()/* use setters */));
let x = PigJob::new().set_or_clear_logging_config(None::<LoggingConfig>);Sourcepub fn set_queries<T: Into<Option<Queries>>>(self, v: T) -> Self
pub fn set_queries<T: Into<Option<Queries>>>(self, v: T) -> Self
Sourcepub fn query_file_uri(&self) -> Option<&String>
pub fn query_file_uri(&self) -> Option<&String>
The value of queries
if it holds a QueryFileUri, None if the field is not set or
holds a different branch.
Sourcepub fn set_query_file_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_query_file_uri<T: Into<String>>(self, v: T) -> Self
Sourcepub fn query_list(&self) -> Option<&Box<QueryList>>
pub fn query_list(&self) -> Option<&Box<QueryList>>
The value of queries
if it holds a QueryList, None if the field is not set or
holds a different branch.
Sourcepub fn set_query_list<T: Into<Box<QueryList>>>(self, v: T) -> Self
pub fn set_query_list<T: Into<Box<QueryList>>>(self, v: T) -> Self
Sets the value of queries
to hold a QueryList.
Note that all the setters affecting queries are
mutually exclusive.
§Example
use google_cloud_dataproc_v1::model::QueryList;
let x = PigJob::new().set_query_list(QueryList::default()/* use setters */);
assert!(x.query_list().is_some());
assert!(x.query_file_uri().is_none());