Skip to content

Commit

Permalink
[Fix] [sink elasticsearch] Fix the issue of sink-es saveMode and es a…
Browse files Browse the repository at this point in the history
…utomatic index creation conflict apache#7430
  • Loading branch information
jw-itq committed Aug 21, 2024
1 parent bee448a commit f8b5470
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,5 @@ public enum DataSaveMode {
CUSTOM_PROCESSING,

// When there exist data, an error will be reported
ERROR_WHEN_DATA_EXISTS,

// Ignore
IGNORE
ERROR_WHEN_DATA_EXISTS
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ public void handleDataSaveMode() {
case ERROR_WHEN_DATA_EXISTS:
errorWhenDataExists();
break;
case IGNORE:
break;
default:
throw new UnsupportedOperationException("Unsupported save mode: " + dataSaveMode);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import static org.apache.seatunnel.api.sink.DataSaveMode.APPEND_DATA;
import static org.apache.seatunnel.api.sink.DataSaveMode.DROP_DATA;
import static org.apache.seatunnel.api.sink.DataSaveMode.ERROR_WHEN_DATA_EXISTS;
import static org.apache.seatunnel.api.sink.DataSaveMode.IGNORE;

public class SinkConfig {

Expand Down Expand Up @@ -81,7 +80,7 @@ public class SinkConfig {
Options.key("data_save_mode")
.singleChoice(
DataSaveMode.class,
Arrays.asList(DROP_DATA, APPEND_DATA, ERROR_WHEN_DATA_EXISTS, IGNORE))
Arrays.asList(DROP_DATA, APPEND_DATA, ERROR_WHEN_DATA_EXISTS))
.defaultValue(APPEND_DATA)
.withDescription("data_save_mode");
}

0 comments on commit f8b5470

Please sign in to comment.