LvJiancheng commented on code in PR #4211:
URL: https://github.com/apache/incubator-inlong/pull/4211#discussion_r875676944
##########
inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/util/InlongStreamSinkTransfer.java:
##########
@@ -207,6 +212,65 @@ private static StreamSink parseKafkaSink(KafkaSinkResponse
sinkResponse, StreamS
return kafkaSink;
}
+ private static SinkRequest createHbaseRequest(StreamSink streamSink,
InlongStreamInfo streamInfo) {
+ HbaseSinkRequest hbaseSinkRequest = new HbaseSinkRequest();
+ HbaseSink hbaseSink = (HbaseSink) streamSink;
+ hbaseSinkRequest.setInlongGroupId(streamInfo.getInlongGroupId());
+ hbaseSinkRequest.setInlongStreamId(streamInfo.getInlongStreamId());
+ hbaseSinkRequest.setNameSpace(hbaseSink.getNameSpace());
+ hbaseSinkRequest.setTableName(hbaseSink.getTableName());
+ hbaseSinkRequest.setRowKey(hbaseSink.getRowKey());
+ hbaseSinkRequest.setZookeeperQuorum(hbaseSink.getZookeeperQuorum());
+
hbaseSinkRequest.setZookeeperZnodeParent(hbaseSink.getZookeeperZnodeParent());
+
hbaseSinkRequest.setSinkBufferFlushInterval(hbaseSink.getSinkBufferFlushInterval());
+
hbaseSinkRequest.setSinkBufferFlushMaxRows(hbaseSink.getSinkBufferFlushMaxRows());
+
hbaseSinkRequest.setSinkBufferFlushMaxSize(hbaseSink.getSinkBufferFlushMaxSize());
+ hbaseSinkRequest.setSinkType(hbaseSink.getSinkType().name());
+ hbaseSinkRequest.setEnableCreateResource(hbaseSink.isNeedCreated() ? 1
: 0);
+ hbaseSinkRequest.setProperties(hbaseSink.getProperties());
+ if (CollectionUtils.isNotEmpty(hbaseSink.getSinkFields())) {
+ List<SinkFieldRequest> fieldRequests =
createSinkFieldRequests(hbaseSink.getSinkFields());
+ hbaseSinkRequest.setFieldList(fieldRequests);
+ }
+ return hbaseSinkRequest;
+
+ }
+
+ private static StreamSink parseHbaseSink(HbaseSinkResponse sinkResponse,
StreamSink sink) {
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]