mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-15 20:40:39 +00:00
test: add a test load configuration example for flownode (#6397)
* test: add a test load configuration example for flownode Signed-off-by: liyang <daviderli614@gmail.com> * format rust Signed-off-by: liyang <daviderli614@gmail.com> * fix cargo clippy Signed-off-by: liyang <daviderli614@gmail.com> * refine FlownodeOptions visibility Signed-off-by: liyang <daviderli614@gmail.com> * format rust Signed-off-by: liyang <daviderli614@gmail.com> --------- Signed-off-by: liyang <daviderli614@gmail.com>
This commit is contained in:
@@ -95,7 +95,7 @@ impl Default for FlowConfig {
|
||||
}
|
||||
|
||||
/// Options for flow node
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(default)]
|
||||
pub struct FlownodeOptions {
|
||||
pub node_id: Option<u64>,
|
||||
@@ -251,6 +251,10 @@ impl DiffRequest {
|
||||
Self::Delete(v) => v.len(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.len() == 0
|
||||
}
|
||||
}
|
||||
|
||||
pub fn batches_to_rows_req(batches: Vec<Batch>) -> Result<Vec<DiffRequest>, Error> {
|
||||
@@ -929,6 +933,12 @@ pub struct FlowTickManager {
|
||||
start_timestamp: repr::Timestamp,
|
||||
}
|
||||
|
||||
impl Default for FlowTickManager {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl FlowTickManager {
|
||||
pub fn new() -> Self {
|
||||
FlowTickManager {
|
||||
|
||||
@@ -43,7 +43,7 @@ mod utils;
|
||||
#[cfg(test)]
|
||||
mod test_utils;
|
||||
|
||||
pub use adapter::{FlowConfig, FlowStreamingEngineRef, FlownodeOptions, StreamingEngine};
|
||||
pub use adapter::{FlowConfig, FlowStreamingEngineRef, StreamingEngine};
|
||||
pub use batching_mode::frontend_client::{FrontendClient, GrpcQueryHandlerWithBoxedError};
|
||||
pub use engine::FlowAuthHeader;
|
||||
pub(crate) use engine::{CreateFlowArgs, FlowId, TableName};
|
||||
@@ -52,3 +52,5 @@ pub use server::{
|
||||
get_flow_auth_options, FlownodeBuilder, FlownodeInstance, FlownodeServer,
|
||||
FlownodeServiceBuilder, FrontendInvoker,
|
||||
};
|
||||
|
||||
pub use crate::adapter::FlownodeOptions;
|
||||
|
||||
Reference in New Issue
Block a user