Skip to content

Commit b46be32

Browse files
author
Devdutt Shenoi
authored
feat: trino is no longer supported as a query engine (#1077)
1 parent e4e0ae5 commit b46be32

File tree

7 files changed

+2
-394
lines changed

7 files changed

+2
-394
lines changed

src/cli.rs

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,6 @@ pub struct Cli {
102102

103103
pub ms_clarity_tag: Option<String>,
104104

105-
// Trino vars
106-
pub trino_endpoint: Option<String>,
107-
pub trino_username: Option<String>,
108-
pub trino_auth: Option<String>,
109-
pub trino_schema: Option<String>,
110-
pub trino_catalog: Option<String>,
111-
112105
// Kafka specific env vars
113106
pub kafka_topics: Option<String>,
114107
pub kafka_host: Option<String>,
@@ -155,13 +148,6 @@ impl Cli {
155148
pub const MAX_DISK_USAGE: &'static str = "max-disk-usage";
156149
pub const MS_CLARITY_TAG: &'static str = "ms-clarity-tag";
157150

158-
// Trino specific env vars
159-
pub const TRINO_ENDPOINT: &'static str = "p-trino-end-point";
160-
pub const TRINO_CATALOG_NAME: &'static str = "p-trino-catalog-name";
161-
pub const TRINO_USER_NAME: &'static str = "p-trino-user-name";
162-
pub const TRINO_AUTHORIZATION: &'static str = "p-trino-authorization";
163-
pub const TRINO_SCHEMA: &'static str = "p-trino-schema";
164-
165151
// Kafka specific env vars
166152
pub const KAFKA_TOPICS: &'static str = "kafka-topics";
167153
pub const KAFKA_HOST: &'static str = "kafka-host";
@@ -252,41 +238,6 @@ impl Cli {
252238
.value_name("STRING")
253239
.help("Audit logger password"),
254240
)
255-
.arg(
256-
Arg::new(Self::TRINO_ENDPOINT)
257-
.long(Self::TRINO_ENDPOINT)
258-
.env("P_TRINO_ENDPOINT")
259-
.value_name("STRING")
260-
.help("Address and port for Trino HTTP(s) server"),
261-
)
262-
.arg(
263-
Arg::new(Self::TRINO_CATALOG_NAME)
264-
.long(Self::TRINO_CATALOG_NAME)
265-
.env("P_TRINO_CATALOG_NAME")
266-
.value_name("STRING")
267-
.help("Name of the catalog to be queried (Translates to X-Trino-Catalog)"),
268-
)
269-
.arg(
270-
Arg::new(Self::TRINO_SCHEMA)
271-
.long(Self::TRINO_SCHEMA)
272-
.env("P_TRINO_SCHEMA")
273-
.value_name("STRING")
274-
.help("Name of schema to be queried (Translates to X-Trino-Schema)"),
275-
)
276-
.arg(
277-
Arg::new(Self::TRINO_USER_NAME)
278-
.long(Self::TRINO_USER_NAME)
279-
.env("P_TRINO_USER_NAME")
280-
.value_name("STRING")
281-
.help("Name of Trino user (Translates to X-Trino-User)"),
282-
)
283-
.arg(
284-
Arg::new(Self::TRINO_AUTHORIZATION)
285-
.long(Self::TRINO_AUTHORIZATION)
286-
.env("P_TRINO_AUTHORIZATION")
287-
.value_name("STRING")
288-
.help("Base 64 encoded in the format username:password"),
289-
)
290241
.arg(
291242
Arg::new(Self::TLS_CERT)
292243
.long(Self::TLS_CERT)
@@ -551,12 +502,6 @@ impl FromArgMatches for Cli {
551502
}
552503

553504
fn update_from_arg_matches(&mut self, m: &clap::ArgMatches) -> Result<(), clap::Error> {
554-
self.trino_catalog = m.get_one::<String>(Self::TRINO_CATALOG_NAME).cloned();
555-
self.trino_endpoint = m.get_one::<String>(Self::TRINO_ENDPOINT).cloned();
556-
self.trino_auth = m.get_one::<String>(Self::TRINO_AUTHORIZATION).cloned();
557-
self.trino_schema = m.get_one::<String>(Self::TRINO_SCHEMA).cloned();
558-
self.trino_username = m.get_one::<String>(Self::TRINO_USER_NAME).cloned();
559-
560505
self.kafka_topics = m.get_one::<String>(Self::KAFKA_TOPICS).cloned();
561506
self.kafka_security_protocol = m
562507
.get_one::<SslProtocol>(Self::KAFKA_SECURITY_PROTOCOL)

src/handlers/http/about.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
use actix_web::web::Json;
20-
use serde_json::json;
20+
use serde_json::{json, Value};
2121

2222
use crate::{
2323
about::{self, get_latest_release},
@@ -45,7 +45,7 @@ use std::path::PathBuf;
4545
/// "path": store_endpoint
4646
/// }
4747
/// }
48-
pub async fn about() -> Json<serde_json::Value> {
48+
pub async fn about() -> Json<Value> {
4949
let meta = StorageMetadata::global();
5050

5151
let current_release = about::current();
@@ -86,16 +86,6 @@ pub async fn about() -> Json<serde_json::Value> {
8686
};
8787

8888
let ms_clarity_tag = &CONFIG.parseable.ms_clarity_tag;
89-
let mut query_engine = "Parseable".to_string();
90-
if let (Some(_), Some(_), Some(_), Some(_)) = (
91-
CONFIG.parseable.trino_endpoint.as_ref(),
92-
CONFIG.parseable.trino_catalog.as_ref(),
93-
CONFIG.parseable.trino_schema.as_ref(),
94-
CONFIG.parseable.trino_username.as_ref(),
95-
) {
96-
// Trino is enabled
97-
query_engine = "Trino".to_string();
98-
}
9989

10090
Json(json!({
10191
"version": current_version,
@@ -119,7 +109,5 @@ pub async fn about() -> Json<serde_json::Value> {
119109
"analytics": {
120110
"clarityTag": ms_clarity_tag
121111
},
122-
"queryEngine": query_engine
123-
124112
}))
125113
}

src/handlers/http/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ pub mod oidc;
4242
pub mod query;
4343
pub mod rbac;
4444
pub mod role;
45-
pub mod trino;
4645
pub mod users;
4746
pub const MAX_EVENT_PAYLOAD_SIZE: usize = 10485760;
4847
pub const API_BASE_PATH: &str = "api";

src/handlers/http/modal/query_server.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ impl ParseableServer for QueryServer {
5353
web::scope(&base_path())
5454
.service(Server::get_correlation_webscope())
5555
.service(Server::get_query_factory())
56-
.service(Server::get_trino_factory())
5756
.service(Server::get_liveness_factory())
5857
.service(Server::get_readiness_factory())
5958
.service(Server::get_about_factory())

src/handlers/http/modal/server.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ use crate::handlers::http::about;
2323
use crate::handlers::http::base_path;
2424
use crate::handlers::http::health_check;
2525
use crate::handlers::http::query;
26-
use crate::handlers::http::trino;
2726
use crate::handlers::http::users::dashboards;
2827
use crate::handlers::http::users::filters;
2928
use crate::hottier::HotTierManager;
@@ -69,7 +68,6 @@ impl ParseableServer for Server {
6968
web::scope(&base_path())
7069
.service(Self::get_correlation_webscope())
7170
.service(Self::get_query_factory())
72-
.service(Self::get_trino_factory())
7371
.service(Self::get_ingest_factory())
7472
.service(Self::get_liveness_factory())
7573
.service(Self::get_readiness_factory())
@@ -163,12 +161,6 @@ impl ParseableServer for Server {
163161
}
164162

165163
impl Server {
166-
// get the trino factory
167-
pub fn get_trino_factory() -> Resource {
168-
web::resource("/trinoquery")
169-
.route(web::post().to(trino::trino_query).authorize(Action::Query))
170-
}
171-
172164
pub fn get_metrics_webscope() -> Scope {
173165
web::scope("/metrics").service(
174166
web::resource("").route(web::get().to(metrics::get).authorize(Action::Metrics)),

0 commit comments

Comments
 (0)