Skip to content

Commit 079bc1a

Browse files
committed
naming and doc
1 parent 6c1a763 commit 079bc1a

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieTTLConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ public HoodieTTLConfig.Builder withEventTimeSegmentStartIndex(int timeSegStartIn
163163
return this;
164164
}
165165

166-
public HoodieTTLConfig.Builder withEventTimeDeleteHiveDefaultPartition(boolean enable) {
167-
ttlConfig.setValue(EVENT_TIME_DELETE_HIVE_DEFAULT_PARTITION, Boolean.toString(enable));
166+
public HoodieTTLConfig.Builder withEventTimeDeleteHiveDefaultPartition(boolean deleteHiveDefaultPartition) {
167+
ttlConfig.setValue(EVENT_TIME_DELETE_HIVE_DEFAULT_PARTITION, Boolean.toString(deleteHiveDefaultPartition));
168168
return this;
169169
}
170170

hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/ttl/strategy/KeepByEventTimeStrategy.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,17 @@ static long resolveCutoffMillis(String instantTime, long ttlInMillis) {
199199
* the path) if the table contains partitions that don't conform to a single event-time shape.
200200
* <p>
201201
* Package-private so unit tests can exercise it directly without spinning up a HoodieTable.
202+
* <p>
203+
* Note the two trailing {@code boolean} flags are easy to transpose at call sites; keep them in
204+
* this order: {@code deleteHiveDefaultPartition} first, {@code hiveStylePartitioning} last.
205+
*
206+
* @param partitionPath the partition path to evaluate
207+
* @param formatter formatter built from the configured event-time format
208+
* @param timeSegStartIndex 0-based index of the first segment carrying the time block
209+
* @param segCount number of segments the time block spans
210+
* @param cutoffMillis partitions with event time strictly before this are expired
211+
* @param deleteHiveDefaultPartition treat a time block containing the Hive default marker as expired
212+
* @param hiveStylePartitioning whether segments carry a {@code field=value} prefix to strip
202213
*/
203214
static boolean isPartitionExpiredByEventTime(String partitionPath,
204215
DateTimeFormatter formatter,

0 commit comments

Comments
 (0)