Trait rlink::core::env::StreamApp [−][src]
pub trait StreamApp: Send + Sync + Clone { fn prepare_properties(&self, properties: &mut Properties); fn build_stream(
&self,
properties: &Properties,
env: &mut StreamExecutionEnvironment
); fn pre_worker_startup(&self, _cluster_descriptor: &ClusterDescriptor) { ... } }
Expand description
define a stream application
Required methods
fn prepare_properties(&self, properties: &mut Properties)
fn prepare_properties(&self, properties: &mut Properties)
prepare job properties,
only invoke once on the Coordinator
,
All initialization operations should be handled in this method.
fn build_stream(
&self,
properties: &Properties,
env: &mut StreamExecutionEnvironment
)
fn build_stream(
&self,
properties: &Properties,
env: &mut StreamExecutionEnvironment
)
build application stream,
will invoke multiple times on the Coordinator
and Worker
,
ensure the method is stateless.
Provided methods
fn pre_worker_startup(&self, _cluster_descriptor: &ClusterDescriptor)
fn pre_worker_startup(&self, _cluster_descriptor: &ClusterDescriptor)
Coordinator startup event. Called before Worker’s resource allocation and startup