Skip to content

Commit

Permalink
[Feature][Transform-v2] Add metadata transform
Browse files Browse the repository at this point in the history
  • Loading branch information
hawk9821 committed Nov 5, 2024
1 parent 174fc8a commit 8f361da
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,34 @@ public enum CommonOptions {
/**
* The key of {@link Column#getOptions()} to specify the column value is a json format string.
*/
JSON("Json", 0),
JSON("Json", false),
/** The key of {@link Column#getOptions()} to specify the column value is a metadata field. */
METADATA("Metadata", 0),
METADATA("Metadata", false),
/**
* The key of {@link SeaTunnelRow#getOptions()} to store the partition value of the row value.
*/
PARTITION("Partition", 1),
PARTITION("Partition", true),
/**
* The key of {@link SeaTunnelRow#getOptions()} to store the DATABASE value of the row value.
*/
DATABASE("Database", 1),
DATABASE("Database", true),
/** The key of {@link SeaTunnelRow#getOptions()} to store the TABLE value of the row value. */
TABLE("Table", 1),
TABLE("Table", true),
/**
* The key of {@link SeaTunnelRow#getOptions()} to store the ROW_KIND value of the row value.
*/
ROW_KIND("RowKind", 1),
ROW_KIND("RowKind", true),
/**
* The key of {@link SeaTunnelRow#getOptions()} to store the EVENT_TIME value of the row value.
*/
EVENT_TIME("EventTime", 1),
EVENT_TIME("EventTime", true),
/** The key of {@link SeaTunnelRow#getOptions()} to store the DELAY value of the row value. */
DELAY("Delay", 1);
DELAY("Delay", true);

private final String name;
private final int supportMetadataTrans;
private final boolean supportMetadataTrans;

CommonOptions(String name, int supportMetadataTrans) {
CommonOptions(String name, boolean supportMetadataTrans) {
this.name = name;
this.supportMetadataTrans = supportMetadataTrans;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class MetadataUtil {
static {
METADATA_FIELDS = new ArrayList<>();
Stream.of(CommonOptions.values())
.filter(v -> v.getSupportMetadataTrans() == 1)
.filter(CommonOptions::isSupportMetadataTrans)
.map(CommonOptions::getName)
.forEach(METADATA_FIELDS::add);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private GenericContainer<?> createSeaTunnelServer() throws IOException, Interrup
"seatunnel-engine:" + JDK_DOCKER_IMAGE)))
.waitingFor(Wait.forLogMessage(".*received new worker register:.*", 1));
copySeaTunnelStarterToContainer(server);
server.setPortBindings(Collections.singletonList("5801:5801"));
server.setPortBindings(Arrays.asList("5801:5801", "8080:8080"));
server.withCopyFileToContainer(
MountableFile.forHostPath(
PROJECT_ROOT_PATH
Expand Down

0 comments on commit 8f361da

Please sign in to comment.