Adapt binnedjson case

This commit is contained in:
Dominik Werder
2021-11-11 23:53:07 +01:00
parent ceb995f8ca
commit 8ce786d304
11 changed files with 246 additions and 40 deletions

View File

@@ -2,8 +2,10 @@ pub mod append;
use crate::log::*;
use err::Error;
use netpod::ChannelArchiver;
use std::future::Future;
use std::panic;
use std::path::PathBuf;
use std::sync::{Arc, Mutex};
use tokio::runtime::Runtime;
use tokio::task::JoinHandle;
@@ -102,7 +104,10 @@ pub fn tracing_init() {
"archapp::archeng::pipe=info",
"archapp::storagemerge=info",
"streams::rangefilter=info",
"items::eventvalues=debug",
"items::xbinnedscalarevents=debug",
"disk::binned=info",
"nodenet::conn=debug",
"daqbuffer::test=info",
]
.join(","),
@@ -151,3 +156,42 @@ pub fn test_cluster() -> netpod::Cluster {
file_io_buffer_size: Default::default(),
}
}
pub fn sls_test_cluster() -> netpod::Cluster {
let nodes = (0..1)
.into_iter()
.map(|id| netpod::Node {
host: "localhost".into(),
listen: "0.0.0.0".into(),
port: 8362 + id as u16,
port_raw: 8362 + id as u16 + 100,
data_base_path: format!("NOdatapath{}", id).into(),
cache_base_path: format!("../tmpdata/node{:02}", id).into(),
ksprefix: "NOKS".into(),
backend: "sls-archive".into(),
splits: None,
archiver_appliance: None,
channel_archiver: Some(ChannelArchiver {
data_base_paths: vec![PathBuf::from("/data/daqbuffer-testdata/sls/gfa03")],
database: netpod::Database {
host: "localhost".into(),
name: "testingdaq".into(),
user: "testingdaq".into(),
pass: "testingdaq".into(),
},
}),
})
.collect();
netpod::Cluster {
nodes,
database: netpod::Database {
host: "localhost".into(),
name: "testingdaq".into(),
user: "testingdaq".into(),
pass: "testingdaq".into(),
},
run_map_pulse_task: false,
is_central_storage: false,
file_io_buffer_size: Default::default(),
}
}