Skip to content

Commit f051154

Browse files
authored
[Chore] Remove useless DeserializationFormatFactory and its implement (#5880)
* [Format] Remove useless DeserializationFormatFactory and its implement * update * update
1 parent af2acb1 commit f051154

File tree

8 files changed

+4
-350
lines changed

8 files changed

+4
-350
lines changed

seatunnel-api/src/main/java/org/apache/seatunnel/api/table/factory/DeserializationFormatFactory.java

Lines changed: 0 additions & 24 deletions
This file was deleted.

seatunnel-connectors-v2/connector-pulsar/src/main/java/org/apache/seatunnel/connectors/seatunnel/pulsar/config/SourceProperties.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
import org.apache.seatunnel.api.configuration.Option;
2323
import org.apache.seatunnel.api.configuration.Options;
24-
import org.apache.seatunnel.format.json.JsonFormatFactory;
2524

2625
public class SourceProperties {
2726

@@ -181,7 +180,7 @@ public class SourceProperties {
181180
public static final Option<String> FORMAT =
182181
Options.key("format")
183182
.stringType()
184-
.defaultValue(JsonFormatFactory.IDENTIFIER)
183+
.defaultValue("JSON")
185184
.withDescription(
186185
"Data format. The default format is json. Optional text format. The default field separator is \", \". "
187186
+ "If you customize the delimiter, add the \"field_delimiter\" option.");

seatunnel-connectors-v2/connector-pulsar/src/main/java/org/apache/seatunnel/connectors/seatunnel/pulsar/source/PulsarSource.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@
5353
import org.apache.seatunnel.connectors.seatunnel.pulsar.source.reader.PulsarSourceReader;
5454
import org.apache.seatunnel.connectors.seatunnel.pulsar.source.split.PulsarPartitionSplit;
5555
import org.apache.seatunnel.format.json.JsonDeserializationSchema;
56-
import org.apache.seatunnel.format.json.JsonFormatFactory;
5756
import org.apache.seatunnel.format.json.canal.CanalJsonDeserializationSchema;
58-
import org.apache.seatunnel.format.json.canal.CanalJsonFormatFactory;
5957
import org.apache.seatunnel.format.json.exception.SeaTunnelJsonFormatException;
6058

6159
import org.apache.pulsar.shade.org.apache.commons.lang3.StringUtils;
@@ -307,11 +305,11 @@ private void setDeserialization(Config config) {
307305
if (config.hasPath(FORMAT.key())) {
308306
format = config.getString(FORMAT.key());
309307
}
310-
switch (format) {
311-
case JsonFormatFactory.IDENTIFIER:
308+
switch (format.toUpperCase()) {
309+
case "JSON":
312310
deserializationSchema = new JsonDeserializationSchema(false, false, typeInfo);
313311
break;
314-
case CanalJsonFormatFactory.IDENTIFIER:
312+
case "CANAL_JSON":
315313
deserializationSchema =
316314
new PulsarCanalDecorator(
317315
CanalJsonDeserializationSchema.builder(typeInfo)

seatunnel-formats/seatunnel-format-json/src/main/java/org/apache/seatunnel/format/json/JsonFormatFactory.java

Lines changed: 0 additions & 72 deletions
This file was deleted.

seatunnel-formats/seatunnel-format-json/src/main/java/org/apache/seatunnel/format/json/canal/CanalJsonFormatFactory.java

Lines changed: 0 additions & 78 deletions
This file was deleted.

seatunnel-formats/seatunnel-format-json/src/main/java/org/apache/seatunnel/format/json/debezium/DebeziumJsonFormatFactory.java

Lines changed: 0 additions & 70 deletions
This file was deleted.

seatunnel-formats/seatunnel-format-json/src/main/java/org/apache/seatunnel/format/json/ogg/OggJsonFormatFactory.java

Lines changed: 0 additions & 78 deletions
This file was deleted.

seatunnel-formats/seatunnel-format-json/src/main/resources/META-INF/services/org.apache.seatunnel.api.table.factory.Factory

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)