[HUDI-1951] Add bucket hash index, compatible with the hive bucket (#3173)
* [HUDI-2154] Add index key field to HoodieKey * [HUDI-2157] Add the bucket index and its read/write implemention of Spark engine. * revert HUDI-2154 add index key field to HoodieKey * fix all comments and introduce a new tricky way to get index key at runtime support double insert for bucket index * revert spark read optimizer based on bucket index * add the storage layout * index tag, hash function and add ut * fix ut * address partial comments * Code review feedback * add layout config and docs * fix ut * rename hoodie.layout and rebase master Co-authored-by: Vinoth Chandar <vinoth@apache.org>
This commit is contained in:
@@ -139,6 +139,12 @@ public class HoodieConfig implements Serializable {
|
||||
return rawValue.map(v -> Integer.parseInt(v.toString())).orElse(null);
|
||||
}
|
||||
|
||||
public <T> Integer getIntOrDefault(ConfigProperty<T> configProperty) {
|
||||
Option<Object> rawValue = getRawValue(configProperty);
|
||||
return rawValue.map(v -> Integer.parseInt(v.toString()))
|
||||
.orElse((Integer) configProperty.defaultValue());
|
||||
}
|
||||
|
||||
public <T> Boolean getBoolean(ConfigProperty<T> configProperty) {
|
||||
Option<Object> rawValue = getRawValue(configProperty);
|
||||
return rawValue.map(v -> Boolean.parseBoolean(v.toString())).orElse(null);
|
||||
|
||||
Reference in New Issue
Block a user