Class UpsertConfig
- java.lang.Object
-
- org.apache.pinot.spi.config.BaseJsonConfig
-
- org.apache.pinot.spi.config.table.UpsertConfig
-
- All Implemented Interfaces:
Serializable
public class UpsertConfig extends BaseJsonConfig
Class representing upsert configuration of a table.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUpsertConfig.Modestatic classUpsertConfig.Strategy
-
Constructor Summary
Constructors Constructor Description UpsertConfig()UpsertConfig(UpsertConfig.Mode mode)UpsertConfig(UpsertConfig.Mode mode, Map<String,UpsertConfig.Strategy> partialUpsertStrategies, UpsertConfig.Strategy defaultPartialUpsertStrategy, String comparisonColumn, HashFunction hashFunction)Deprecated.
-
Method Summary
Modifier and Type Method Description StringgetComparisonColumn()UpsertConfig.StrategygetDefaultPartialUpsertStrategy()HashFunctiongetHashFunction()StringgetMetadataManagerClass()Map<String,String>getMetadataManagerConfigs()UpsertConfig.ModegetMode()Map<String,UpsertConfig.Strategy>getPartialUpsertStrategies()booleanisEnableSnapshot()voidsetComparisonColumn(String comparisonColumn)By default, Pinot uses the value in the time column to determine the latest record.voidsetDefaultPartialUpsertStrategy(UpsertConfig.Strategy defaultPartialUpsertStrategy)If strategy is not specified for a column, the merger on that column will be "defaultPartialUpsertStrategy".voidsetEnableSnapshot(boolean enableSnapshot)voidsetHashFunction(HashFunction hashFunction)voidsetMetadataManagerClass(String metadataManagerClass)voidsetMetadataManagerConfigs(Map<String,String> metadataManagerConfigs)voidsetPartialUpsertStrategies(Map<String,UpsertConfig.Strategy> partialUpsertStrategies)PartialUpsertStrategies maintains the mapping of merge strategies per column.-
Methods inherited from class org.apache.pinot.spi.config.BaseJsonConfig
equals, hashCode, toJsonNode, toJsonString, toString
-
-
-
-
Constructor Detail
-
UpsertConfig
@Deprecated public UpsertConfig(UpsertConfig.Mode mode, @Nullable Map<String,UpsertConfig.Strategy> partialUpsertStrategies, @Nullable UpsertConfig.Strategy defaultPartialUpsertStrategy, @Nullable String comparisonColumn, @Nullable HashFunction hashFunction)
Deprecated.
-
UpsertConfig
public UpsertConfig(UpsertConfig.Mode mode)
-
UpsertConfig
public UpsertConfig()
-
-
Method Detail
-
getMode
public UpsertConfig.Mode getMode()
-
getHashFunction
public HashFunction getHashFunction()
-
getPartialUpsertStrategies
@Nullable public Map<String,UpsertConfig.Strategy> getPartialUpsertStrategies()
-
getDefaultPartialUpsertStrategy
public UpsertConfig.Strategy getDefaultPartialUpsertStrategy()
-
getComparisonColumn
public String getComparisonColumn()
-
isEnableSnapshot
public boolean isEnableSnapshot()
-
getMetadataManagerClass
@Nullable public String getMetadataManagerClass()
-
setHashFunction
public void setHashFunction(HashFunction hashFunction)
-
setPartialUpsertStrategies
public void setPartialUpsertStrategies(Map<String,UpsertConfig.Strategy> partialUpsertStrategies)
PartialUpsertStrategies maintains the mapping of merge strategies per column. Each key in the map is a columnName, value is a partial upsert merging strategy. Supported strategies are {OVERWRITE|INCREMENT|APPEND|UNION|IGNORE}.
-
setDefaultPartialUpsertStrategy
public void setDefaultPartialUpsertStrategy(UpsertConfig.Strategy defaultPartialUpsertStrategy)
If strategy is not specified for a column, the merger on that column will be "defaultPartialUpsertStrategy". The default value of defaultPartialUpsertStrategy is OVERWRITE.
-
setComparisonColumn
public void setComparisonColumn(String comparisonColumn)
By default, Pinot uses the value in the time column to determine the latest record. For two records with the same primary key, the record with the larger value of the time column is picked as the latest update. However, there are cases when users need to use another column to determine the order. In such case, you can use option comparisonColumn to override the column used for comparison.
-
setEnableSnapshot
public void setEnableSnapshot(boolean enableSnapshot)
-
setMetadataManagerClass
public void setMetadataManagerClass(String metadataManagerClass)
-
-