---
title: OmniOperator算子加速在Hadoop安全集群的使用
description: "- 场景1：安全模式下，数据集的格式为ORC，设置半关闭Native ORC。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/230RC5/bds/kunpengbds_omniruntime_20_0143.html
sourcePath: /source/zh/kunpengboostkithistory/230RC5/bds/kunpengbds_omniruntime_20_0143.html
indexId: 8d6cbe858060228218bbe91492c5bc26eaf835e0b99c90bfaf2672a00076d86580
---
# OmniOperator算子加速在Hadoop安全集群的使用

- 场景1：安全模式下，数据集的格式为ORC，设置半关闭Native ORC。
  基于执行Spark引擎业务
  中SparkExtension插件启动命令，添加如下3个参数。

```
--conf spark.sql.codegen.wholeStage=true --conf spark.omni.sql.columnar.nativefilescan=true --conf spark.omni.sql.columnar.orcNativefilescan=false
```


  半关闭Native ORC是指采用原生ORC读取数据，但是OmniOperator算子加速把原生数据结构转化为OmniVector。 3TB数据集的TPCDS 99性能测试结果表明，安全模式下半关闭Native ORC对比非安全模式下Native ORC的平均性能损耗约为10%。

- 场景2：安全模式下，数据集的格式为ORC，设置完全关闭Native ORC，即走原生ORC Table Scan。
  基于执行Spark引擎业务
  中SparkExtension插件启动命令，添加如下3个参数。

```
--conf spark.sql.codegen.wholeStage=false --conf spark.omni.sql.columnar.nativefilescan=false --conf spark.omni.sql.columnar.orcNativefilescan=false
```


  3TB数据集的TPCDS 99性能测试结果表明，安全模式下完全关闭Native ORC对比非安全模式下Native ORC的平均性能损耗约为17%。

- 场景3：安全模式下，数据集的格式为Parquet，默认使用Native Parquet。
  基于执行Spark引擎业务
  中SparkExtension插件启动命令添加如下参数。

```
--conf spark.omni.sql.columnar.nativefilescan=true
```


  安全模式下Native Parquet对比非安全模式下Native Parquet的平均性能损耗约为5%。
