use of org.apache.inlong.manager.client.api.StreamSink in project incubator-inlong by apache.
the class InlongStreamSinkTransfer method parseStreamSink.
public static StreamSink parseStreamSink(SinkResponse sinkResponse, StreamSink streamSink) {
String type = sinkResponse.getSinkType();
SinkType sinkType = SinkType.forType(type);
StreamSink streamSinkResult;
if (sinkType == SinkType.HIVE) {
streamSinkResult = parseHiveSink((HiveSinkResponse) sinkResponse, streamSink);
} else if (sinkType == SinkType.KAFKA) {
streamSinkResult = parseKafkaSink((KafkaSinkResponse) sinkResponse, streamSink);
} else if (sinkType == SinkType.CLICKHOUSE) {
streamSinkResult = parseClickHouseSink((ClickHouseSinkResponse) sinkResponse, streamSink);
} else {
throw new IllegalArgumentException(String.format("Unsupport sink type : %s for Inlong", sinkType));
}
return streamSinkResult;
}
Aggregations