如何将 Apache Drill 选项配置为环境变量?

How to configure Apache Drill options as env variable?

我想通过启动 drillbit 在系统级别将 drill.exec.hashjoin.fallback.enabled 设置为 true

我可以在会话期间设置它,例如 alter session setdrill.exec.hashjoin.fallback.enabled=TRUE;,我也知道 drill-override.conf 文件。但是,如何通过将环境变量传递给我的容器来设置它,例如:

    drill:
        image: drill/apache-drill
        restart: always
        environment:
            # - DRILL_EXEC_HASHJOIN_FALLBACK_ENABLED=TRUE
            # - DRILLBIT_JAVA_OPTS="-Ddrill.exec.hashjoin.fallback.enabled=true"
            - DRILLBIT_JAVA_OPTS="-Ddrill.exec.options.drill.exec.hashjoin.fallback.enabled=true"
        tty: true
        volumes:
            - orlando:/orlando
        ports:
            - "8047:8047"
            - "31010:31010"

能否说明一下,Drill是以嵌入式还是分布式方式启动的?

对于分布式模式,DRILLBIT_JAVA_OPTS=-Ddrill.exec.options.drill.exec.hashjoin.fallback.enabled=true应该按预期工作,但对于嵌入式,不考虑这个变量,应该使用DRILL_JAVA_OPTS变量:

- DRILL_JAVA_OPTS=-Ddrill.exec.options.drill.exec.hashjoin.fallback.enabled=true

更多变量说明请参考https://github.com/apache/drill/blob/master/distribution/src/resources/runbit#L36