用于现有Hadoop实例的配置单元Docker容器

用于现有Hadoop实例的配置单元Docker容器,docker,hadoop,hive,docker-compose,Docker,Hadoop,Hive,Docker Compose,我有两个用于Hadoop HDF的工作容器(我从一个容器开始为它们构建了一个Dockerfile),需要向集合中添加一个配置单元实例 我找不到一个好的工作映像来使用(最好有2.3.4版) 你有什么建议我可以使用的,简单的补充吗 谢谢大家! 编辑: 以下是我的一次尝试: hive-server: container_name: hive-server image: bde2020/hive:2.3.2-postgresql-metastor

我有两个用于Hadoop HDF的工作容器(我从一个容器开始为它们构建了一个
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)

我建议使用PrestoDB而不是Hive。。。Hive元存储只能使用Mysql或Postgrescontainer@cricket_007,不幸的是,我必须使用HIVE):,无论如何,我已经更新了我的答案,
bde2020/HIVE:2.3.2-postgresql-metastore
是否同时具有metastore和HiveServer?我假设图像需要更改,或者您需要覆盖一个
命令
,以便它启动一个或另一个。。。我没有在Docker中运行这些的经验,所以帮不了多少忙