Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INLONG-11674][Sort] Pulsar Source supports InlongMsg metadata #11691

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -168,7 +168,12 @@ public enum MetaField {
/**
* Inlong data time for audit.
*/
AUDIT_DATA_TIME;
AUDIT_DATA_TIME,

/**
* Inlong properties in InlongMsg.
*/
INLONG_PROPERTIES;

public static MetaField forName(String name) {
for (MetaField metaField : values()) {
Original file line number Diff line number Diff line change
@@ -78,6 +78,8 @@ public abstract class ExtractNode implements Node {

public static final String INLONG_MSG_AUDIT_TIME = "value.data-time";

public static final String INLONG_MSG_PROPERTIES = "value.inlong-msg-properties";

public static final String CONSUME_AUDIT_TIME = "consume_time";

@JsonProperty("id")
Original file line number Diff line number Diff line change
@@ -195,6 +195,9 @@ public String getMetadataKey(MetaField metaField) {
metadataKey = CONSUME_AUDIT_TIME;
}
break;
case INLONG_PROPERTIES:
metadataKey = INLONG_MSG_PROPERTIES;
break;
default:
throw new UnsupportedOperationException(String.format("Unsupported meta field for %s: %s",
this.getClass().getSimpleName(), metaField));
@@ -209,7 +212,7 @@ public boolean isVirtual(MetaField metaField) {

@Override
public Set<MetaField> supportedMetaFields() {
return EnumSet.of(MetaField.AUDIT_DATA_TIME);
return EnumSet.of(MetaField.AUDIT_DATA_TIME, MetaField.INLONG_PROPERTIES);
}

@Override