|
21 | 21 | import org.apache.paimon.annotation.Documentation; |
22 | 22 | import org.apache.paimon.annotation.Documentation.ExcludeFromDocumentation; |
23 | 23 | import org.apache.paimon.annotation.Documentation.Immutable; |
24 | | -import org.apache.paimon.annotation.VisibleForTesting; |
25 | 24 | import org.apache.paimon.compression.CompressOptions; |
26 | 25 | import org.apache.paimon.fileindex.FileIndexOptions; |
27 | 26 | import org.apache.paimon.fs.Path; |
@@ -969,42 +968,6 @@ public InlineElement getDescription() { |
969 | 968 | .withDescription( |
970 | 969 | "The delay duration of stream read when scan incremental snapshots."); |
971 | 970 |
|
972 | | - @ExcludeFromDocumentation("Confused without log system") |
973 | | - public static final ConfigOption<LogConsistency> LOG_CONSISTENCY = |
974 | | - key("log.consistency") |
975 | | - .enumType(LogConsistency.class) |
976 | | - .defaultValue(LogConsistency.TRANSACTIONAL) |
977 | | - .withDescription("Specify the log consistency mode for table."); |
978 | | - |
979 | | - @ExcludeFromDocumentation("Confused without log system") |
980 | | - public static final ConfigOption<LogChangelogMode> LOG_CHANGELOG_MODE = |
981 | | - key("log.changelog-mode") |
982 | | - .enumType(LogChangelogMode.class) |
983 | | - .defaultValue(LogChangelogMode.AUTO) |
984 | | - .withDescription("Specify the log changelog mode for table."); |
985 | | - |
986 | | - @ExcludeFromDocumentation("Confused without log system") |
987 | | - public static final ConfigOption<String> LOG_KEY_FORMAT = |
988 | | - key("log.key.format") |
989 | | - .stringType() |
990 | | - .defaultValue("json") |
991 | | - .withDescription( |
992 | | - "Specify the key message format of log system with primary key."); |
993 | | - |
994 | | - @ExcludeFromDocumentation("Confused without log system") |
995 | | - public static final ConfigOption<String> LOG_FORMAT = |
996 | | - key("log.format") |
997 | | - .stringType() |
998 | | - .defaultValue("debezium-json") |
999 | | - .withDescription("Specify the message format of log system."); |
1000 | | - |
1001 | | - @ExcludeFromDocumentation("Confused without log system") |
1002 | | - public static final ConfigOption<Boolean> LOG_IGNORE_DELETE = |
1003 | | - key("log.ignore-delete") |
1004 | | - .booleanType() |
1005 | | - .defaultValue(false) |
1006 | | - .withDescription("Specify whether the log system ignores delete records."); |
1007 | | - |
1008 | 971 | public static final ConfigOption<Boolean> AUTO_CREATE = |
1009 | 972 | key("auto-create") |
1010 | 973 | .booleanType() |
@@ -1272,13 +1235,6 @@ public InlineElement getDescription() { |
1272 | 1235 | "Only used to force TableScan to construct suitable 'StartingUpScanner' and 'FollowUpScanner' " |
1273 | 1236 | + "dedicated internal streaming scan."); |
1274 | 1237 |
|
1275 | | - public static final ConfigOption<StreamingReadMode> STREAMING_READ_MODE = |
1276 | | - key("streaming-read-mode") |
1277 | | - .enumType(StreamingReadMode.class) |
1278 | | - .noDefaultValue() |
1279 | | - .withDescription( |
1280 | | - "The mode of streaming read that specifies to read the data of table file or log."); |
1281 | | - |
1282 | 1238 | @ExcludeFromDocumentation("Internal use only") |
1283 | 1239 | public static final ConfigOption<BatchScanMode> BATCH_SCAN_MODE = |
1284 | 1240 | key("batch-scan-mode") |
@@ -2770,10 +2726,6 @@ public boolean scanPlanSortPartition() { |
2770 | 2726 | } |
2771 | 2727 |
|
2772 | 2728 | public StartupMode startupMode() { |
2773 | | - return startupMode(options); |
2774 | | - } |
2775 | | - |
2776 | | - public static StartupMode startupMode(Options options) { |
2777 | 2729 | StartupMode mode = options.get(SCAN_MODE); |
2778 | 2730 | if (mode == StartupMode.DEFAULT) { |
2779 | 2731 | if (options.getOptional(SCAN_TIMESTAMP_MILLIS).isPresent() |
@@ -3001,10 +2953,6 @@ public Integer fullCompactionDeltaCommits() { |
3001 | 2953 | return options.get(FULL_COMPACTION_DELTA_COMMITS); |
3002 | 2954 | } |
3003 | 2955 |
|
3004 | | - public static StreamingReadMode streamReadType(Options options) { |
3005 | | - return options.get(STREAMING_READ_MODE); |
3006 | | - } |
3007 | | - |
3008 | 2956 | public Duration consumerExpireTime() { |
3009 | 2957 | return options.get(CONSUMER_EXPIRATION_TIME); |
3010 | 2958 | } |
@@ -3471,67 +3419,6 @@ public InlineElement getDescription() { |
3471 | 3419 | } |
3472 | 3420 | } |
3473 | 3421 |
|
3474 | | - /** Specifies the log consistency mode for table. */ |
3475 | | - public enum LogConsistency implements DescribedEnum { |
3476 | | - TRANSACTIONAL( |
3477 | | - "transactional", |
3478 | | - "Only the data after the checkpoint can be seen by readers, the latency depends on checkpoint interval."), |
3479 | | - |
3480 | | - EVENTUAL( |
3481 | | - "eventual", |
3482 | | - "Immediate data visibility, you may see some intermediate states, " |
3483 | | - + "but eventually the right results will be produced, only works for table with primary key."); |
3484 | | - |
3485 | | - private final String value; |
3486 | | - private final String description; |
3487 | | - |
3488 | | - LogConsistency(String value, String description) { |
3489 | | - this.value = value; |
3490 | | - this.description = description; |
3491 | | - } |
3492 | | - |
3493 | | - @Override |
3494 | | - public String toString() { |
3495 | | - return value; |
3496 | | - } |
3497 | | - |
3498 | | - @Override |
3499 | | - public InlineElement getDescription() { |
3500 | | - return text(description); |
3501 | | - } |
3502 | | - } |
3503 | | - |
3504 | | - /** Specifies the log changelog mode for table. */ |
3505 | | - public enum LogChangelogMode implements DescribedEnum { |
3506 | | - AUTO("auto", "Upsert for table with primary key, all for table without primary key."), |
3507 | | - |
3508 | | - ALL("all", "The log system stores all changes including UPDATE_BEFORE."), |
3509 | | - |
3510 | | - UPSERT( |
3511 | | - "upsert", |
3512 | | - "The log system does not store the UPDATE_BEFORE changes, the log consumed job" |
3513 | | - + " will automatically add the normalized node, relying on the state" |
3514 | | - + " to generate the required update_before."); |
3515 | | - |
3516 | | - private final String value; |
3517 | | - private final String description; |
3518 | | - |
3519 | | - LogChangelogMode(String value, String description) { |
3520 | | - this.value = value; |
3521 | | - this.description = description; |
3522 | | - } |
3523 | | - |
3524 | | - @Override |
3525 | | - public String toString() { |
3526 | | - return value; |
3527 | | - } |
3528 | | - |
3529 | | - @Override |
3530 | | - public InlineElement getDescription() { |
3531 | | - return text(description); |
3532 | | - } |
3533 | | - } |
3534 | | - |
3535 | 3422 | /** Specifies the changelog producer for table. */ |
3536 | 3423 | public enum ChangelogProducer implements DescribedEnum { |
3537 | 3424 | NONE("none", "No changelog file."), |
@@ -3563,49 +3450,6 @@ public InlineElement getDescription() { |
3563 | 3450 | } |
3564 | 3451 | } |
3565 | 3452 |
|
3566 | | - /** Specifies the type for streaming read. */ |
3567 | | - public enum StreamingReadMode implements DescribedEnum { |
3568 | | - LOG("log", "Read from the data of table log store."), |
3569 | | - FILE("file", "Read from the data of table file store."); |
3570 | | - |
3571 | | - private final String value; |
3572 | | - private final String description; |
3573 | | - |
3574 | | - StreamingReadMode(String value, String description) { |
3575 | | - this.value = value; |
3576 | | - this.description = description; |
3577 | | - } |
3578 | | - |
3579 | | - @Override |
3580 | | - public String toString() { |
3581 | | - return value; |
3582 | | - } |
3583 | | - |
3584 | | - @Override |
3585 | | - public InlineElement getDescription() { |
3586 | | - return text(description); |
3587 | | - } |
3588 | | - |
3589 | | - public String getValue() { |
3590 | | - return value; |
3591 | | - } |
3592 | | - |
3593 | | - @VisibleForTesting |
3594 | | - public static StreamingReadMode fromValue(String value) { |
3595 | | - for (StreamingReadMode formatType : StreamingReadMode.values()) { |
3596 | | - if (formatType.value.equals(value)) { |
3597 | | - return formatType; |
3598 | | - } |
3599 | | - } |
3600 | | - throw new IllegalArgumentException( |
3601 | | - String.format( |
3602 | | - "Invalid format type %s, only support [%s]", |
3603 | | - value, |
3604 | | - StringUtils.join( |
3605 | | - Arrays.stream(StreamingReadMode.values()).iterator(), ","))); |
3606 | | - } |
3607 | | - } |
3608 | | - |
3609 | 3453 | /** Inner stream scan mode for some internal requirements. */ |
3610 | 3454 | public enum StreamScanMode implements DescribedEnum { |
3611 | 3455 | NONE("none", "No requirement."), |
|
0 commit comments