diff --git a/server/src/catalog.rs b/server/src/catalog.rs index 7fd4aff93..51d6d653a 100644 --- a/server/src/catalog.rs +++ b/server/src/catalog.rs @@ -41,8 +41,11 @@ pub trait Snapshot { } pub trait ManifestFile { + #[allow(unused)] fn file_name(&self) -> &str; + #[allow(unused)] fn ingestion_size(&self) -> u64; + #[allow(unused)] fn file_size(&self) -> u64; fn num_rows(&self) -> u64; fn columns(&self) -> &[Column]; diff --git a/server/src/option.rs b/server/src/option.rs index 0fb12f7f4..d11df0805 100644 --- a/server/src/option.rs +++ b/server/src/option.rs @@ -18,7 +18,7 @@ use clap::error::ErrorKind; use clap::{command, Args, Command, FromArgMatches}; - +use core::fmt; use once_cell::sync::Lazy; use parquet::basic::{BrotliLevel, GzipLevel, ZstdLevel}; use std::env; @@ -234,9 +234,9 @@ impl Mode { } } -impl ToString for Mode { - fn to_string(&self) -> String { - self.to_str().to_string() +impl fmt::Display for Mode { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", self.to_str()) } } diff --git a/server/src/query/stream_schema_provider.rs b/server/src/query/stream_schema_provider.rs index 649f55ea2..0398d68c6 100644 --- a/server/src/query/stream_schema_provider.rs +++ b/server/src/query/stream_schema_provider.rs @@ -328,7 +328,7 @@ impl TableProvider for StandardTableProvider { let obs = glob_storage .get_objects( Some(&path), - Box::new(|file_name| file_name.ends_with("manifest.json")), + Box::new(|file_name| file_name.ends_with("stream.json")), ) .await; if let Ok(obs) = obs { diff --git a/server/src/storage/object_storage.rs b/server/src/storage/object_storage.rs index 77eb9f20d..3487948bc 100644 --- a/server/src/storage/object_storage.rs +++ b/server/src/storage/object_storage.rs @@ -293,6 +293,7 @@ pub trait ObjectStorage: Sync + 'static { } /// for future use + #[allow(dead_code)] async fn get_stats_for_first_time( &self, stream_name: &str, @@ -581,7 +582,7 @@ pub fn parseable_json_path() -> RelativePathBuf { /// TODO: Needs to be updated for distributed mode #[inline(always)] fn alert_json_path(stream_name: &str) -> RelativePathBuf { - RelativePathBuf::from_iter([stream_name, ALERT_FILE_NAME]) + RelativePathBuf::from_iter([stream_name, STREAM_ROOT_DIRECTORY, ALERT_FILE_NAME]) } #[inline(always)]