Skip to main content

How to Enable HDP

  1. Create a new MySQL database: MDHDP

    1. Access the container:

      docker exec -it $(docker ps | grep -E 'hap-community|hap:' | awk '{print $1}') bash
    2. Log in to MySQL:

      mysql -h sc -P 3306 -uroot -p123456
    3. Create the database:

      CREATE DATABASE IF NOT EXISTS MDHDP DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci;
  1. Deploy the Flink service, refer to: How to Deploy Flink Service

    • The HDP feature depends on the Flink service. Before enabling HDP features, ensure that the Flink service has been successfully deployed.

    • If you previously deployed Flink for data integration or aggregation table functionality, you need to upgrade Flink to 1.19.710.

      Upgrade Notice

      After upgrading the Flink version, existing data integration synchronization tasks and aggregation tables must be manually restarted to resume operation.

  2. Download the HDP image (Offline Package Download)

    docker pull nocoly/hdp:1.0.0
  3. Modify the docker-compose.yaml file (default path: /data/hap/script/docker-compose.yaml)

    1. Add the hdp service

        hdp:
      image: nocoly/hdp:1.0.0
      environment:
      <<: *app-environment
    2. Add the ENV_HDP_ENABLE environment variable to the app service

      app:
      environment:
      ENV_HDP_ENABLE: "true"
      Click to view the complete modification example
      version: '3'

      services:
      app:
      image: nocoly/hap:7.1.0
      environment: &app-environment
      ENV_ADDRESS_MAIN: "https://hap.domain.com"
      ENV_APP_VERSION: "7.1.0"
      ENV_API_TOKEN: "******"
      ENV_FLINK_URL: "http://flink:8081"
      ENV_HDP_ENABLE: "true" # New: Enable the HDP function
      ports:
      - 8880:8880
      volumes:
      - ./volume/data/:/data/
      - ../data:/data/hap/data

      sc:
      image: nocoly/sc:3.2.0
      environment:
      <<: *app-environment
      volumes:
      - ./volume/data/:/data/

      command:
      image: nocoly/command:node2011-python312

      doc:
      image: nocoly/doc:2.0.0

      flink:
      image: nocoly/flink:1.19.710
      entrypoint: ["/bin/bash"]
      command: ["/run.sh"]
      environment:
      ENV_FLINK_S3_ENDPOINT: "sc:9010"
      volumes:
      - ./volume/data/:/data/

      # --- Newly added service ---
      hdp:
      image: nocoly/hdp:1.0.0
      environment:
      <<: *app-environment
  4. Restart the service by executing the following command in the installation manager's extraction path:

    bash service.sh restartall