up
This commit is contained in:
1 parent
d6357954c1
commit
f63624f8e2
2 files changed
+10
-8
No files matched your search
@@ -64,8 +64,8 @@ async fn open_files_inner(
|
|||||||
}
|
}
|
||||||
timebins.sort_unstable();
|
timebins.sort_unstable();
|
||||||
let tgt_tb = (range.beg / MS) as f32 / (channel_config.time_bin_size.ns / MS) as f32;
|
let tgt_tb = (range.beg / MS) as f32 / (channel_config.time_bin_size.ns / MS) as f32;
|
||||||
trace!("tgt_tb: {:?}", tgt_tb);
|
info!("tgt_tb: {:?}", tgt_tb);
|
||||||
trace!("timebins found: {:?}", timebins);
|
info!("timebins found: {:?}", timebins);
|
||||||
for &tb in &timebins {
|
for &tb in &timebins {
|
||||||
let ts_bin = Nanos {
|
let ts_bin = Nanos {
|
||||||
ns: tb * channel_config.time_bin_size.ns,
|
ns: tb * channel_config.time_bin_size.ns,
|
||||||
@@ -76,11 +76,11 @@ async fn open_files_inner(
|
|||||||
if ts_bin.ns + channel_config.time_bin_size.ns <= range.beg {
|
if ts_bin.ns + channel_config.time_bin_size.ns <= range.beg {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
debug!("opening tb {:?}", &tb);
|
//debug!("opening tb {:?}", &tb);
|
||||||
let path = paths::datapath(tb, &channel_config, &node);
|
let path = paths::datapath(tb, &channel_config, &node);
|
||||||
debug!("opening path {:?}", &path);
|
info!("opening path {:?}", &path);
|
||||||
let mut file = OpenOptions::new().read(true).open(&path).await?;
|
let mut file = OpenOptions::new().read(true).open(&path).await?;
|
||||||
debug!("opened file {:?} {:?}", &path, &file);
|
//info!("opened file {:?} {:?}", &path, &file);
|
||||||
let ret = {
|
let ret = {
|
||||||
let index_path = paths::index_path(ts_bin, &channel_config, &node)?;
|
let index_path = paths::index_path(ts_bin, &channel_config, &node)?;
|
||||||
match OpenOptions::new().read(true).open(&index_path).await {
|
match OpenOptions::new().read(true).open(&index_path).await {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ impl EventBlobsComplete {
|
|||||||
buffer_size: usize,
|
buffer_size: usize,
|
||||||
event_chunker_conf: EventChunkerConf,
|
event_chunker_conf: EventChunkerConf,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
info!("EventBlobsComplete::new beg {}", range.beg / SEC);
|
//info!("EventBlobsComplete::new beg {}", range.beg / SEC);
|
||||||
Self {
|
Self {
|
||||||
file_chan: open_files(&range, &channel_config, node),
|
file_chan: open_files(&range, &channel_config, node),
|
||||||
evs: None,
|
evs: None,
|
||||||
@@ -73,10 +73,10 @@ impl Stream for EventBlobsComplete {
|
|||||||
Ready(Some(k)) => match k {
|
Ready(Some(k)) => match k {
|
||||||
Ok(file) => {
|
Ok(file) => {
|
||||||
let path = file.path;
|
let path = file.path;
|
||||||
//info!("handling {:?}", path);
|
|
||||||
let item = LogItem::quick(Level::INFO, format!("handle file {:?}", path));
|
let item = LogItem::quick(Level::INFO, format!("handle file {:?}", path));
|
||||||
match file.file {
|
match file.file {
|
||||||
Some(file) => {
|
Some(file) => {
|
||||||
|
info!("got file {:?}", path);
|
||||||
let inp = Box::pin(file_content_stream(file, self.buffer_size as usize));
|
let inp = Box::pin(file_content_stream(file, self.buffer_size as usize));
|
||||||
let chunker = EventChunker::from_event_boundary(
|
let chunker = EventChunker::from_event_boundary(
|
||||||
inp,
|
inp,
|
||||||
@@ -88,7 +88,9 @@ impl Stream for EventBlobsComplete {
|
|||||||
);
|
);
|
||||||
self.evs = Some(chunker);
|
self.evs = Some(chunker);
|
||||||
}
|
}
|
||||||
None => {}
|
None => {
|
||||||
|
info!("skip {:?}", path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Ready(Some(Ok(EventChunkerItem::Log(item))))
|
Ready(Some(Ok(EventChunkerItem::Log(item))))
|
||||||
//continue 'outer;
|
//continue 'outer;
|
||||||
|
|||||||
Reference in new issue
Block a user