use of org.apache.inlong.manager.common.enums.SourceType in project incubator-inlong by apache.
the class InlongStreamSourceTransfer method parseStreamSource.
public static StreamSource parseStreamSource(SourceResponse sourceResponse) {
String type = sourceResponse.getSourceType();
SourceType sourceType = SourceType.forType(type);
if (sourceType == SourceType.KAFKA && sourceResponse instanceof KafkaSourceResponse) {
return parseKafkaSource((KafkaSourceResponse) sourceResponse);
}
if (sourceType == SourceType.BINLOG && sourceResponse instanceof BinlogSourceResponse) {
return parseMySQLBinlogSource((BinlogSourceResponse) sourceResponse);
}
throw new IllegalArgumentException(String.format("Unsupported source type : %s for Inlong", sourceType));
}
Aggregations