feat(hbase): add HBase REST support
This commit is contained in:
48 files changed
+2455
-19
No files matched your search
@@ -455,6 +455,7 @@ pub enum DatabaseType {
|
||||
Oracle,
|
||||
#[serde(rename = "elasticsearch")]
|
||||
Elasticsearch,
|
||||
Hbase,
|
||||
#[serde(rename = "qdrant")]
|
||||
Qdrant,
|
||||
#[serde(rename = "milvus")]
|
||||
@@ -1001,6 +1002,7 @@ impl ConnectionConfig {
|
||||
}
|
||||
DatabaseType::Oracle => format!("oracle://{host}:{port}{db_part}"),
|
||||
DatabaseType::Elasticsearch
|
||||
| DatabaseType::Hbase
|
||||
| DatabaseType::Qdrant
|
||||
| DatabaseType::Milvus
|
||||
| DatabaseType::Weaviate
|
||||
@@ -1149,6 +1151,7 @@ impl ConnectionConfig {
|
||||
format!("oracle://{}:{}@{host}:{port}{db_part}", username, password)
|
||||
}
|
||||
DatabaseType::Elasticsearch
|
||||
| DatabaseType::Hbase
|
||||
| DatabaseType::Qdrant
|
||||
| DatabaseType::Milvus
|
||||
| DatabaseType::Weaviate
|
||||
@@ -2762,6 +2765,20 @@ mod tests {
|
||||
assert_eq!(config.connection_url(), "https://10.1.2.3:8443");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hbase_rest_url_uses_http_or_https_without_embedding_credentials() {
|
||||
let mut config = mysql_config("hbase-user", "secret", None);
|
||||
config.db_type = DatabaseType::Hbase;
|
||||
config.port = 8080;
|
||||
|
||||
assert_eq!(config.connection_url(), "http://10.1.2.3:8080");
|
||||
assert_eq!(config.redacted_connection_url(), "http://10.1.2.3:8080");
|
||||
|
||||
config.ssl = true;
|
||||
assert_eq!(config.connection_url(), "https://10.1.2.3:8080");
|
||||
assert_eq!(config.redacted_connection_url(), "https://10.1.2.3:8080");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn clickhouse_host_may_include_http_scheme() {
|
||||
let mut config = mysql_config("default", "", None);
|
||||
|
||||
Reference in new issue
Block a user