vernedeng commented on code in PR #6294:
URL: https://github.com/apache/inlong/pull/6294#discussion_r1008997624


##########
inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/sort/SortServiceImplTest.java:
##########
@@ -295,22 +306,19 @@ private void preparePulsar(String pulsarName, boolean 
isConsumable, String tag)
     }
 
     private void prepareTask(String taskName, String groupId, String 
clusterName) {
-        StreamSinkEntity entity = new StreamSinkEntity();
-        entity.setInlongGroupId(groupId);
-        entity.setInlongStreamId("1");
-        entity.setSinkType(TEST_SINK_TYPE);
-        entity.setSinkName(taskName);
-        entity.setInlongClusterName(clusterName);
-        entity.setDataNodeName(taskName);
-        entity.setSortTaskName(taskName);
-        entity.setCreator(TEST_CREATOR);
-        Date now = new Date();
-        entity.setCreateTime(now);
-        entity.setModifyTime(now);
-        entity.setIsDeleted(InlongConstants.UN_DELETED);
-        entity.setVersion(InlongConstants.INITIAL_VERSION);
-        entity.setExtParams("{\"delimiter\":\"|\",\"dataType\":\"text\"}");
-        streamSinkEntityMapper.insert(entity);
+        SinkRequest request = new HiveSinkRequest();
+        request.setDataNodeName(taskName);
+        request.setSinkType(SinkType.HIVE);
+        request.setInlongClusterName(clusterName);
+        request.setSinkName(taskName);
+        request.setSortTaskName(taskName);
+        request.setInlongGroupId(groupId);
+        request.setInlongStreamId("1");
+        Map<String, Object> properties = new HashMap<>();
+        properties.put("delimiter", "|");
+        properties.put("dataType", "text");
+        request.setProperties(properties);
+        streamSinkService.save(request, TEST_CREATOR);
     }
 
 }

Review Comment:
   fixed, thx



##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sink/AbstractSinkOperator.java:
##########
@@ -213,6 +217,23 @@ public void deleteOpt(StreamSinkEntity entity, String 
operator) {
         sinkFieldMapper.logicDeleteAll(entity.getId());
     }
 
+    @Override
+    public Map<String, String> parse2IdParams(StreamSinkEntity streamSink, 
List<String> fields) {
+        Map<String, String> param;
+        try {
+            param = objectMapper.readValue(streamSink.getExtParams(), 
Map.class);

Review Comment:
   fixed, thx



-- 
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]

Reply via email to