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
55 changes: 0 additions & 55 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,6 @@ pub struct Cli {

pub ms_clarity_tag: Option<String>,

// Trino vars
pub trino_endpoint: Option<String>,
pub trino_username: Option<String>,
pub trino_auth: Option<String>,
pub trino_schema: Option<String>,
pub trino_catalog: Option<String>,

// Kafka specific env vars
pub kafka_topics: Option<String>,
pub kafka_host: Option<String>,
Expand Down Expand Up @@ -155,13 +148,6 @@ impl Cli {
pub const MAX_DISK_USAGE: &'static str = "max-disk-usage";
pub const MS_CLARITY_TAG: &'static str = "ms-clarity-tag";

// Trino specific env vars
pub const TRINO_ENDPOINT: &'static str = "p-trino-end-point";
pub const TRINO_CATALOG_NAME: &'static str = "p-trino-catalog-name";
pub const TRINO_USER_NAME: &'static str = "p-trino-user-name";
pub const TRINO_AUTHORIZATION: &'static str = "p-trino-authorization";
pub const TRINO_SCHEMA: &'static str = "p-trino-schema";

// Kafka specific env vars
pub const KAFKA_TOPICS: &'static str = "kafka-topics";
pub const KAFKA_HOST: &'static str = "kafka-host";
Expand Down Expand Up @@ -252,41 +238,6 @@ impl Cli {
.value_name("STRING")
.help("Audit logger password"),
)
.arg(
Arg::new(Self::TRINO_ENDPOINT)
.long(Self::TRINO_ENDPOINT)
.env("P_TRINO_ENDPOINT")
.value_name("STRING")
.help("Address and port for Trino HTTP(s) server"),
)
.arg(
Arg::new(Self::TRINO_CATALOG_NAME)
.long(Self::TRINO_CATALOG_NAME)
.env("P_TRINO_CATALOG_NAME")
.value_name("STRING")
.help("Name of the catalog to be queried (Translates to X-Trino-Catalog)"),
)
.arg(
Arg::new(Self::TRINO_SCHEMA)
.long(Self::TRINO_SCHEMA)
.env("P_TRINO_SCHEMA")
.value_name("STRING")
.help("Name of schema to be queried (Translates to X-Trino-Schema)"),
)
.arg(
Arg::new(Self::TRINO_USER_NAME)
.long(Self::TRINO_USER_NAME)
.env("P_TRINO_USER_NAME")
.value_name("STRING")
.help("Name of Trino user (Translates to X-Trino-User)"),
)
.arg(
Arg::new(Self::TRINO_AUTHORIZATION)
.long(Self::TRINO_AUTHORIZATION)
.env("P_TRINO_AUTHORIZATION")
.value_name("STRING")
.help("Base 64 encoded in the format username:password"),
)
.arg(
Arg::new(Self::TLS_CERT)
.long(Self::TLS_CERT)
Expand Down Expand Up @@ -551,12 +502,6 @@ impl FromArgMatches for Cli {
}

fn update_from_arg_matches(&mut self, m: &clap::ArgMatches) -> Result<(), clap::Error> {
self.trino_catalog = m.get_one::<String>(Self::TRINO_CATALOG_NAME).cloned();
self.trino_endpoint = m.get_one::<String>(Self::TRINO_ENDPOINT).cloned();
self.trino_auth = m.get_one::<String>(Self::TRINO_AUTHORIZATION).cloned();
self.trino_schema = m.get_one::<String>(Self::TRINO_SCHEMA).cloned();
self.trino_username = m.get_one::<String>(Self::TRINO_USER_NAME).cloned();

self.kafka_topics = m.get_one::<String>(Self::KAFKA_TOPICS).cloned();
self.kafka_security_protocol = m
.get_one::<SslProtocol>(Self::KAFKA_SECURITY_PROTOCOL)
Expand Down
16 changes: 2 additions & 14 deletions src/handlers/http/about.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

use actix_web::web::Json;
use serde_json::json;
use serde_json::{json, Value};

use crate::{
about::{self, get_latest_release},
Expand Down Expand Up @@ -45,7 +45,7 @@ use std::path::PathBuf;
/// "path": store_endpoint
/// }
/// }
pub async fn about() -> Json<serde_json::Value> {
pub async fn about() -> Json<Value> {
let meta = StorageMetadata::global();

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

let ms_clarity_tag = &CONFIG.parseable.ms_clarity_tag;
let mut query_engine = "Parseable".to_string();
if let (Some(_), Some(_), Some(_), Some(_)) = (
CONFIG.parseable.trino_endpoint.as_ref(),
CONFIG.parseable.trino_catalog.as_ref(),
CONFIG.parseable.trino_schema.as_ref(),
CONFIG.parseable.trino_username.as_ref(),
) {
// Trino is enabled
query_engine = "Trino".to_string();
}

Json(json!({
"version": current_version,
Expand All @@ -119,7 +109,5 @@ pub async fn about() -> Json<serde_json::Value> {
"analytics": {
"clarityTag": ms_clarity_tag
},
"queryEngine": query_engine

}))
}
1 change: 0 additions & 1 deletion src/handlers/http/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ pub mod oidc;
pub mod query;
pub mod rbac;
pub mod role;
pub mod trino;
pub mod users;
pub const MAX_EVENT_PAYLOAD_SIZE: usize = 10485760;
pub const API_BASE_PATH: &str = "api";
Expand Down
1 change: 0 additions & 1 deletion src/handlers/http/modal/query_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ impl ParseableServer for QueryServer {
web::scope(&base_path())
.service(Server::get_correlation_webscope())
.service(Server::get_query_factory())
.service(Server::get_trino_factory())
.service(Server::get_liveness_factory())
.service(Server::get_readiness_factory())
.service(Server::get_about_factory())
Expand Down
8 changes: 0 additions & 8 deletions src/handlers/http/modal/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use crate::handlers::http::about;
use crate::handlers::http::base_path;
use crate::handlers::http::health_check;
use crate::handlers::http::query;
use crate::handlers::http::trino;
use crate::handlers::http::users::dashboards;
use crate::handlers::http::users::filters;
use crate::hottier::HotTierManager;
Expand Down Expand Up @@ -69,7 +68,6 @@ impl ParseableServer for Server {
web::scope(&base_path())
.service(Self::get_correlation_webscope())
.service(Self::get_query_factory())
.service(Self::get_trino_factory())
.service(Self::get_ingest_factory())
.service(Self::get_liveness_factory())
.service(Self::get_readiness_factory())
Expand Down Expand Up @@ -163,12 +161,6 @@ impl ParseableServer for Server {
}

impl Server {
// get the trino factory
pub fn get_trino_factory() -> Resource {
web::resource("/trinoquery")
.route(web::post().to(trino::trino_query).authorize(Action::Query))
}

pub fn get_metrics_webscope() -> Scope {
web::scope("/metrics").service(
web::resource("").route(web::get().to(metrics::get).authorize(Action::Metrics)),
Expand Down
Loading
Loading