SET/RESET

Function

This command is used to dynamically add, update, display, or reset the CarbonData properties without restarting the driver.

Syntax

Parameter Description

Table 1 SET parameters

Parameter

Description

parameter_name

Name of the parameter whose value needs to be dynamically added, updated, or displayed

parameter_value

New value of parameter_name to be set

Precautions

The following table lists the properties which you can set or clear using the SET or RESET command.

Table 2 Properties

Property

Description

carbon.options.bad.records.logger.enable

Whether to enable bad record logger.

carbon.options.bad.records.action

Operations on bad records, for example, force, redirect, fail, or ignore. For more information, see •Bad record handling.

carbon.options.is.empty.data.bad.record

Whether the empty data is considered as a bad record. For more information, see Bad record handling.

carbon.options.sort.scope

Scope of the sort during data loading.

carbon.options.bad.record.path

HDFS path where bad records are stored.

carbon.custom.block.distribution

Whether to enable Spark or CarbonData block distribution.

enable.unsafe.sort

Whether to use unsafe sort during data loading. Unsafe sort reduces the garbage collection during data loading, thereby achieving better performance.

carbon.si.lookup.partialstring

If this is set to TRUE, the secondary index uses the starts-with, ends-with, contains, and LIKE partition condition strings.

If this is set to FALSE, the secondary index uses only the starts-with partition condition string.

carbon.input.segments

Segment ID to be queried. This property allows you to query a specified segment of a specified table. CarbonScan reads data only from the specified segment ID.

Syntax:

carbon.input.segments. <database_name>. <table_name> = < list of segment ids >

If you want to query a specified segment in multi-thread mode, you can use CarbonSession.threadSet instead of the SET statement.

Syntax:

CarbonSession.threadSet ("carbon.input.segments. <database_name>. <table_name>","< list of segment ids >");

NOTE:

You are advised not to set this property in the carbon.properties file because all sessions contain the segment list unless session-level or thread-level overwriting occurs.

Examples

System Response