我有两个用于hadoop hdfs的工作容器(我已经构建了一个 Dockerfile
从这里开始)并需要向集合中添加一个配置单元示例。
我找不到一个好的工作映像来使用(最好有2.3.4版)。
你有什么好补充的建议我可以用吗?
谢谢您!
编辑:
我做了一个尝试:
hive-server:
container_name: hive-server
image: bde2020/hive:2.3.2-postgresql-metastore
depends_on:
- hadoop-namenode
env_file:
- ./hive_build/hadoop-hive.env
environment:
HIVE_CORE_CONF_javax_jdo_option_ConnectionURL: "jdbc:postgresql://hive-metastore/metastore"
SERVICE_PRECONDITION: "hive-metastore:9083"
ports:
- "10000:10000"
restart: unless-stopped
hive-metastore:
container_name: hive-metastore
image: bde2020/hive:2.3.2-postgresql-metastore
depends_on:
- hive-server
- hive-metastore-postgresql
env_file:
- ./hive_build/hadoop-hive.env
command: /opt/hive/bin/hive --service metastore
environment:
SERVICE_PRECONDITION: "hadoop-namenode:50070 hadoop-datanode1:50075 hive-metastore-postgresql:5432"
ports:
- "9083:9083"
restart: unless-stopped
hive-metastore-postgresql:
container_name: hive-metastore-postgresql
image: bde2020/hive-metastore-postgresql:2.3.0
ports:
- "5433:5432"
restart: unless-stopped
但当我输入并尝试连接时,我得到一个错误:
docker exec -it hive-server bash
/opt/hive/bin/beeline -u jdbc:hive2://localhost:10000
错误:
19/05/03 09:13:46 [main]: WARN jdbc.HiveConnection: Failed to connect to localhost:10000
Could not open connection to the HS2 server. Please check the server URI and if the URI is correct, then ask the administrator to check the server status.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0)
暂无答案!
目前还没有任何答案,快来回答吧!