Docker-контейнер HIVE для использования с существующими экземплярами Hadoop - PullRequest
1 голос
/ 02 мая 2019

У меня есть 2 рабочих контейнера для Hadoop HDFS (я создал для них Dockerfile, начиная с одного здесь ), и мне нужно добавить экземпляр HIVE в набор.

Я не могу найти хорошее рабочее изображение для использования (было бы неплохо иметь версию 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)
...