Skip to content

Commit 03e06a9

Browse files
committed
fix: typos
1 parent 7098c32 commit 03e06a9

File tree

10 files changed

+111
-113
lines changed

10 files changed

+111
-113
lines changed

server/src/handlers/http.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub fn base_path_without_preceding_slash() -> String {
6262

6363
pub async fn fetch_schema(stream_name: &str) -> anyhow::Result<arrow_schema::Schema> {
6464
let mut res = vec![];
65-
let ima = QueryServer::get_ingester_info().await.unwrap();
65+
let ima = QueryServer::get_ingestor_info().await.unwrap();
6666

6767
for im in ima {
6868
let uri = format!(
@@ -89,10 +89,10 @@ pub async fn fetch_schema(stream_name: &str) -> anyhow::Result<arrow_schema::Sch
8989
Ok(new_schema)
9090
}
9191

92-
pub async fn send_query_request_to_ingester(query: &Query) -> anyhow::Result<Vec<Value>> {
93-
// send the query request to the ingester
92+
pub async fn send_query_request_to_ingestor(query: &Query) -> anyhow::Result<Vec<Value>> {
93+
// send the query request to the ingestor
9494
let mut res = vec![];
95-
let ima = QueryServer::get_ingester_info().await.unwrap();
95+
let ima = QueryServer::get_ingestor_info().await.unwrap();
9696

9797
for im in ima.iter() {
9898
let uri = format!(

server/src/handlers/http/logstream.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ pub async fn put_stream(req: HttpRequest) -> Result<impl Responder, StreamError>
123123
});
124124
}
125125
if CONFIG.parseable.mode == Mode::Query {
126-
query_server::QueryServer::sync_streams_with_ingesters(&stream_name).await?;
126+
query_server::QueryServer::sync_streams_with_ingestors(&stream_name).await?;
127127
}
128128

129129
create_stream(stream_name.clone()).await?;
@@ -285,7 +285,7 @@ pub async fn get_stats(req: HttpRequest) -> Result<impl Responder, StreamError>
285285
.ok_or(StreamError::StreamNotFound(stream_name.clone()))?;
286286

287287
let ingestor_stats = if CONFIG.parseable.mode == Mode::Query {
288-
Some(query_server::QueryServer::fetch_stats_from_ingesters(&stream_name).await?)
288+
Some(query_server::QueryServer::fetch_stats_from_ingestors(&stream_name).await?)
289289
} else {
290290
None
291291
};

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use crate::sync;
3333

3434
use super::server::Server;
3535
use super::ssl_acceptor::get_ssl_acceptor;
36-
use super::IngesterMetadata;
36+
use super::IngestorMetadata;
3737
use super::OpenIdClient;
3838
use super::ParseableServer;
3939
use super::DEFAULT_VERSION;
@@ -62,8 +62,8 @@ impl ParseableServer for IngestServer {
6262
prometheus: PrometheusMetrics,
6363
_oidc_client: Option<crate::oidc::OpenidConfig>,
6464
) -> anyhow::Result<()> {
65-
// set the ingester metadata
66-
self.set_ingester_metadata().await?;
65+
// set the ingestor metadata
66+
self.set_ingestor_metadata().await?;
6767

6868
// get the ssl stuff
6969
let ssl = get_ssl_acceptor(
@@ -173,25 +173,25 @@ impl IngestServer {
173173
)
174174
}
175175

176-
// create the ingester metadata and put the .ingester.json file in the object store
177-
async fn set_ingester_metadata(&self) -> anyhow::Result<()> {
176+
// create the ingestor metadata and put the .ingestor.json file in the object store
177+
async fn set_ingestor_metadata(&self) -> anyhow::Result<()> {
178178
let store = CONFIG.storage().get_object_store();
179179

180180
// remove ip adn go with the domain name
181181
let sock = Server::get_server_address();
182182
let path = RelativePathBuf::from(format!(
183-
"ingester.{}.{}.json",
183+
"ingestor.{}.{}.json",
184184
sock.ip(), // this might be wrong
185185
sock.port()
186186
));
187187

188188
if store.get_object(&path).await.is_ok() {
189-
println!("Ingester metadata already exists");
189+
println!("Ingestor metadata already exists");
190190
return Ok(());
191191
};
192192

193193
let scheme = CONFIG.parseable.get_scheme();
194-
let resource = IngesterMetadata::new(
194+
let resource = IngestorMetadata::new(
195195
sock.port().to_string(),
196196
CONFIG
197197
.parseable
@@ -218,7 +218,7 @@ impl IngestServer {
218218
}
219219

220220
// check for querier state. Is it there, or was it there in the past
221-
// this should happen before the set the ingester metadata
221+
// this should happen before the set the ingestor metadata
222222
async fn check_querier_state(&self) -> anyhow::Result<(), ObjectStorageError> {
223223
// how do we check for querier state?
224224
// based on the work flow of the system, the querier will always need to start first

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ pub trait ParseableServer {
5555
}
5656

5757
#[derive(Serialize, Debug, Deserialize, Default, Clone, Eq, PartialEq)]
58-
pub struct IngesterMetadata {
58+
pub struct IngestorMetadata {
5959
pub version: String,
6060
pub port: String,
6161
pub domain_name: String,
6262
pub bucket_name: String,
6363
pub token: String,
6464
}
6565

66-
impl IngesterMetadata {
66+
impl IngestorMetadata {
6767
pub fn new(
6868
port: String,
6969
domain_name: String,
@@ -91,11 +91,11 @@ mod test {
9191
use actix_web::body::MessageBody;
9292
use rstest::rstest;
9393

94-
use super::{IngesterMetadata, DEFAULT_VERSION};
94+
use super::{IngestorMetadata, DEFAULT_VERSION};
9595

9696
#[rstest]
9797
fn test_deserialize_resource() {
98-
let lhs: IngesterMetadata = IngesterMetadata::new(
98+
let lhs: IngestorMetadata = IngestorMetadata::new(
9999
"8000".to_string(),
100100
"https://localhost:8000".to_string(),
101101
DEFAULT_VERSION.to_string(),
@@ -104,14 +104,14 @@ mod test {
104104
"admin",
105105
);
106106

107-
let rhs = serde_json::from_slice::<IngesterMetadata>(br#"{"version":"v3","port":"8000","domain_name":"https://localhost:8000","bucket_name":"somebucket","token":"Basic YWRtaW46YWRtaW4="}"#).unwrap();
107+
let rhs = serde_json::from_slice::<IngestorMetadata>(br#"{"version":"v3","port":"8000","domain_name":"https://localhost:8000","bucket_name":"somebucket","token":"Basic YWRtaW46YWRtaW4="}"#).unwrap();
108108

109109
assert_eq!(rhs, lhs);
110110
}
111111

112112
#[rstest]
113113
fn test_serialize_resource() {
114-
let im = IngesterMetadata::new(
114+
let im = IngestorMetadata::new(
115115
"8000".to_string(),
116116
"https://localhost:8000".to_string(),
117117
DEFAULT_VERSION.to_string(),

0 commit comments

Comments
 (0)