Skip to content

Commit 8748f24

Browse files
authored
[CYB - 194][UI] Git support for config pipeline. (#84)
1 parent ef5a5ca commit 8748f24

File tree

75 files changed

+1963
-531
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1963
-531
lines changed

flink-cyber/caracal-generator/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
<groupId>org.apache.flink</groupId>
2929
<artifactId>flink-streaming-java</artifactId>
3030
</dependency>
31+
<dependency>
32+
<groupId>org.apache.flink</groupId>
33+
<artifactId>flink-clients</artifactId>
34+
<version>${flink.version}</version>
35+
<scope>provided</scope>
36+
</dependency>
3137
<dependency>
3238
<groupId>org.apache.flink</groupId>
3339
<artifactId>flink-connector-kafka</artifactId>

flink-cyber/caracal-generator/src/test/java/com/cloudera/cyber/test/TestCaracalGeneratorJob.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public void testCustomGenerator() throws Exception {
6565
int count = 100;
6666
JobTester.startTest(createPipeline(ParameterTool.fromMap(ImmutableMap.of(
6767
PARAMS_RECORDS_LIMIT, String.valueOf(count),
68-
PARAMS_GENERATOR_CONFIG, Objects.requireNonNull(getClass().getClassLoader().getResource("config/generator_config.json")).toExternalForm()
68+
PARAMS_GENERATOR_CONFIG, Objects.requireNonNull(getClass().getClassLoader().getResource("config/generator_config_test.json")).toExternalForm()
6969
))));
7070

7171
JobTester.stopTest();

flink-cyber/cyber-services/cyber-service-common/pom.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
<groupId>org.apache.commons</groupId>
2929
<artifactId>commons-lang3</artifactId>
3030
</dependency>
31+
<dependency>
32+
<groupId>com.fasterxml.jackson.core</groupId>
33+
<artifactId>jackson-annotations</artifactId>
34+
<scope>provided</scope>
35+
</dependency>
3136
<dependency>
3237
<groupId>org.apache.commons</groupId>
3338
<artifactId>commons-compress</artifactId>
@@ -44,10 +49,6 @@
4449
<artifactId>junit</artifactId>
4550
<scope>test</scope>
4651
</dependency>
47-
<dependency>
48-
<groupId>org.springframework.boot</groupId>
49-
<artifactId>spring-boot-autoconfigure</artifactId>
50-
</dependency>
5152
<dependency>
5253
<groupId>org.apache.flink</groupId>
5354
<artifactId>flink-core</artifactId>

flink-cyber/cyber-services/cyber-service-common/src/main/java/com/cloudera/service/common/config/kafka/ClouderaManagementKafkaProperties.java

Lines changed: 0 additions & 4 deletions
This file was deleted.

flink-cyber/cyber-services/cyber-service-common/src/main/java/com/cloudera/service/common/config/kafka/ClouderaWorkerKafkaProperties.java

Lines changed: 0 additions & 4 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.cloudera.service.common.request;
2+
3+
import lombok.Data;
4+
5+
@Data
6+
public abstract class AbstractRequest {
7+
protected final String requestId;
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
package com.cloudera.service.common.request;
2+
3+
import com.fasterxml.jackson.annotation.JsonCreator;
4+
import com.fasterxml.jackson.annotation.JsonProperty;
5+
import lombok.EqualsAndHashCode;
6+
import lombok.Getter;
7+
import lombok.Setter;
8+
import lombok.ToString;
9+
10+
import java.util.List;
11+
12+
13+
@Getter
14+
@Setter
15+
@ToString
16+
@EqualsAndHashCode(callSuper = true)
17+
public class ClusterPipelineRequest extends AbstractRequest {
18+
private final String pipelineName;
19+
private final String branch;
20+
private final String profileName;
21+
private final String parserName;
22+
private final String gitUrl;
23+
private final String userName;
24+
private final String password;
25+
private final List<String> jobs;
26+
27+
@JsonCreator
28+
public ClusterPipelineRequest(
29+
@JsonProperty("requestId") String requestId,
30+
@JsonProperty("pipelineName") String pipelineName,
31+
@JsonProperty("branch") String branch,
32+
@JsonProperty("profileName") String profileName,
33+
@JsonProperty("parserName") String parserName,
34+
@JsonProperty("gitUrl") String gitUrl,
35+
@JsonProperty("userName") String userName,
36+
@JsonProperty("password") String password,
37+
@JsonProperty("jobs") List<String> jobs) {
38+
super(requestId);
39+
this.pipelineName = pipelineName;
40+
this.branch = branch;
41+
this.profileName = profileName;
42+
this.gitUrl = gitUrl;
43+
this.userName = userName;
44+
this.password = password;
45+
this.jobs = jobs;
46+
this.parserName = parserName;
47+
}
48+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.cloudera.service.common.request;
2+
3+
import lombok.EqualsAndHashCode;
4+
import lombok.Getter;
5+
import lombok.Setter;
6+
import lombok.ToString;
7+
8+
import java.util.List;
9+
10+
@Getter
11+
@Setter
12+
@EqualsAndHashCode(callSuper = true)
13+
@ToString
14+
public class ClusterRequest extends AbstractRequest{
15+
private final String clusterId;
16+
private final List<String> jobs;
17+
18+
public ClusterRequest(String requestId, String clusterId, List<String> jobs) {
19+
super(requestId);
20+
this.clusterId = clusterId;
21+
this.jobs = jobs;
22+
}
23+
}

flink-cyber/cyber-services/cyber-service-common/src/main/java/com/cloudera/service/common/request/RequestBody.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public class RequestBody {
1717
private String pipelineName;
1818
private String branch;
1919
private String profileName;
20+
private String parserName;
2021
private List<String> jobs;
2122
private byte[] payload;
2223
}

0 commit comments

Comments
 (0)