diff --git a/src/cmd_all/src/standalone.rs b/src/cmd_all/src/standalone.rs index 24b90ad613da4..8765db18a07cd 100644 --- a/src/cmd_all/src/standalone.rs +++ b/src/cmd_all/src/standalone.rs @@ -141,7 +141,7 @@ pub fn parse_standalone_opt_args(opts: &StandaloneOpts) -> ParsedStandaloneOpts compactor_opts.prometheus_listener_addr = prometheus_listener_addr.clone(); } if let Some(meta_opts) = meta_opts.as_mut() { - meta_opts.prometheus_host = Some(prometheus_listener_addr.clone()); + meta_opts.prometheus_listener_addr = Some(prometheus_listener_addr.clone()); } } @@ -246,6 +246,7 @@ mod test { // Test parsing into node-level opts. let actual = parse_standalone_opt_args(&opts); + check( actual, expect![[r#" @@ -257,7 +258,7 @@ mod test { listen_addr: "127.0.0.1:8001", advertise_addr: "127.0.0.1:9999", dashboard_host: None, - prometheus_host: Some( + prometheus_listener_addr: Some( "127.0.0.1:1234", ), etcd_endpoints: "", diff --git a/src/compute/src/lib.rs b/src/compute/src/lib.rs index b3125b76052a6..b713aa9951622 100644 --- a/src/compute/src/lib.rs +++ b/src/compute/src/lib.rs @@ -64,6 +64,8 @@ pub struct ComputeNodeOpts { #[clap(long, env = "RW_ADVERTISE_ADDR")] pub advertise_addr: Option, + /// We will start a http server at this address via `MetricsManager`. + /// Then the prometheus instance will poll the metrics from this address. #[clap( long, env = "RW_PROMETHEUS_LISTENER_ADDR", diff --git a/src/connector/src/source/filesystem/opendal_source/opendal_reader.rs b/src/connector/src/source/filesystem/opendal_source/opendal_reader.rs index d962f6e53e93a..49c6be470d573 100644 --- a/src/connector/src/source/filesystem/opendal_source/opendal_reader.rs +++ b/src/connector/src/source/filesystem/opendal_source/opendal_reader.rs @@ -19,7 +19,6 @@ use futures_async_stream::try_stream; use opendal::Operator; use risingwave_common::array::StreamChunk; use risingwave_common::error::RwError; -use risingwave_pb::meta::table_fragments::fragment; use tokio::io::BufReader; use tokio_util::io::{ReaderStream, StreamReader}; @@ -29,7 +28,7 @@ use crate::parser::{ByteStreamSourceParserImpl, ParserConfig}; use crate::source::filesystem::nd_streaming::need_nd_streaming; use crate::source::filesystem::{nd_streaming, OpendalFsSplit}; use crate::source::{ - self, BoxChunkSourceStream, Column, SourceContextRef, SourceMessage, SourceMeta, SplitMetaData, + BoxChunkSourceStream, Column, SourceContextRef, SourceMessage, SourceMeta, SplitMetaData, SplitReader, }; diff --git a/src/connector/src/source/filesystem/s3/source/reader.rs b/src/connector/src/source/filesystem/s3/source/reader.rs index f992b8381653d..d1e03b91fc6b9 100644 --- a/src/connector/src/source/filesystem/s3/source/reader.rs +++ b/src/connector/src/source/filesystem/s3/source/reader.rs @@ -39,9 +39,7 @@ use crate::source::filesystem::file_common::FsSplit; use crate::source::filesystem::nd_streaming; use crate::source::filesystem::nd_streaming::need_nd_streaming; use crate::source::filesystem::s3::S3Properties; -use crate::source::{ - self, BoxChunkSourceStream, Column, SourceContextRef, SourceMessage, SourceMeta, -}; +use crate::source::{BoxChunkSourceStream, Column, SourceContextRef, SourceMessage, SourceMeta}; const MAX_CHANNEL_BUFFER_SIZE: usize = 2048; const STREAM_READER_CAPACITY: usize = 4096; diff --git a/src/frontend/src/lib.rs b/src/frontend/src/lib.rs index 494bd2986a570..805221327f016 100644 --- a/src/frontend/src/lib.rs +++ b/src/frontend/src/lib.rs @@ -106,6 +106,8 @@ pub struct FrontendOpts { #[clap(long, env = "RW_META_ADDR", default_value = "http://127.0.0.1:5690")] pub meta_addr: MetaAddressStrategy, + /// We will start a http server at this address via `MetricsManager`. + /// Then the prometheus instance will poll the metrics from this address. #[clap( long, env = "RW_PROMETHEUS_LISTENER_ADDR", diff --git a/src/meta/node/src/lib.rs b/src/meta/node/src/lib.rs index af8190e1ca8d6..8da4b8b3b20af 100644 --- a/src/meta/node/src/lib.rs +++ b/src/meta/node/src/lib.rs @@ -59,8 +59,10 @@ pub struct MetaNodeOpts { #[clap(long, env = "RW_DASHBOARD_HOST")] dashboard_host: Option, - #[clap(long, env = "RW_PROMETHEUS_HOST")] - pub prometheus_host: Option, + /// We will start a http server at this address via `MetricsManager`. + /// Then the prometheus instance will poll the metrics from this address. + #[clap(long, env = "RW_PROMETHEUS_HOST", alias = "prometheus-host")] + pub prometheus_listener_addr: Option, #[clap(long, env = "RW_ETCD_ENDPOINTS", default_value_t = String::from(""))] etcd_endpoints: String, @@ -84,7 +86,9 @@ pub struct MetaNodeOpts { #[clap(long, env = "RW_DASHBOARD_UI_PATH")] dashboard_ui_path: Option, - /// For dashboard service to fetch cluster info. + /// The HTTP REST-API address of the Prometheus instance associated to this cluster. + /// This address is used to serve PromQL queries to Prometheus. + /// It is also used by Grafana Dashboard Service to fetch metrics and visualize them. #[clap(long, env = "RW_PROMETHEUS_ENDPOINT")] prometheus_endpoint: Option, @@ -196,7 +200,7 @@ pub fn start(opts: MetaNodeOpts) -> Pin + Send>> { info!("> version: {} ({})", RW_VERSION, GIT_SHA); let listen_addr = opts.listen_addr.parse().unwrap(); let dashboard_addr = opts.dashboard_host.map(|x| x.parse().unwrap()); - let prometheus_addr = opts.prometheus_host.map(|x| x.parse().unwrap()); + let prometheus_addr = opts.prometheus_listener_addr.map(|x| x.parse().unwrap()); let backend = match config.meta.backend { MetaBackend::Etcd => MetaStoreBackend::Etcd { endpoints: opts diff --git a/src/storage/compactor/src/lib.rs b/src/storage/compactor/src/lib.rs index e95ba1ff6a39a..2204ffe0af7ef 100644 --- a/src/storage/compactor/src/lib.rs +++ b/src/storage/compactor/src/lib.rs @@ -49,6 +49,8 @@ pub struct CompactorOpts { #[clap(long, env = "RW_PORT")] pub port: Option, + /// We will start a http server at this address via `MetricsManager`. + /// Then the prometheus instance will poll the metrics from this address. #[clap( long, env = "RW_PROMETHEUS_LISTENER_ADDR",