配置Hive配置文件

完成Hive引擎安装后,还需在OmniOperator算子加速的配置文件中添加Hive相关配置内容才能执行业务。

  1. 创建Hive的配置文件目录“/opt/omni-operator/hive”。在集群管理节点和所有计算节点的“/opt/omni-operator/hive/conf/omni.conf”文件中新增Hive配置内容。

    1. 打开“/opt/omni-operator/hive/conf/omni.conf”文件。
      vi /opt/omni-operator/hive/conf/omni.conf
    2. “i”进入编辑模式,新增关于Hive配置相关内容(推荐配置)。
      # <----Other properties---->
      enableBatchExprEvaluate=false
      # <----Hive properties---->
      EmptySearchStrReplaceRule=REPLACE
      CastDecimalToDoubleRule=CONVERT_WITH_STRING
      ZeroStartIndexSupportRule=IS_SUPPORT
      SupportContainerVecRule=SUPPORT
      StringToDateFormatRule=NOT_ALLOW_REDUCED_PRECISION
      NegativeStartIndexOutOfBoundsRule=EMPTY_STRING
      SupportDecimalPrecisionImprovementRule=IS_SUPPORT
    3. “Esc”键,输入:wq!,按“Enter”保存并退出编辑。

  2. 在集群管理节点的“$HIVE_HOME/conf/hive-site.xml”中添加配置。

    1. 打开文件。
      vi $HIVE_HOME/conf/hive-site.xml
    2. “i”进入编辑模式,在文件中添加以下内容。
      <property>
            <name>hive.optimize.index.filter</name>
            <value>false</value>
      </property>
      <property>
            <name>hive.execution.engine</name>
            <value>tez</value>
      </property>
    3. “Esc”键,输入:wq!,按“Enter”保存并退出编辑。