lokeshj1703 commented on code in PR #7881:
URL: https://github.com/apache/hudi/pull/7881#discussion_r1159555233
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java:
##########
@@ -194,16 +188,18 @@ public class HoodieWriteConfig extends HoodieConfig {
public static final ConfigProperty<String> TIMELINE_LAYOUT_VERSION_NUM =
ConfigProperty
.key("hoodie.timeline.layout.version")
- .defaultValue(Integer.toString(TimelineLayoutVersion.VERSION_1))
+ .defaultValue(Integer.toString(TimelineLayoutVersion.CURR_VERSION))
+
.withValidValues(Integer.toString(TimelineLayoutVersion.VERSION_0),Integer.toString(TimelineLayoutVersion.VERSION_1))
.sinceVersion("0.5.1")
.withDocumentation("Controls the layout of the timeline. Version 0
relied on renames, Version 1 (default) models "
+ "the timeline as an immutable log relying only on atomic writes
for object storage.");
public static final ConfigProperty<HoodieFileFormat> BASE_FILE_FORMAT =
ConfigProperty
.key("hoodie.table.base.file.format")
.defaultValue(HoodieFileFormat.PARQUET)
- .withAlternatives("hoodie.table.ro.file.format")
- .withDocumentation("Base file format to store all the base file data.");
+ .withValidValues(HoodieFileFormat.PARQUET.name(),
HoodieFileFormat.ORC.name(), HoodieFileFormat.HFILE.name())
+ .withEnumDocumentation(HoodieFileFormat.class, "File format to store all
the base file data.", "HFILE")
Review Comment:
Addressed
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieClusteringConfig.java:
##########
@@ -677,95 +664,43 @@ private String
getDefaultExecutionStrategyClassName(EngineType engineType) {
/**
* Type of a strategy for building Z-order/Hilbert space-filling curves.
*/
+ @EnumDescription("Type of a strategy for building Z-order/Hilbert
space-filling curves.")
public enum SpatialCurveCompositionStrategyType {
- DIRECT("direct"),
- SAMPLE("sample");
- private static final Map<String, SpatialCurveCompositionStrategyType>
VALUE_TO_ENUM_MAP =
- TypeUtils.getValueToEnumMap(SpatialCurveCompositionStrategyType.class,
e -> e.value);
-
- private final String value;
-
- SpatialCurveCompositionStrategyType(String value) {
- this.value = value;
- }
+ @EnumFieldDescription("Faster than sampling, but produces a worse(?)
layout. NEEDS BETTER DESCRIPTION")
+ DIRECT,
- public static SpatialCurveCompositionStrategyType fromValue(String value) {
- SpatialCurveCompositionStrategyType enumValue =
VALUE_TO_ENUM_MAP.get(value);
- if (enumValue == null) {
- throw new HoodieException(String.format("Invalid value (%s)", value));
- }
-
- return enumValue;
- }
+ @EnumFieldDescription("Slower than sampling, but produces a better(?)
layout. NEEDS BETTER DESCRIPTION")
+ SAMPLE
}
/**
* Layout optimization strategies such as Z-order/Hilbert space-curves, etc
*/
+ @EnumDescription("Determines ordering strategy for records layout
optimization")
public enum LayoutOptimizationStrategy {
- LINEAR("linear"),
- ZORDER("z-order"),
- HILBERT("hilbert");
-
- private static final Map<String, LayoutOptimizationStrategy>
VALUE_TO_ENUM_MAP =
- TypeUtils.getValueToEnumMap(LayoutOptimizationStrategy.class, e ->
e.value);
-
- private final String value;
-
- LayoutOptimizationStrategy(String value) {
- this.value = value;
- }
- @Nonnull
- public static LayoutOptimizationStrategy fromValue(String value) {
- LayoutOptimizationStrategy enumValue = VALUE_TO_ENUM_MAP.get(value);
- if (enumValue == null) {
- throw new HoodieException(String.format("Invalid value (%s)", value));
- }
+ @EnumFieldDescription("Order records lexicographically.")
+ LINEAR,
- return enumValue;
- }
+ @EnumFieldDescription("Order records along Z-order spatial-curve")
+ ZORDER,
- public String getValue() {
- return value;
- }
+ @EnumFieldDescription("Order records along Hilbert's spatial-curve")
+ HILBERT
}
+ @EnumDescription("Clustering Operator ADD DESCRIPTION")
Review Comment:
Addressed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]