ORC is a column-based storage format in the Hadoop ecosystem. It originates from Apache Hive and is used to reduce the Hadoop data storage space and accelerate the Hive query speed. Similar to Parquet, ORC is not a pure column-based storage format. In the ORC format, the entire table is split based on the row group, data in each row group is stored by column, and data is compressed as much as possible to reduce storage space consumption. Vector-based ORC data reading significantly improves the ORC data reading performance. In Spark2.3, SparkSQL supports vector-based ORC data reading (this function is supported in earlier Hive versions). Vector-based ORC data reading improves the data reading performance by multiple times.
This function is controlled by the following parameters:
Log in to FusionInsight Manager, choose Cluster > Name of the desired cluster > Services > Spark2x. On the displayed page, choose Configurations > All Configurations. Search for parameters listed in the following table and configure them as required.
Parameter |
Description |
Default Value |
Value Range |
---|---|---|---|
spark.sql.orc.enableVectorizedReader |
Specifies whether vector-based ORC data reading is supported. The default value is true. |
true |
[true,false] |
spark.sql.codegen.wholeStage |
Specifies whether to compile all stages of multiple operations into a Java method. The default value is true. |
true |
[true,false] |
spark.sql.codegen.maxFields |
Specifies the maximum number of fields (including nested fields) supported by all stages of codegen. The default value is 100. |
100 |
≥ 1 |
spark.sql.orc.impl |
Specifies whether Hive or Spark SQL native is used as the SQL execution engine to read ORC data. The default value is hive. |
hive |
[hive,native] |