From 87386f39e5e558463e9ed295f99e1cb652788a61 Mon Sep 17 00:00:00 2001 From: Nitish Tiwari Date: Mon, 8 Apr 2024 22:22:38 +0530 Subject: [PATCH 1/2] rename P_NODE_URL to P_INGESTOR_URL --- server/src/cli.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/server/src/cli.rs b/server/src/cli.rs index cc8aed23b..b02c8a225 100644 --- a/server/src/cli.rs +++ b/server/src/cli.rs @@ -87,8 +87,8 @@ pub struct Cli { /// Mode of operation pub mode: Mode, - /// public address for the parseable server - pub node_url: String, + /// public address for the parseable server ingestor + pub ingestor_url: String, } impl Cli { @@ -115,7 +115,7 @@ impl Cli { pub const ROW_GROUP_SIZE: &'static str = "row-group-size"; pub const PARQUET_COMPRESSION_ALGO: &'static str = "compression-algo"; pub const MODE: &'static str = "mode"; - pub const NODE_URL: &'static str = "node-url"; + pub const INGESTOR_URL: &'static str = "ingestor-url"; pub const DEFAULT_USERNAME: &'static str = "admin"; pub const DEFAULT_PASSWORD: &'static str = "admin"; @@ -317,13 +317,13 @@ impl Cli { .help("Mode of operation"), ) .arg( - Arg::new(Self::NODE_URL) - .long(Self::NODE_URL) - .env("P_NODE_URL") + Arg::new(Self::INGESTOR_URL) + .long(Self::INGESTOR_URL) + .env("P_INGESTOR_URL") .value_name("URL") .required(false) .value_parser(validation::socket_addr) - .help("Node URL for Parseable server") + .help("URL to connect to this specific ingestor. Default is the address of the server.") ) .arg( Arg::new(Self::PARQUET_COMPRESSION_ALGO) @@ -368,8 +368,8 @@ impl FromArgMatches for Cli { .cloned() .expect("default value for address"); - self.node_url = m - .get_one::(Self::NODE_URL) + self.ingestor_url = m + .get_one::(Self::INGESTOR_URL) .cloned() .unwrap_or_else(|| self.address.clone()); From 0ea445979e48a9069325eaf8495a871670a6c09e Mon Sep 17 00:00:00 2001 From: Nikhil Sinha Date: Tue, 9 Apr 2024 00:04:53 +0530 Subject: [PATCH 2/2] fixed error, use ingestor_url instead of node_url --- .gitignore | 4 ++-- server/src/handlers/http/modal/server.rs | 2 +- server/src/utils.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c3994ec35..bf69b23aa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ target -data -staging +data* +staging* limitcache examples cert.pem diff --git a/server/src/handlers/http/modal/server.rs b/server/src/handlers/http/modal/server.rs index 74767683a..89cd3aa59 100644 --- a/server/src/handlers/http/modal/server.rs +++ b/server/src/handlers/http/modal/server.rs @@ -480,7 +480,7 @@ impl Server { pub fn get_server_address() -> SocketAddr { // this might cause an issue down the line // best is to make the Cli Struct better, but thats a chore - (CONFIG.parseable.node_url.clone()) + (CONFIG.parseable.ingestor_url.clone()) .parse::() .unwrap() } diff --git a/server/src/utils.rs b/server/src/utils.rs index 6949873a0..5cbe596d2 100644 --- a/server/src/utils.rs +++ b/server/src/utils.rs @@ -228,7 +228,7 @@ impl TimePeriod { #[inline(always)] pub fn get_address() -> (IpAddr, u16) { - let addr = CONFIG.parseable.node_url.parse::().unwrap(); + let addr = CONFIG.parseable.ingestor_url.parse::().unwrap(); (addr.ip(), addr.port()) }