Skip to content

Commit 91cce24

Browse files
rename P_NODE_URL to P_INGESTOR_URL (#748)
Co-authored-by: Nikhil Sinha <[email protected]>
1 parent 1bf85de commit 91cce24

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

server/src/cli.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ pub struct Cli {
8787
/// Mode of operation
8888
pub mode: Mode,
8989

90-
/// public address for the parseable server
91-
pub node_url: String,
90+
/// public address for the parseable server ingestor
91+
pub ingestor_url: String,
9292
}
9393

9494
impl Cli {
@@ -115,7 +115,7 @@ impl Cli {
115115
pub const ROW_GROUP_SIZE: &'static str = "row-group-size";
116116
pub const PARQUET_COMPRESSION_ALGO: &'static str = "compression-algo";
117117
pub const MODE: &'static str = "mode";
118-
pub const NODE_URL: &'static str = "node-url";
118+
pub const INGESTOR_URL: &'static str = "ingestor-url";
119119
pub const DEFAULT_USERNAME: &'static str = "admin";
120120
pub const DEFAULT_PASSWORD: &'static str = "admin";
121121

@@ -317,13 +317,13 @@ impl Cli {
317317
.help("Mode of operation"),
318318
)
319319
.arg(
320-
Arg::new(Self::NODE_URL)
321-
.long(Self::NODE_URL)
322-
.env("P_NODE_URL")
320+
Arg::new(Self::INGESTOR_URL)
321+
.long(Self::INGESTOR_URL)
322+
.env("P_INGESTOR_URL")
323323
.value_name("URL")
324324
.required(false)
325325
.value_parser(validation::socket_addr)
326-
.help("Node URL for Parseable server")
326+
.help("URL to connect to this specific ingestor. Default is the address of the server.")
327327
)
328328
.arg(
329329
Arg::new(Self::PARQUET_COMPRESSION_ALGO)
@@ -368,8 +368,8 @@ impl FromArgMatches for Cli {
368368
.cloned()
369369
.expect("default value for address");
370370

371-
self.node_url = m
372-
.get_one::<String>(Self::NODE_URL)
371+
self.ingestor_url = m
372+
.get_one::<String>(Self::INGESTOR_URL)
373373
.cloned()
374374
.unwrap_or_else(|| self.address.clone());
375375

server/src/handlers/http/modal/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ impl Server {
480480
pub fn get_server_address() -> SocketAddr {
481481
// this might cause an issue down the line
482482
// best is to make the Cli Struct better, but thats a chore
483-
(CONFIG.parseable.node_url.clone())
483+
(CONFIG.parseable.ingestor_url.clone())
484484
.parse::<SocketAddr>()
485485
.unwrap()
486486
}

server/src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ impl TimePeriod {
228228

229229
#[inline(always)]
230230
pub fn get_address() -> (IpAddr, u16) {
231-
let addr = CONFIG.parseable.node_url.parse::<SocketAddr>().unwrap();
231+
let addr = CONFIG.parseable.ingestor_url.parse::<SocketAddr>().unwrap();
232232
(addr.ip(), addr.port())
233233
}
234234

0 commit comments

Comments
 (0)