|
39 | 39 | * (last commit time) and {@link KeepByCreationTimeStrategy} (creation commit time). |
40 | 40 | * |
41 | 41 | * <h3>Supported path shapes</h3> |
42 | | - * The first-class, tested shapes are day and hour granularity, configured via |
43 | | - * {@link org.apache.hudi.config.HoodieTTLConfig#EVENT_TIME_FORMAT}. Each example shows the |
44 | | - * partition path on the left and the required {@code startIndex} on the right (see |
| 42 | + * The first-class, tested shapes are day and hour granularity. Each example shows the partition |
| 43 | + * path on the left and the required {@code startIndex} on the right (see |
45 | 44 | * <i>Locating the time block</i> below); non-time segments may appear before and/or after the |
46 | 45 | * time block. |
47 | 46 | * <ul> |
|
90 | 89 | * |
91 | 90 | * <h3>Locating the time block</h3> |
92 | 91 | * The time block must occupy a <i>contiguous</i> segment range of the partition path. Only the |
93 | | - * segments before it count toward |
94 | | - * {@link org.apache.hudi.config.HoodieTTLConfig#EVENT_TIME_PARTITION_START_INDEX}; segments after |
95 | | - * are ignored. Interleaved layouts such as {@code dt=20260627/source=app/hh=12} are not |
96 | | - * supported -- the time block must be in one piece. |
| 92 | + * segments before it count toward {@code startIndex}; segments after are ignored. Interleaved |
| 93 | + * layouts such as {@code dt=20260627/source=app/hh=12} are not supported -- the time block must |
| 94 | + * be in one piece. |
97 | 95 | * |
98 | 96 | * <h3>Time zone</h3> |
99 | 97 | * Both the partition's event time and the cutoff derived from {@code instantTime} are interpreted |
100 | 98 | * in UTC. Set {@code hoodie.table.timeline.timezone=UTC} so the timeline writes instants under the |
101 | 99 | * same convention; otherwise the cutoff drifts by the JVM's UTC offset -- a boundary effect at |
102 | 100 | * day granularity, a full-offset shift at hour granularity. |
| 101 | + * |
| 102 | + * <h3>Configuration</h3> |
| 103 | + * All three knobs come with defaults, so a table whose partition path is purely a date in |
| 104 | + * {@code yyyy-MM-dd} form works out of the box. |
| 105 | + * <ul> |
| 106 | + * <li>{@link org.apache.hudi.config.HoodieTTLConfig#EVENT_TIME_FORMAT} — date-time pattern of |
| 107 | + * the time block in the partition path. Default {@code yyyy-MM-dd}. A {@code /} in the |
| 108 | + * pattern means the time block spans that many consecutive segments.</li> |
| 109 | + * <li>{@link org.apache.hudi.config.HoodieTTLConfig#EVENT_TIME_PARTITION_START_INDEX} — |
| 110 | + * 0-based index of the first segment that carries the time block. Default {@code 0}. |
| 111 | + * Raise it when non-time segments come before the time block (see examples above).</li> |
| 112 | + * <li>{@link org.apache.hudi.config.HoodieTTLConfig#EVENT_TIME_DELETE_HIVE_DEFAULT_PARTITION} — |
| 113 | + * whether to treat partitions containing {@code __HIVE_DEFAULT_PARTITION__} (i.e. data |
| 114 | + * whose event-time column was {@code NULL}) as expired. Default {@code false}, i.e. such |
| 115 | + * partitions are skipped with a WARN and the user keeps explicit control over them.</li> |
| 116 | + * </ul> |
103 | 117 | */ |
104 | 118 | @Slf4j |
105 | 119 | public class KeepByEventTimeStrategy extends KeepByTimeStrategy { |
|
0 commit comments