Search in sources :

Example 1 with StreamSink

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;
}
Also used : HiveSinkResponse(org.apache.inlong.manager.common.pojo.sink.hive.HiveSinkResponse) StreamSink(org.apache.inlong.manager.client.api.StreamSink) ClickHouseSinkResponse(org.apache.inlong.manager.common.pojo.sink.ck.ClickHouseSinkResponse) SinkType(org.apache.inlong.manager.common.enums.SinkType)

Aggregations

StreamSink (org.apache.inlong.manager.client.api.StreamSink)1 SinkType (org.apache.inlong.manager.common.enums.SinkType)1 ClickHouseSinkResponse (org.apache.inlong.manager.common.pojo.sink.ck.ClickHouseSinkResponse)1 HiveSinkResponse (org.apache.inlong.manager.common.pojo.sink.hive.HiveSinkResponse)1