Updated on 2023-04-28 GMT+08:00

Index Configuration

Parameter

Description

Default Value

hoodie.index.class

Specifies the full path of user-defined index class. It must be a subclass of HoodieIndex and takes precedence over the hoodie.index.type configuration if specified.

""

hoodie.index.type

Specifies the type of index to be used. The Bloom filter is used by default. The possible option is [BLOOM | HBASE | GLOBAL_BLOOM | SIMPLE | GLOBAL_SIMPLE | BUCKET | RANGE]. The Bloom filter eliminates the dependency on an external system and is stored in the footer of a Parquet data file.

CAUTION:

BUCKET and RANGE indexes support only INSERT, UPSERT, DELETE, and COMPACT operations.

BLOOM

hoodie.index.bloom.num_entries

Specifies the number of entries to be stored in the Bloom filter. If the maxParquetFileSize is 128 MB and averageRecordSize is 1,024 bytes, a total of 130 KB records exist in a file. The default value (60000) is about half of this approximate value.

CAUTION:

If the value is too low, a large number of false positives will occur, and index lookup will have to scan more files than it needs. If the value is too high, the size every data file will be increased linearly (about 4 KB for every 50000 entries).

60000

hoodie.index.bloom.fpp

Specifies the allowed error rate based on the number of entries. This is used to calculate how many bits should be assigned for the Bloom filter and the number of hash functions. Generally, it is set to a small value (0.000000001 by default). You need to balance the disk space to reduce the false positive rate.

0.000000001

hoodie.bloom.index.parallelism

Specifies the parallelism for index lookup, which involves Spark Shuffle. By default, this is automatically computed based on input workload characteristics.

0

hoodie.bloom.index.prune.by.ranges

If this parameter is set to true, information is ranged from files to speed up index lookups. It is particularly useful if the key has a monotonously increasing prefix, such as timestamp.

true

hoodie.bloom.index.use.caching

If this parameter is set to true, the input RDD is cached to speed up index lookups by reducing I/O for computing parallelism or affected partitions.

true

hoodie.bloom.index.use.treebased.filter

If this parameter is set to true, the file pruning optimization based on interval tree is enabled. This mode speeds up file pruning based on key ranges compared with the brute-force mode.

true

hoodie.bloom.index.bucketized.checking

If this parameter is set to true, the bucketized Bloom filtering is enabled. This reduces skew in the sort-based Bloom index lookup.

true

hoodie.bloom.index.keys.per.bucket

This parameter is applicable only when bloomIndexBucketizedChecking is enabled and the index type is BLOOM.

This parameter controls the "bucket" size which tracks the number of record-key checks made against a single file and is the unit of work allocated to each partition performing the Bloom filter lookup. A higher value would amortize the fixed cost of reading the Bloom filter to memory.

10000000

hoodie.bloom.index.update.partition.path

This parameter is applicable only when the index type is GLOBAL_BLOOM.

If this parameter is set to true, an update including the partition path of a record that already exists will result in the insertion of the incoming record into the new partition and the deletion of the original record in the old partition. If this parameter is set to false, the original record will only be updated in the old partition.

true

hoodie.index.hbase.zkquorum

Mandatory. This parameter is available only when the index type is HBASE. HBase ZooKeeper quorum URL to be connected.

None

hoodie.index.hbase.zkport

Mandatory. This parameter is available only when the index type is HBASE. HBase ZooKeeper quorum port to be connected.

None

hoodie.index.hbase.zknode.path

Mandatory. This parameter is available only when the index type is HBASE. It is the root znode that will contain all the znodes created and used by HBase.

None

hoodie.index.hbase.table

Mandatory. This parameter is available only when the index type is HBASE. HBase table name to be used as an index. Hudi stores the row_key and [partition_path, fileID, commitTime] mapping in the table.

None

hoodie.bucket.index.num.buckets

This parameter is applicable only when the index type is BUCKET. Number of buckets in each partition of a Hudi table. Data in each partition is stored in each bucket in hash mode.

CAUTION:

This parameter cannot be modified after being set during table creation or data writing for the first time. Otherwise, an exception occurs during data update.

This function is supported only in MRS 3.2.0 or later.

256

hoodie.bucket.index.hash.field

This parameter is applicable only when the index type is BUCKET. Field for calculating the hash value during bucketing. The field must be a subset of the primary key. The default value is the primary key of the Hudi table.

NOTE:

This function is supported only in MRS 3.2.0 or later.

None

hoodie.range.index.range

This parameter is applicable only when the index type is RANGE. Range of records stored in each data file. This parameter applies only to the scenario where the primary key is consecutively incremented. For example, if this parameter is set to 100000, records whose primary key ranges from 0 to 99999 are stored in a data file, and so on. Every 100000 records are stored in a data file.

CAUTION:

This parameter cannot be modified after being set during table creation or data writing for the first time. Otherwise, an exception occurs during data update.

This function is supported only in MRS 3.2.0 or later.

100000

hoodie.check.index.parameter

Specifies whether to verify the index parameter set for data writing.

CAUTION:

If this parameter is set to false, data may be abnormal because different indexes are incompatible.

This function is supported only in MRS 3.2.0 or later.

true