WIP checks

This commit is contained in:
Dominik Werder
2023-06-17 23:07:59 +02:00
parent 3cd74601a4
commit 44dd43240b
24 changed files with 492 additions and 368 deletions

View File

@@ -2,15 +2,13 @@ use clap::ArgAction;
use clap::Parser;
use disk::eventchunker::EventChunker;
use disk::eventchunker::EventChunkerConf;
use disk::SfDbChConf;
use err::Error;
#[allow(unused)]
use netpod::log::*;
use netpod::range::evrange::NanoRange;
use netpod::ByteOrder;
use netpod::ByteSize;
use netpod::SfDbChannel;
use netpod::Shape;
use netpod::SfChFetchInfo;
use std::path::PathBuf;
use tokio::fs::File;
use tokio::io::AsyncReadExt;
@@ -80,16 +78,15 @@ pub fn main() -> Result<(), Error> {
let disk_io_tune = netpod::DiskIoTune::default();
let inp = Box::pin(disk::file_content_stream(path.clone(), file, disk_io_tune));
let ce = &config.entries[0];
let channel_config = SfDbChConf {
channel: SfDbChannel::from_name("", &config.channel_name),
keyspace: ce.ks as u8,
time_bin_size: ce.bs.clone(),
scalar_type: ce.scalar_type.clone(),
compression: false,
shape: Shape::Scalar,
array: false,
byte_order: ByteOrder::Little,
};
let fetch_info = SfChFetchInfo::new(
"",
config.channel_name,
ce.ks as _,
ce.bs.clone(),
ByteOrder::Little,
ce.scalar_type.clone(),
ce.to_shape()?,
);
let range = NanoRange {
beg: u64::MIN,
end: u64::MAX,
@@ -97,15 +94,7 @@ pub fn main() -> Result<(), Error> {
let stats_conf = EventChunkerConf {
disk_stats_every: ByteSize::mb(2),
};
let _chunks = EventChunker::from_start(
inp,
channel_config.clone(),
range,
stats_conf,
path.clone(),
false,
true,
);
let _chunks = EventChunker::from_start(inp, fetch_info, range, stats_conf, path.clone(), false, true);
err::todo();
Ok(())
}