Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vernedeng committed Apr 18, 2024
1 parent c90a326 commit 029541e
Show file tree
Hide file tree
Showing 23 changed files with 39 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.inlong.common.constant;

public class CompressionType {

public static final String GZIP = "GZIP";
public static final String SNAPPY = "SNAPPY";
public static final String LZO = "LZO";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.inlong.common.constant;

public class DataNodeType {

public static final String KAFKA = "KAFKA";
public static final String PULSAR = "PULSAR";
public static final String CLS = "CLS";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.inlong.common.constant;

public class DeserializationType {

public static final String INLONG_MSG = "INLONG_MSG";
public static final String INLONG_MSG_PB = "INLONG_MSG_PB";
public static final String CSV = "CSV";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.inlong.common.constant;

public class SinkType {

public static final String KAFKA = "KAFKA";
public static final String PULSAR = "PULSAR";
public static final String CLS = "CLS";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@

package org.apache.inlong.common.pojo.sort;

import lombok.Data;
import org.apache.inlong.common.pojo.sort.dataflow.DataflowConfig;
import org.apache.inlong.common.pojo.sort.mq.MqClusterConfig;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class SortClusterConfig implements Serializable {

private String clusterTag;
private List<MqClusterConfig> mqClusterConfigs;
private List<DataflowConfig> dataflowConfigs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

@Data
public class SortConfig implements Serializable {

private String sortClusterName;
private List<SortTaskConfig> clusters;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@

package org.apache.inlong.common.pojo.sort;

import lombok.Data;
import org.apache.inlong.common.pojo.sort.dataflow.node.NodeConfig;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class SortTaskConfig implements Serializable {

private String sortTaskName;
private List<SortClusterConfig> clusters;
private NodeConfig nodeConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@

package org.apache.inlong.common.pojo.sort.dataflow;

import lombok.Data;
import org.apache.inlong.common.pojo.sort.dataflow.sink.SinkConfig;

import lombok.Data;

import java.io.Serializable;
import java.util.Map;

@Data
public class DataflowConfig implements Serializable {

private String dataflowId;
private Integer version;
private SourceConfig sourceConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@

package org.apache.inlong.common.pojo.sort.dataflow;

import lombok.Data;
import org.apache.inlong.common.pojo.sort.dataflow.deserialization.DeserializationConfig;

import lombok.Data;

import java.io.Serializable;

@Data
public class SourceConfig implements Serializable {

private String topic;
private String subscription;
private DeserializationConfig deserializationConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

@Data
public class CsvDeserializationConfig implements DeserializationConfig {

private char delimiter;
private Character escapeChar;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@

package org.apache.inlong.common.pojo.sort.dataflow.deserialization;

import org.apache.inlong.common.constant.DeserializationType;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import org.apache.inlong.common.constant.DeserializationType;

import java.io.Serializable;

@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
property = "type")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes({
@JsonSubTypes.Type(value = InlongMsgDeserializationConfig.class, name = DeserializationType.INLONG_MSG),
@JsonSubTypes.Type(value = InlongMsgPbDeserialiationConfig.class, name = DeserializationType.INLONG_MSG_PB),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

@Data
public class InlongMsgDeserializationConfig implements DeserializationConfig {

private String streamId;
private DeserializationConfig innerDeserializationConfig;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

@Data
public class InlongMsgPbDeserialiationConfig implements DeserializationConfig {

private final String compressionType;
private DeserializationConfig innerDeserializationConfig;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

@Data
public class KvDeserializationConfig implements DeserializationConfig {

private char entrySplitter;
private char kvSplitter;
private String streamId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

@Data
public class EsNodeConfig extends NodeConfig {

private Integer bulkAction;
private Integer bulkSizeMb;
private Integer flushInterval;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@

package org.apache.inlong.common.pojo.sort.dataflow.node;

import org.apache.inlong.common.constant.DataNodeType;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.Data;
import org.apache.inlong.common.constant.DataNodeType;

import java.io.Serializable;

@Data
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
property = "type")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes({
@JsonSubTypes.Type(value = ClsNodeConfig.class, name = DataNodeType.CLS),
@JsonSubTypes.Type(value = EsNodeConfig.class, name = DataNodeType.ELASTICSEARCH),
@JsonSubTypes.Type(value = PulsarNodeConfig.class, name = DataNodeType.PULSAR),
})
public abstract class NodeConfig implements Serializable {

private Integer version;
private String nodeName;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

@Data
public class PulsarNodeConfig extends NodeConfig {

private String serviceUrl;
private String adminUrl;
private String token;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

@Data
public class EsSinkConfig extends SinkConfig {

private String indexNamePattern;
private Integer contentOffset;
private Integer fieldOffset;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
@EqualsAndHashCode(callSuper = true)
@Data
public class PulsarSinkConfig extends SinkConfig {

private String pulsarTenant;
private String namespace;
private String topic;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@

package org.apache.inlong.common.pojo.sort.dataflow.sink;

import org.apache.inlong.common.constant.SinkType;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.Data;
import org.apache.inlong.common.constant.SinkType;

import java.io.Serializable;

@Data
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
property = "type")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes({
@JsonSubTypes.Type(value = ClsSinkConfig.class, name = SinkType.CLS),
@JsonSubTypes.Type(value = EsSinkConfig.class, name = SinkType.ELASTICSEARCH),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@

package org.apache.inlong.common.pojo.sort.mq;

import org.apache.inlong.common.constant.MQType;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.Data;
import org.apache.inlong.common.constant.MQType;

import java.io.Serializable;

@Data
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
property = "type")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes({
@JsonSubTypes.Type(value = PulsarClusterConfig.class, name = MQType.PULSAR),
@JsonSubTypes.Type(value = TubeClusterConfig.class, name = MQType.TUBEMQ)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import lombok.Data;
import lombok.EqualsAndHashCode;


@EqualsAndHashCode(callSuper = true)
@Data
public class PulsarClusterConfig extends MqClusterConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
@EqualsAndHashCode(callSuper = true)
@Data
public class TubeClusterConfig extends MqClusterConfig {

private String masterAddress;
}

0 comments on commit 029541e

Please sign in to comment.