29
29
import org .apache .inlong .manager .common .auth .DefaultAuthentication ;
30
30
import org .apache .inlong .manager .common .beans .Response ;
31
31
import org .apache .inlong .manager .common .pojo .cluster .ClusterRequest ;
32
+ import org .apache .inlong .manager .common .pojo .cluster .pulsar .PulsarClusterRequest ;
32
33
import org .apache .inlong .manager .common .pojo .group .InlongGroupExtInfo ;
33
34
import org .apache .inlong .manager .common .pojo .group .InlongGroupInfo ;
34
35
import org .apache .inlong .manager .common .pojo .group .InlongGroupListResponse ;
35
- import org .apache .inlong .manager .common .pojo .group .InlongGroupRequest ;
36
36
import org .apache .inlong .manager .common .pojo .group .InlongGroupResetRequest ;
37
37
import org .apache .inlong .manager .common .pojo .group .pulsar .InlongPulsarInfo ;
38
+ import org .apache .inlong .manager .common .pojo .group .pulsar .InlongPulsarRequest ;
38
39
import org .apache .inlong .manager .common .pojo .sink .SinkListResponse ;
39
40
import org .apache .inlong .manager .common .pojo .sink .StreamSink ;
40
41
import org .apache .inlong .manager .common .pojo .sink .ck .ClickHouseSink ;
48
49
import org .apache .inlong .manager .common .pojo .sink .kafka .KafkaSink ;
49
50
import org .apache .inlong .manager .common .pojo .sink .kafka .KafkaSinkListResponse ;
50
51
import org .apache .inlong .manager .common .pojo .sink .postgres .PostgresSinkListResponse ;
51
- import org .apache .inlong .manager .common .pojo .source .SourceListResponse ;
52
52
import org .apache .inlong .manager .common .pojo .source .StreamSource ;
53
53
import org .apache .inlong .manager .common .pojo .source .autopush .AutoPushSource ;
54
- import org .apache .inlong .manager .common .pojo .source .autopush .AutoPushSourceListResponse ;
55
54
import org .apache .inlong .manager .common .pojo .source .file .FileSource ;
56
- import org .apache .inlong .manager .common .pojo .source .file .FileSourceListResponse ;
57
55
import org .apache .inlong .manager .common .pojo .source .kafka .KafkaSource ;
58
- import org .apache .inlong .manager .common .pojo .source .kafka .KafkaSourceListResponse ;
59
56
import org .apache .inlong .manager .common .pojo .source .mysql .MySQLBinlogSource ;
60
- import org .apache .inlong .manager .common .pojo .source .mysql .MySQLBinlogSourceListResponse ;
61
57
import org .apache .inlong .manager .common .pojo .stream .InlongStreamInfo ;
62
58
import org .apache .inlong .manager .common .pojo .stream .InlongStreamResponse ;
63
59
import org .apache .inlong .manager .common .pojo .stream .StreamField ;
@@ -154,9 +150,9 @@ void testListGroup4AutoPushSource() {
154
150
.id (1 )
155
151
.inlongGroupId ("1" )
156
152
.name ("name" )
157
- .sourceResponses (
153
+ .streamSources (
158
154
Lists .newArrayList (
159
- AutoPushSourceListResponse .builder ()
155
+ AutoPushSource .builder ()
160
156
.id (22 )
161
157
.inlongGroupId ("1" )
162
158
.inlongStreamId ("2" )
@@ -186,9 +182,9 @@ void testListGroup4BinlogSource() {
186
182
.id (1 )
187
183
.inlongGroupId ("1" )
188
184
.name ("name" )
189
- .sourceResponses (
185
+ .streamSources (
190
186
Lists .newArrayList (
191
- MySQLBinlogSourceListResponse .builder ()
187
+ MySQLBinlogSource .builder ()
192
188
.id (22 )
193
189
.inlongGroupId ("1" )
194
190
.inlongStreamId ("2" )
@@ -226,9 +222,9 @@ void testListGroup4FileSource() {
226
222
.status (1 )
227
223
.createTime (new Date ())
228
224
.modifyTime (new Date ())
229
- .sourceResponses (
225
+ .streamSources (
230
226
Lists .newArrayList (
231
- FileSourceListResponse .builder ()
227
+ FileSource .builder ()
232
228
.id (22 )
233
229
.inlongGroupId ("1" )
234
230
.inlongStreamId ("2" )
@@ -259,9 +255,9 @@ void testListGroup4KafkaSource() {
259
255
InlongGroupListResponse .builder ()
260
256
.id (1 )
261
257
.inlongGroupId ("1" )
262
- .sourceResponses (
258
+ .streamSources (
263
259
Lists .newArrayList (
264
- KafkaSourceListResponse .builder ()
260
+ KafkaSource .builder ()
265
261
.id (22 )
266
262
.inlongGroupId ("1" )
267
263
.inlongStreamId ("2" )
@@ -295,16 +291,16 @@ void testListGroup4KafkaSource() {
295
291
296
292
@ Test
297
293
void testListGroup4AllSource () {
298
- ArrayList <SourceListResponse > sourceListResponses = Lists .newArrayList (
299
- AutoPushSourceListResponse .builder ()
294
+ ArrayList <StreamSource > streamSources = Lists .newArrayList (
295
+ AutoPushSource .builder ()
300
296
.id (22 )
301
297
.inlongGroupId ("1" )
302
298
.inlongStreamId ("2" )
303
299
.sourceType ("AUTO_PUSH" )
304
300
.version (1 )
305
301
.build (),
306
302
307
- MySQLBinlogSourceListResponse .builder ()
303
+ MySQLBinlogSource .builder ()
308
304
.id (22 )
309
305
.inlongGroupId ("1" )
310
306
.inlongStreamId ("2" )
@@ -317,7 +313,7 @@ void testListGroup4AllSource() {
317
313
.tableWhiteList ("" )
318
314
.build (),
319
315
320
- FileSourceListResponse .builder ()
316
+ FileSource .builder ()
321
317
.id (22 )
322
318
.inlongGroupId ("1" )
323
319
.inlongStreamId ("2" )
@@ -327,15 +323,14 @@ void testListGroup4AllSource() {
327
323
.timeOffset ("timeOffset" )
328
324
.build (),
329
325
330
- KafkaSourceListResponse .builder ()
326
+ KafkaSource .builder ()
331
327
.id (22 )
332
328
.inlongGroupId ("1" )
333
329
.inlongStreamId ("2" )
334
330
.sourceType ("KAFKA" )
335
331
.sourceName ("source name" )
336
332
.serializationType ("csv" )
337
333
.dataNodeName ("dataNodeName" )
338
-
339
334
.topic ("topic" )
340
335
.groupId ("111" )
341
336
.bootstrapServers ("bootstrapServers" )
@@ -349,7 +344,7 @@ void testListGroup4AllSource() {
349
344
.inlongGroupId ("1" )
350
345
.name ("name" )
351
346
.inCharges ("admin" )
352
- .sourceResponses ( sourceListResponses )
347
+ .streamSources ( streamSources )
353
348
.build ()
354
349
);
355
350
@@ -390,7 +385,7 @@ void testCreateGroup() {
390
385
)
391
386
);
392
387
393
- String groupId = innerInlongManagerClient .createGroup (new InlongGroupRequest ());
388
+ String groupId = innerInlongManagerClient .createGroup (new InlongPulsarRequest ());
394
389
Assertions .assertEquals ("1111" , groupId );
395
390
}
396
391
@@ -403,7 +398,7 @@ void testUpdateGroup() {
403
398
)
404
399
);
405
400
406
- Pair <String , String > updateGroup = innerInlongManagerClient .updateGroup (new InlongGroupRequest ());
401
+ Pair <String , String > updateGroup = innerInlongManagerClient .updateGroup (new InlongPulsarRequest ());
407
402
Assertions .assertEquals ("1111" , updateGroup .getKey ());
408
403
Assertions .assertTrue (StringUtils .isBlank (updateGroup .getValue ()));
409
404
}
@@ -676,9 +671,8 @@ void testSaveCluster() {
676
671
)
677
672
)
678
673
);
679
- ClusterRequest request = new ClusterRequest ();
674
+ ClusterRequest request = new PulsarClusterRequest ();
680
675
request .setName ("pulsar" );
681
- request .setType ("PULSAR" );
682
676
request .setClusterTags ("test_cluster" );
683
677
Integer clusterIndex = innerInlongManagerClient .saveCluster (request );
684
678
Assertions .assertEquals (1 , (int ) clusterIndex );
0 commit comments