Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
target
data
staging
data*
staging*
limitcache
examples
cert.pem
Expand Down
18 changes: 9 additions & 9 deletions server/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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";

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -368,8 +368,8 @@ impl FromArgMatches for Cli {
.cloned()
.expect("default value for address");

self.node_url = m
.get_one::<String>(Self::NODE_URL)
self.ingestor_url = m
.get_one::<String>(Self::INGESTOR_URL)
.cloned()
.unwrap_or_else(|| self.address.clone());

Expand Down
2 changes: 1 addition & 1 deletion server/src/handlers/http/modal/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<SocketAddr>()
.unwrap()
}
Expand Down
2 changes: 1 addition & 1 deletion server/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ impl TimePeriod {

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

Expand Down