本地验证过存算一体的starrocks 连接本地自己搭建的es可以,连接腾讯云es集群也不行。
-
starrocks 集群情况
版本:3.2.2
存算分离 shared_data mode
搭建过程 -
验证es是否可连接
curl --user elastic:XXX -XGET 'http://172.16.0.8:9200/_nodes/http?pretty'
{
"_nodes" : {
"total" : 2,
"successful" : 2,
"failed" : 0
},
"cluster_name" : "es-n29hodty",
"nodes" : {
"8JMmm6BmTti1NkIK5klb9Q" : {
"name" : "1659921770001140232",
"transport_address" : "172.16.0.7:9300",
"host" : "172.16.0.7",
"ip" : "172.16.0.7",
"version" : "7.14.2",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "6a9d8f44123874a3e089149a7e70bca7c8474e58",
"roles" : [
"data_content",
"data_warm",
"ingest",
"master",
"ml",
"remote_cluster_client",
"transform"
],
"attributes" : {
"ml.machine_memory" : "3929686016",
"rack" : "cvm_1_100003",
"xpack.installed" : "true",
"set" : "100003",
"transform.node" : "true",
"ip" : "9.10.119.35",
"temperature" : "warm",
"ml.max_open_jobs" : "512",
"ml.max_jvm_size" : "1610612736",
"region" : "1"
},
"http" : {
"bound_address" : [
"[::]:9200"
],
"publish_address" : "172.16.0.7:9200",
"max_content_length_in_bytes" : 104857600
}
},
"ra5MMv2SRuWmQxajPEwLBw" : {
"name" : "1659921770001140132",
"transport_address" : "172.16.0.12:9300",
"host" : "172.16.0.12",
"ip" : "172.16.0.12",
"version" : "7.14.2",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "6a9d8f44123874a3e089149a7e70bca7c8474e58",
"roles" : [
"data_content",
"data_warm",
"ingest",
"master",
"ml",
"remote_cluster_client",
"transform"
],
"attributes" : {
"ml.machine_memory" : "3929686016",
"rack" : "cvm_1_100003",
"xpack.installed" : "true",
"set" : "100003",
"transform.node" : "true",
"ip" : "9.10.120.236",
"temperature" : "warm",
"ml.max_open_jobs" : "512",
"ml.max_jvm_size" : "1610612736",
"region" : "1"
},
"http" : {
"bound_address" : [
"[::]:9200"
],
"publish_address" : "172.16.0.12:9200",
"max_content_length_in_bytes" : 104857600
}
}
}
}
- 创建es catalog
CREATE EXTERNAL CATALOG es
PROPERTIES
(
"type" = "es",
"es.type" = "_doc",
"hosts" = "http://172.16.0.8:9200",
"es.net.ssl" = "true",
"user" = "elastic",
"password" = "XXX",
"es.nodes.wan.only" = "true"
);
- 查询es,无法查询出来tables
StarRocks > show catalogs;
+-----------------+----------+------------------------------------------------------------------+
| Catalog | Type | Comment |
+-----------------+----------+------------------------------------------------------------------+
| default_catalog | Internal | An internal catalog contains this cluster's self-managed tables. |
| es | Es | NULL |
| jdbc | Jdbc | NULL |
+-----------------+----------+------------------------------------------------------------------+
StarRocks > use es.defalut_db;
Database changed
StarRocks > show tables;
Empty set (0.05 sec)
而实际es内是有索引的
curl --user elastic:XXX -XGET 'http://172.16.0.8:9200/_cat/indices?pretty'
green open customers_cdc_v2 exp_KAV8SLmnD2e6rdLUYg 5 1 88076 14576 164.7mb 81.2mb
green open customers_cdc_v1 AcZHwEnCQBid6V9bD9-xJw 5 1 85931 1410 144.4mb 71.8mb
green open customers_cdc_v4 hEUKge1CR1a6KaCHB45NUw 5 1 91832 8763 162.2mb 81.1mb
green open test GjmL_rGLTaa9YmH2d-3PsQ 1 0 5 0 5kb 5kb