Skip to content

Commit 6e4784e

Browse files
Devdutt Shenoiparmesant
authored andcommitted
feat: trino is no longer supported as a query engine (parseablehq#1077)
1 parent f57759b commit 6e4784e

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_host = m.get_one::<String>(Self::KAFKA_HOST).cloned();
562507
self.kafka_group = m.get_one::<String>(Self::KAFKA_GROUP).cloned();

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
@@ -43,7 +43,6 @@ pub mod oidc;
4343
pub mod query;
4444
pub mod rbac;
4545
pub mod role;
46-
pub mod trino;
4746
pub mod users;
4847
pub const MAX_EVENT_PAYLOAD_SIZE: usize = 10485760;
4948
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
@@ -55,7 +55,6 @@ impl ParseableServer for QueryServer {
5555
web::scope(&base_path())
5656
.service(Server::get_correlation_webscope())
5757
.service(Server::get_query_factory())
58-
.service(Server::get_trino_factory())
5958
.service(Server::get_liveness_factory())
6059
.service(Server::get_readiness_factory())
6160
.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
@@ -25,7 +25,6 @@ use crate::handlers::http::alerts;
2525
use crate::handlers::http::base_path;
2626
use crate::handlers::http::health_check;
2727
use crate::handlers::http::query;
28-
use crate::handlers::http::trino;
2928
use crate::handlers::http::users::dashboards;
3029
use crate::handlers::http::users::filters;
3130
use crate::hottier::HotTierManager;
@@ -71,7 +70,6 @@ impl ParseableServer for Server {
7170
web::scope(&base_path())
7271
.service(Self::get_correlation_webscope())
7372
.service(Self::get_query_factory())
74-
.service(Self::get_trino_factory())
7573
.service(Self::get_ingest_factory())
7674
.service(Self::get_liveness_factory())
7775
.service(Self::get_readiness_factory())
@@ -175,12 +173,6 @@ impl ParseableServer for Server {
175173
}
176174

177175
impl Server {
178-
// get the trino factory
179-
pub fn get_trino_factory() -> Resource {
180-
web::resource("/trinoquery")
181-
.route(web::post().to(trino::trino_query).authorize(Action::Query))
182-
}
183-
184176
pub fn get_metrics_webscope() -> Scope {
185177
web::scope("/metrics").service(
186178
web::resource("").route(web::get().to(metrics::get).authorize(Action::Metrics)),

0 commit comments

Comments
 (0)